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)
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
37 ms |
3324 KB |
Output is correct |
2 |
Correct |
26 ms |
3300 KB |
Output is correct |
3 |
Correct |
28 ms |
3332 KB |
Output is correct |
4 |
Correct |
127 ms |
5336 KB |
Output is correct |
5 |
Correct |
219 ms |
7396 KB |
Output is correct |
6 |
Execution timed out |
1052 ms |
43020 KB |
Time limit exceeded |
7 |
Runtime error |
356 ms |
66560 KB |
Execution killed with signal 9 (could be triggered by violating memory limits) |
8 |
Runtime error |
322 ms |
66560 KB |
Execution killed with signal 9 (could be triggered by violating memory limits) |
9 |
Runtime error |
337 ms |
66560 KB |
Execution killed with signal 9 (could be triggered by violating memory limits) |
10 |
Runtime error |
314 ms |
66560 KB |
Execution killed with signal 9 (could be triggered by violating memory limits) |