Submission #337970

#TimeUsernameProblemLanguageResultExecution timeMemory
337970amunduzbaevOdd-even (IZhO11_oddeven)Cpython 3
0 / 100
2033 ms2796 KiB
n = int(input()) sz = 1 last = 1 prev = 0 i = 2 while (sz < n): prev = last last += (i*2)-1 sz += i i+=1 if(sz == n): print(last % 10) else : while(sz > n and prev < last): last -= 2 sz -= 1 print(last)
#Verdict Execution timeMemoryGrader output
Fetching results...