QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#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)

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Dangerous Syscalls

input:

103 27

output:


result: