HDU1018(也是水题)
来源:互联网 发布:武汉破获一起新型网络 编辑:程序博客网 时间:2024/06/05 06:23
HDU1018
今天,第四道水题了
#include <cstdio>#include <iostream>#include <cstdlib>#include <cmath>#include <cstring>#include <string>#include <map>#include <stack>#include <queue>#include <vector>#include <algorithm>using namespace std;#define lson rt<<1#define rson rt<<1 | 1#define Mid ( (L+R) >> 1 )#define debug(x) cout<<#x<<":"<<(x)<<endl;#define Pause system("pause");#define RF freopen("1.txt", "r", stdin);#define WF freopen("11.txt", "w", stdout);#define QCIN ios::sync_with_stdio(false);int dir[4][2] = {{0,1},{0,-1},{1,0},{-1,0}};int main(){ // RF int t,n; double ans; cin >> t; while( t-- ){ cin >> n; ans = 0; for(int i=1; i<=n; i++) ans += log10(i); cout << (int)ans+1 << endl; } return 0;}// log10( n * n-1 * n-2 * ... * 3 * 2 * 1) + 1 = log10(n!) + 1
0 0
- HDU1018(也是水题)
- hdu1018(大水题)
- HDU1018 (最小公倍数)
- HDU1018(Big Number)
- hdu1018(斯特灵公式)
- hdu1018
- hdu1018
- hdu1018
- hdu1018
- hdu1018
- hdu1018
- hdu1018
- HDU1018
- hdu1018
- HDU1018
- hdu1018
- HDU1018
- HDU1018
- STM32串口程序(寄存器版)
- 移植u-boot-2015.07-rc3之修改代码支持SDRAM和SPL启动(二)
- ant配置
- 求值顺序——不是运算符优先级,也不是结合方向
- PageRank与R语言实现
- HDU1018(也是水题)
- Oracle经典20题
- Java中的内存泄漏分析说明
- Spring3.0学习札记一Spring IOC控制反转(3)
- C++对象生命周期(未完)
- escape、encodeURI、encodeURIComponent不编码的字符
- MongoDB大文件存储流程
- 单向循环链表实例
- 阻塞睡眠实现机制