# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1091869 | KluydQ | Odd-even (IZhO11_oddeven) | Pypy 2 | 29 ms | 19432 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 = 10**51; best = 0
while l <= r:
mid = ( l + r ) // 2
if mid * ( mid + 1) // 2 >= n:
best = mid
r = mid - 1
else: l = mid + 1
print( 2 * n - best )
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |