unsigned long long 范围0-18446744073709551615
在本编译环境中 %d=%ld 用%lld
(%d=int,%ld=long,%lld=long long;)
#include<stdio.h>
#include<math.h>
int main()
{
long long h,x;
scanf("%lld",&h);//h=x+x*x.4h=4x+4x*x,4h+1=2*2*x+2*2*x*x+1*1,sqrt(4h+1)=2x+1,(sqrt(4h+1)-1)/2=x
x=(sqrt(4*h+1)-1)/2;
printf("%lld",x);
return 0;
}