| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 257460 | dolphingarlic | Guess the number (BOI20_guess) | Cpython 3 | 32 ms | 3564 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
import sys
n = int(input())
l = 1
r = n
while True:
mid = (l + r) // 2
print(f'? {mid}')
sys.stdout.flush()
res = int(input())
if res == -1:
l = mid + 1
elif res == 1:
r = mid - 1
else:
print(f'= {mid}')
sys.stdout.flush()
break| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
