Submission #100875

#TimeUsernameProblemLanguageResultExecution timeMemory
100875cki86201Odd-even (IZhO11_oddeven)Cpython 3
100 / 100
33 ms3404 KiB
N = int(input()) l = 1 h = 10**100 r = -1 while l <= h: m = (l + h) // 2 if m * (m-1) // 2 + 1 <= N: r = m l = m + 1 else: h = m - 1 print(2*N-r)
#Verdict Execution timeMemoryGrader output
Fetching results...