QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#623004#5721. Dividing by TwoTheZachManRE 0ms0kbPython3210b2024-10-09 09:31:342024-10-09 09:31:35

Judging History

你现在查看的是最新测评结果

  • [2024-10-09 09:31:35]
  • 评测
  • 测评结果:RE
  • 用时:0ms
  • 内存:0kb
  • [2024-10-09 09:31:34]
  • 提交

answer

x. y = map(int,input())

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: 0
Dangerous Syscalls

input:

103 27

output:


result: