# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
882220 | Mr_Husanboy | Odd-even (IZhO11_oddeven) | Cpython 3 | 15 ms | 3120 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
r = 2 * 10**50
while l <= r:
m = (l + r) // 2
if((m + 1) * m // 2 >= n):
r = m - 1
else:
l = m + 1
r += 1
print(2 * n - r)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |