import math
n=int(input())
print(2*n - math.floor((1+ math.sqrt(8*n-7))/2 ))
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
29 ms |
18228 KB |
Output is correct |
2 |
Correct |
28 ms |
18236 KB |
Output is correct |
3 |
Correct |
28 ms |
18384 KB |
Output is correct |
4 |
Correct |
29 ms |
18228 KB |
Output is correct |
5 |
Correct |
29 ms |
18272 KB |
Output is correct |
6 |
Correct |
28 ms |
18236 KB |
Output is correct |
7 |
Correct |
29 ms |
18168 KB |
Output is correct |
8 |
Correct |
29 ms |
18236 KB |
Output is correct |
9 |
Correct |
28 ms |
18228 KB |
Output is correct |
10 |
Correct |
28 ms |
18236 KB |
Output is correct |
11 |
Correct |
35 ms |
18280 KB |
Output is correct |
12 |
Correct |
28 ms |
18236 KB |
Output is correct |
13 |
Correct |
28 ms |
18236 KB |
Output is correct |
14 |
Incorrect |
31 ms |
18236 KB |
Output isn't correct |
15 |
Halted |
0 ms |
0 KB |
- |