#include<bits/stdc++.h>
using namespace std;
int const N = 505;
string s[N];
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
int n, k;
cin >> n >> k;
for(int i = 0; i < n; i++){
s[i] = "((A&(1<<";
if(i >= 10){
s[i].push_back((char)(i / 10 + '0'));
}
s[i].push_back((char)(i % 10 + '0'));
s[i] = s[i] + "))>>";
if(i >= 10){
s[i].push_back((char)(i / 10 + '0'));
}
s[i].push_back((char)(i % 10 + '0'));
s[i].push_back(')');
}
cout << 1 << '\n';
cout << "A=";
for(int i = 0; i < n - 1; i++){
cout << '(';
}
cout << s[0];
for(int i = 1; i < n; i++){
cout << '+';
cout << s[i];
cout << ')';
}
cout << '\n';
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Accepted. |
2 |
Correct |
1 ms |
212 KB |
Accepted. |
3 |
Correct |
1 ms |
340 KB |
Accepted. |
4 |
Correct |
1 ms |
212 KB |
Accepted. |
5 |
Incorrect |
1 ms |
340 KB |
Wrong command format. |
6 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
340 KB |
Wrong command format. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Accepted. |
2 |
Incorrect |
1 ms |
212 KB |
Wrong command format. |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
340 KB |
Wrong command format. |
2 |
Halted |
0 ms |
0 KB |
- |