QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#623005 | #5721. Dividing by Two | TheZachMan | RE | 0ms | 0kb | Python3 | 218b | 2024-10-09 09:31:55 | 2024-10-09 09:31:56 |
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: 0
Dangerous Syscalls
input:
103 27