Submission #874449

#TimeUsernameProblemLanguageResultExecution timeMemory
874449The_SamuraiOdd-even (IZhO11_oddeven)Cpython 3
100 / 100
13 ms3252 KiB
n = int(input()) l, r, best = 1, 2 * 10 ** 50, -1 while l <= r: m = (l + r) // 2 if m * (m + 1) // 2 >= n: best = m r = m - 1 else: l = m + 1 print(2 * n - best)
#Verdict Execution timeMemoryGrader output
Fetching results...