# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
676512 | 2022-12-31T05:59:00 Z | QwertyPi | Odd-even (IZhO11_oddeven) | C++14 | 0 ms | 0 KB |
from math import sqrt n = int(input()) x = int(sqrt(n * 2)) while x * (x - 1) // 2 >= n: x -= 1 while x * (x + 1) / 2 < n: x += 1 print(n * 2 - x)