n=int(input())
k=n//2+2
i=0
while i!=n//2:
i+=1
z=0
t=0
for j in range(i,k):
z+=j
if z==n:
t=j
break
if z>n:
break
if t:print(i,t)
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
25 ms |
3300 KB |
Output is correct |
2 |
Correct |
27 ms |
3300 KB |
Output is correct |
3 |
Correct |
27 ms |
3300 KB |
Output is correct |
4 |
Correct |
266 ms |
3372 KB |
Output is correct |
5 |
Correct |
564 ms |
3324 KB |
Output is correct |
6 |
Execution timed out |
1080 ms |
3300 KB |
Time limit exceeded |
7 |
Execution timed out |
1078 ms |
3292 KB |
Time limit exceeded |
8 |
Execution timed out |
1084 ms |
3300 KB |
Time limit exceeded |
9 |
Execution timed out |
1075 ms |
3300 KB |
Time limit exceeded |
10 |
Execution timed out |
1090 ms |
3300 KB |
Time limit exceeded |