# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
222518 |
2020-04-13T08:36:45 Z |
dwsc |
Popcount (COCI19_popcount) |
Python 3 |
|
28 ms |
3364 KB |
n,k= input().split(" ")
n = int(n)
k = int(k)
print(n,k)
numboxes = n
boxsize = 1
val =0
tempn = n
while (tempn != 1):
val+= 1
tempn = (tempn+1)//2
print(val)
while numboxes != 1:
bigbox = 0
smallbox = 0
addto = 0
num = 0
counter = 1
for i in range(0,n):
num += 1
if (num > boxsize):
num -= boxsize
addto = 1-addto
if (addto):
bigbox += counter
else:
smallbox += counter
counter *= 2
print("A=(((A&"+str(bigbox)+")>>"+str(boxsize)+")+(A&"+str(smallbox)+"))")
numboxes = (numboxes+1)//2
boxsize *= 2
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
24 ms |
3308 KB |
Wrong output format. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
28 ms |
3332 KB |
Wrong output format. |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
24 ms |
3308 KB |
Wrong output format. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
26 ms |
3364 KB |
Wrong output format. |
2 |
Halted |
0 ms |
0 KB |
- |