Submission #1019667

#TimeUsernameProblemLanguageResultExecution timeMemory
1019667MinbaevOdd-even (IZhO11_oddeven)Cpython 3
100 / 100
12 ms2928 KiB
n = int(input()) l = 1 r = 2 * 10**50 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)
#Verdict Execution timeMemoryGrader output
Fetching results...