fork download
  1. import math
  2. for t in range(int(input())):
  3. n = int(input())
  4. x = int((-3 + (9+8*n)**0.5)/2)
  5. print(2*(n-x) if n>1 else 1)
Success #stdin #stdout 0.02s 9992KB
stdin
5
2
6
9
1
100000
stdout
2
8
12
1
199110