标签:style os io log sp amp on size c
题解:利用log,先计算答案的log值,n=n*log10(n),然后,最高位就是小数部分幂还原的整数部分。
#include <cstdio> #include <cmath> int T;double n; int main(){ scanf("%d",&T); while(T--){ scanf("%lf",&n); n=n*log10(n); n=n-(long long)n;; printf("%d\n",(int)pow(10,n)); }return 0; }
标签:style os io log sp amp on size c
原文地址:http://www.cnblogs.com/forever97/p/3945123.html