# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
173744 | juggernaut | Odd-even (IZhO11_oddeven) | Cpython 3 | 26 ms | 3428 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.
N = int(input())
l = 1
h = 10**100
r = -1
while l <= h:
m = (l + h) // 2
if m * (m-1) // 2 + 1 <= N:
r = m
l = m + 1
else:
h = m - 1
print(2*N-r)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |