hdu1060
来源:互联网 发布:4g网络优化初级工程师 编辑:程序博客网 时间:2024/06/08 08:04
N^N=10^k
N*lg(N)=k;
p=k-(int)k;
答案是10^p
求N^N的最左的一位数字
#include <iostream>#include <cmath>#include <cstdio>using namespace std;int main(){ int T; int n; scanf("%d",&T); while(T--) { scanf("%d",&n); double p=n*log10((double)n); p=p-(long long int)p; printf("%d\n",(int)pow(10.0,p)); } return 0;}
0 0
- hdu1060
- HDU1060
- hdu1060
- HDU1060
- hdu1060;hdu1018
- hdu1060 Leftmost Digit(转载)
- hdu1060-Leftmost Digit
- HDU1060--Leftmost Digit
- HDU1060 Leftmost Digit 【数学】
- Leftmost Digit hdu1060
- HDU1060 Leftmost Digit
- hdu1060 Leftmost Digit
- hdu1060 Leftmost Digit
- HDU1060 Leftmost Digit
- HDU1060 Leftmost Digit
- hdu1060 Leftmost Digit
- HDU1060 Leftmost Digit
- hdu1060 N^N首位 log10
- 【转】c#做端口转发程序支持正向连接和反向链接
- hdu 1423 Greatest Common Increasing Subsequence(LIS)
- Ubuntu之FireFox不能使用修复
- 国内第一本云计算原创图书《走进云计算》
- shell 常用正则表达式
- hdu1060
- File,把指定的目录下的所有文件和文件夹删除的方法
- Bzoj3132 二维树状数组
- 自动备份MySQL数据库并删除五天前旧档和上传到其它服务器
- Exported service does not require permission警告
- 杂七杂八
- java 位数补0处理
- Phonegap条形码扫描插件说明文档
- android - 使用缩略图