Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # include <stdio.h>
- # include <math.h>
- int main()
- {
- long long i,n,t,sum;
- scanf("%lld",&t);
- for(i=1;i<=t;i++)
- {
- scanf("%lld",&n);
- sum = (sqrt(1+8*n)-1)/2;
- printf("%lld\n",sum);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement