#include<stdio.h>

#include<math.h>
int main(){
int n,x,a;
scanf("%d",&n);
while(n--){
scanf("%d",&x);
a = (sqrt(1+4*2*x) - 1)/2;
printf("%d\n",a);
}
return 0;
}

Comments

Popular posts from this blog

Problem——50A. Domino piling——Codeforces

Euclid’s lemma