QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#406750 | #6749. Target | poxiao01 | TL | 9ms | 9336kb | Python3 | 217b | 2024-05-07 17:24:39 | 2024-05-07 17:25:19 |
Judging History
answer
a, b = map(float, input().split())
eps = 1e-4
str = ''
while abs(a - b) > eps:
if a - b >= 0.0000000:
str += '1'
a *= 0.5
else:
str += '2'
a = a * 0.5 + 0.5
print(str)
详细
Test #1:
score: 100
Accepted
time: 7ms
memory: 9328kb
input:
0.5 0.25
output:
1
result:
ok ok
Test #2:
score: 0
Accepted
time: 9ms
memory: 9336kb
input:
1 0.75
output:
12
result:
ok ok
Test #3:
score: 0
Accepted
time: 4ms
memory: 9296kb
input:
1 0
output:
11111111111111
result:
ok ok
Test #4:
score: -100
Time Limit Exceeded
input:
0.361954 0.578805