Submission #222594

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