QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#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))
詳細信息
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'