Submission #319172

#TimeUsernameProblemLanguageResultExecution timeMemory
319172sofapudenOdd-even (IZhO11_oddeven)Cpython 3
Compilation error
0 ms0 KiB
n = int(input()) l = 0 r = n while(l < r): mid = (l+r+1)//2 cur = (mid*(mid+1))//2 if(cur > n): r = mid-1 else: l = mid if((l*(l+1))//2 != n):l+=1 print(2*n-l)

Compilation message (stderr)

File "oddeven.py", line 10
    else: l = mid
    ^
SyntaxError: invalid syntax