cin有位数限制, 省去了强制转换, pow也可以代替sqrt用 ">#include<stdio.h> #include<iostream> using namespace std; int main(void) { long long h; //cin>>h;位数限制6位 scanf("%lld",&h); //x^2+x-h=0 //= 1+4h // -1+_pow(1+4h,0.5)/2 long long k = (-1+pow(1+4*h,0.5))/2; pri...