HDU 1060 Leftmost Digit
2014-08-29 15:49
405 查看
题解:利用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; }
相关文章推荐
- HDU 1060 LeftMost Digit
- hdu 1060 Leftmost Digit
- HDU--1060--Leftmost Digit
- HDU 1060 Leftmost Digit
- HDU-1060 Leftmost Digit (数学)
- hdu 1060 Leftmost Digit
- HDU 1060 Leftmost Digit
- HDU 1060 Leftmost Digit
- hdu 1060 Leftmost Digit
- HDU 1060 Leftmost Digit & BIT1046 Leftmost Digit
- HDU1060 Leftmost Digit (数学推导)
- HDU 1060 Leftmost Digit
- HDU - 1060 Leftmost Digit (数学取对数)规律
- HDU 1060 - Leftmost Digit
- HDU-1060 Leftmost Digit
- 杭电 HDU 1060 Leftmost Digit
- hdu_1060_Leftmost Digit
- hdu 1060——Leftmost Digit
- 【HDU 1060】Leftmost Digit
- hdu 1060 Leftmost Digit