Monday, December 14, 2020

 #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;
}

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home