Advertisement
noshin98

uva 11614

Jul 14th, 2016
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.24 KB | None | 0 0
  1. # include <stdio.h>
  2. # include <math.h>
  3. int main()
  4. {
  5.     long long i,n,t,sum;
  6.    scanf("%lld",&t);
  7.    for(i=1;i<=t;i++)
  8.    {
  9.        scanf("%lld",&n);
  10.        sum = (sqrt(1+8*n)-1)/2;
  11.        printf("%lld\n",sum);
  12.    }
  13.     return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement