HDOJ 1060 Leftmost Digit
2012-02-02 21:56
369 查看
数学知识,n^n=10^(n*log10n)=10^(整数.小数)=10^(x1.x2),10^x2即为所求
#include"stdio.h" #include"math.h" main() { int t,digit; double n,x1,x2; scanf("%d",&t); while(t--) { scanf("%lf",&n); x1=n*log10(n); x2=x1-floor(x1); digit=pow(10.0,x2); printf("%d\n",digit); } }
相关文章推荐
- hdoj 1060 Leftmost Digit
- HDOJ 1060 Leftmost Digit
- HDOJ HDU 1060 Leftmost Digit
- hdoj1060 Leftmost Digit(取对数思想)
- [hdoj解题报告][hdoj_1060]Leftmost Digit 左值
- hdu/hdoj 1060 Leftmost Digit
- hdoj 1060 Leftmost Digit 【数论】
- hdoj1060 Leftmost Digit
- HDOJ HDU 1060 Leftmost Digit ACM 1060 IN HDU
- HDOJ 1060 Leftmost Digit
- hdoj1060_Leftmost Digit
- hdoj--1060--Leftmost Digit(数学)
- HDOJ 1060 Leftmost Digit
- hdoj Leftmost Digit 1060 (数学取对数)
- hdoj 1060 Leftmost Digit
- HDOJ 1060 Leftmost Digit
- HDOJ 1060 Leftmost Digit 【科学计数法转换】
- [热身题][hdoj_1060]Leftmost Digit
- HDOJ 1060 Leftmost Digit
- HDU 1060 Leftmost Digit