Submission #222591

# Submission time Handle Problem Language Result Execution time Memory
222591 2020-04-13T11:28:58 Z errorgorn Popcount (COCI19_popcount) Python 3
0 / 110
33 ms 3308 KB
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
1 Incorrect 33 ms 3308 KB Wrong command format.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 25 ms 3308 KB Wrong command format.
# Verdict Execution time Memory Grader output
1 Correct 25 ms 3292 KB Accepted.
2 Incorrect 25 ms 3308 KB Wrong command format.
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 25 ms 3308 KB Wrong command format.
2 Halted 0 ms 0 KB -