# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1109827 | Kirill22 | Odd-even (IZhO11_oddeven) | Pypy 3 | 41 ms | 18360 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.
import math
n = int(input())
l = 0
r = 8 * n
while l + 1 < r:
m = (l + r) // 2
if m * m <= 8 * n - 7:
l = m
else:
r = m
# print(l, math.sqrt(8 * n - 7))
print(2 * n - math.floor((1 + l) / 2))
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |