QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#623013 | #5721. Dividing by Two | DaAsianCarsten# | RE | 0ms | 0kb | Python3 | 195b | 2024-10-09 09:34:31 | 2024-10-09 09:34:32 |
answer
a = int(input())
b = int(input())
count = 0
while a > b:
if a%2==0:
a = a/2
count += 1
else:
a += 1
count += 1
count += b-a
print(count)
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Dangerous Syscalls
input:
103 27