Submission #222434

# Submission time Handle Problem Language Result Execution time Memory
222434 2020-04-13T07:13:12 Z shenxy Popcount (COCI19_popcount) Python 3
0 / 110
27 ms 3324 KB
N, K = input().split()
p2 = 1
x = 1
print(int(N)//4 + int(N)%4)
for i in range(0, int(N) // 4 * 4, 4):
	print("A=(A-((((A&%d)>>%d)+((A&%d)>>%d))+(((A&%d)>>%d)+((A&%d)>>%d))))" % (p2, x, p2 * 2, x + 1, p2 * 4, x + 2, p2 * 8, x + 3))
	p2 = 16
	x += 4
for i in range(int(N) // 4 * 4, int(N)):
	print("A=(A-((A&%d)>>%d))" % (p2, x))
	p2 *= 2
	x += 1
# Verdict Execution time Memory Grader output
1 Incorrect 27 ms 3308 KB Incorrect number of commands.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 26 ms 3324 KB Wrong answer.
# Verdict Execution time Memory Grader output
1 Correct 24 ms 3300 KB Accepted.
2 Incorrect 24 ms 3308 KB Wrong answer.
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 25 ms 3300 KB Incorrect number of commands.
2 Halted 0 ms 0 KB -