# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
523238 | 2022-02-07T09:04:55 Z | redstonegamer22 | Odd-even (IZhO11_oddeven) | PyPy 3 | 62 ms | 20312 KB |
import math n = int(input()) m = math.isqrt(2 * n) - 5 while m <= 0 or (m + 1) * (m + 2) // 2 <= n: m = m + 1 # print(m) a = m * (m + 1) // 2 + m * (m - 1) // 2 b = n - m * (m + 1) // 2 ans = a + 2 * b - 1 print(ans)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 62 ms | 20312 KB | Execution failed because the return code was nonzero |
2 | Halted | 0 ms | 0 KB | - |