Submission #99587

#TimeUsernameProblemLanguageResultExecution timeMemory
99587IvanBevandaUzastopni (COCI17_uzastopni)Cpython 3
40 / 80
1052 ms66560 KiB
N = int(input()) A = [] for i in range (1, (N//2)+2): A.append(i) B = [] for i in range (-1, -(len(A)+1), -1): B.append(A[i]) if sum(B) == N: print (str(B[-1]) + " " + str(B[0])) elif sum(B) < N: continue elif sum(B) > N: B.pop(0)
#Verdict Execution timeMemoryGrader output
Fetching results...