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