This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
import math
n,k=map(int,input().split(" "))
ans=[]
while (n!=1):
temp=0
for i in range(0,n,5):
temp|=(1<<i)
ans+=["A=(((((A&"+str(temp)+")+((A>>1)&"+str(temp)+"))+((A>>2)&"+str(temp)+"))+((A>>3)&"+str(temp)+"))+((A>>4)&"+str(temp)+"))"]
n=math.ceil(n/5)
print(len(ans))
for i in range(len(ans)):
print(ans[i])
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |