QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#623026 | #5721. Dividing by Two | TheZachMan | WA | 14ms | 10644kb | Python3 | 218b | 2024-10-09 09:40:11 | 2024-10-09 09:40:17 |
Judging History
answer
x, y = map(int,input().split())
def f(a, b):
if a < b:
return b - a
else:
if a%2 == 0:
return 1 + f(a//2, b)
else:
return 1 + f(a+1, b)
print(f(x,y))
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 11ms
memory: 10620kb
input:
103 27
output:
4
result:
ok single line: '4'
Test #2:
score: 0
Accepted
time: 14ms
memory: 10644kb
input:
3 8
output:
5
result:
ok single line: '5'
Test #3:
score: -100
Wrong Answer
time: 12ms
memory: 10632kb
input:
1010 1010
output:
506
result:
wrong answer 1st lines differ - expected: '0', found: '506'