QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#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()
Details
Tip: Click on the bar to expand more detailed information
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'