QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#623001#5721. Dividing by TwoDaAsianCarsten#RE 0ms0kbPython3194b2024-10-09 09:29:462024-10-09 09:29:47

Judging History

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

  • [2024-10-09 09:29:47]
  • 评测
  • 测评结果:RE
  • 用时:0ms
  • 内存:0kb
  • [2024-10-09 09:29:46]
  • 提交

answer

a = int(input())
b = int(input())

count = 0

while a > b:
    if a%2==0:
        a /= 2
        count += 1
    else:
        a += 1
        count += 1

count += b-a

print(count)

詳細信息

Test #1:

score: 0
Dangerous Syscalls

input:

103 27

output:


result: