# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1169372 | mnbvcxz123 | 홀-짝 수열 (IZhO11_oddeven) | Pypy 3 | 148 ms | 48820 KiB |
import math
n = int(input())
l = 0
r = 8 * n
while l + 1 < r:
m = (l + r) // 2
if m * (m + 1) // 2 < n:
l = m
else:
r = m
print(2 * n - l - 1)
Compilation message (stdout)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |