| Task: | Ohjelmat |
| Sender: | Kuha |
| Submission time: | 2025-10-18 13:03:32 +0300 |
| Language: | text (C++17) |
| Status: | READY |
| Result: | 0 |
| group | verdict | score |
|---|---|---|
| #1 | WRONG ANSWER | 0 |
| test | verdict | time | score | |
|---|---|---|---|---|
| #1 | WRONG ANSWER | 0.00 s | 0 | details |
Code
#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin>>t;
while (t --> 0) {
int x;
cin>>x;
if (x == 1) {
cout<<"2"<<endl<<"DUP DROP"<<endl;
} else {
cout<<(x + x - 2)<<endl;
for (int i = 1; i < x; i++) cout<<"DUP ";
for (int i = 1; i < x; i++) cout<<"+ ";
cout<<endl;
}
}
}