A=[int(x) for x in input().split(' ')]
N=A[0]
M=A[1]
X=[]
ml=0
for x in range(M):
A=0
B=0
for i in range(N):
if((2**ml)&i): A+=2**i
else:B+=2**i
ml+=1
X.append("((A&"+str(A)+")>>"+str(ml)+")+(A&"+str(B)+')')
if(2**ml>=N):break
print(len(X))
for i in X:
print(i)
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
20 ms |
3308 KB |
Wrong command format. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
26 ms |
3336 KB |
Wrong command format. |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
20 ms |
3428 KB |
Wrong command format. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
22 ms |
3300 KB |
Wrong command format. |
2 |
Halted |
0 ms |
0 KB |
- |