QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#623015 | #5721. Dividing by Two | yaffenator | WA | 17ms | 10576kb | Python3 | 513b | 2024-10-09 09:35:32 | 2024-10-09 09:35:33 |
Judging History
answer
import sys
input = sys.stdin.readline
# For taking space seperated integer variable inputs.
def insep():
return(map(int,input().split()))
def main():
a = 3
b = 8
operations = 0
while (a != b):
if a < b:
a += 1
operations += 1
else:
if a % 2 == 0:
a = a / 2
operations += 1
else:
a += 1
operations += 1
print(operations)
main()
詳細信息
Test #1:
score: 0
Wrong Answer
time: 17ms
memory: 10576kb
input:
103 27
output:
5
result:
wrong answer 1st lines differ - expected: '4', found: '5'