Submission #882216

# Submission time Handle Problem Language Result Execution time Memory
882216 2023-12-02T19:46:51 Z Mr_Husanboy Odd-even (IZhO11_oddeven) C++17
Compilation error
0 ms 0 KB
n = int(input())
l = 1
r = 10**51
while l <= r:
    m = (l + r) // 2
    if((m + 1) * m / 2 >= n):
        r = m - 1
    else:
        l = m + 1

r += 1
print(2 * n - r)

Compilation message

oddeven.cpp:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^