Submission #1169371

#TimeUsernameProblemLanguageResultExecution timeMemory
1169371mnbvcxz123Odd-even (IZhO11_oddeven)C++20
Compilation error
0 ms0 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 (stderr)

oddeven.cpp:1:1: error: 'import' does not name a type
    1 | import math
      | ^~~~~~
oddeven.cpp:1:1: note: C++20 'import' only available with '-fmodules-ts', which is not yet enabled with '-std=c++20'