# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
502153 | khangal | Odd-even (IZhO11_oddeven) | Pypy 3 | 39 ms | 18264 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**100
while l < r:
mid = (l+r)//2
x = (1+mid)*(mid)//2
if x >= n:
r=mid
else:
l=mid+1
x=(1+r)*r//2
print(r*r - 2*(x-n))
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |