Submission #1109827

#TimeUsernameProblemLanguageResultExecution timeMemory
1109827Kirill22Odd-even (IZhO11_oddeven)Pypy 3
0 / 100
41 ms18360 KiB
import math n = int(input()) l = 0 r = 8 * n while l + 1 < r: m = (l + r) // 2 if m * m <= 8 * n - 7: l = m else: r = m # print(l, math.sqrt(8 * n - 7)) print(2 * n - math.floor((1 + l) / 2))
#Verdict Execution timeMemoryGrader output
Fetching results...