import math
n = input()
n = float(n)
print(int(n*2-float( math.floor((1.0 + math.sqrt(float(8*n-7)) )/2) )))
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
16 ms |
2796 KB |
Output is correct |
2 |
Correct |
16 ms |
2796 KB |
Output is correct |
3 |
Correct |
16 ms |
2796 KB |
Output is correct |
4 |
Correct |
16 ms |
2796 KB |
Output is correct |
5 |
Correct |
16 ms |
2796 KB |
Output is correct |
6 |
Correct |
15 ms |
2796 KB |
Output is correct |
7 |
Correct |
16 ms |
2796 KB |
Output is correct |
8 |
Correct |
16 ms |
2796 KB |
Output is correct |
9 |
Correct |
16 ms |
2796 KB |
Output is correct |
10 |
Correct |
16 ms |
2796 KB |
Output is correct |
11 |
Incorrect |
16 ms |
2796 KB |
Output isn't correct |
12 |
Halted |
0 ms |
0 KB |
- |