Finding Bovine Roots

xiaoxiao2021-02-28  120

#include <stdio.h> #include <math.h> const double theE[] ={1,1e-1,1e-2,1e-3,1e-4,1e-5,1e-6,1e-7,1e-8,1e-9}; int main() { double t1; double t2; int c,n; scanf("%d",&c); scanf("%d",&n); double flo = n*theE[c]; int now=1; while(1) { t1 = (long long)(pow(now+flo,2))+1; t2 = pow(now+flo+theE[c],2); if(t2>t1) break; now++; }     printf("%lld\n",(long long)t1);

}

//思路:

//longlong的输出格式

转载请注明原文地址: https://www.6miu.com/read-56424.html

最新回复(0)