#include<bits/stdc++.h>
using namespace std;
int main()
{
long t,a,s;
cin>>t;
while(t--)
{
cin>>s;
a=(-1+sqrt(1+4*2*s))/2;
cout<<a<<"\n";
}
return 0;
}
using namespace std;
int main()
{
long t,a,s;
cin>>t;
while(t--)
{
cin>>s;
a=(-1+sqrt(1+4*2*s))/2;
cout<<a<<"\n";
}
return 0;
}
No comments:
Post a Comment