QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#623039#5721. Dividing by TwoDaAsianCarsten#WA 9ms10652kbPython3222b2024-10-09 09:45:282024-10-09 09:45:29

Judging History

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

  • [2024-10-09 09:45:29]
  • 评测
  • 测评结果:WA
  • 用时:9ms
  • 内存:10652kb
  • [2024-10-09 09:45:28]
  • 提交

answer

input = input().split()
a = int(input[0])
b = int(input[1])

count = 0

while a > b:
    if a%2==0:
        a = 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
Wrong Answer
time: 9ms
memory: 10652kb

input:

103 27

output:

4.0

result:

wrong answer 1st lines differ - expected: '4', found: '4.0'