Submission #502153

#TimeUsernameProblemLanguageResultExecution timeMemory
502153khangalOdd-even (IZhO11_oddeven)Pypy 3
100 / 100
39 ms18264 KiB
n=int(input()); l=1; r=10**100 while l < r: mid = (l+r)//2 x = (1+mid)*(mid)//2 if x >= n: r=mid else: l=mid+1 x=(1+r)*r//2 print(r*r - 2*(x-n))
#Verdict Execution timeMemoryGrader output
Fetching results...