big number poj 1423
来源:互联网 发布:苹果电脑软件免费下载 编辑:程序博客网 时间:2024/05/16 06:47
哎,用log10函数做
在程序内打表,在查表,不会超时,但为什么一边输入一边算会超时啊,两个的最坏的情况不是一样么
代码:
#include <stdio.h>#include <stdlib.h>#include <math.h>#include <string.h>#include <iostream>#include <algorithm>#include <queue>#include <map>using namespace std;int main(){ int T,a; scanf("%d",&T); while(T--) { scanf("%d",&a); double num=0; for(int i=1;i<=a;i++) num+=log10(i); printf("%d\n",(int)ceil(num)); }}
- POJ 1423 Big Number
- POJ 1423 Big Number
- POJ 1423 Big Number
- poj 1423 Big Number
- poj 1423 big number
- POJ 1423 Big Number
- POJ 1423 Big Number
- poj 1423 Big Number
- big number poj 1423
- POJ 1423 Big Number
- POJ 1423 Big Number
- poj - 1423-Big number
- POJ:1423 Big Number
- poj 1423 Big Number
- POJ 1423 Big Number
- 【poj】1423 Big number
- POJ 1423 BIG NUMBER
- POJ 1423 Big Number
- 赫夫曼树及一些延伸
- jquery.ui.accordion的修改(支持展开多个)
- 模拟退火算法
- Android的通讯录同步
- hdu 3576 Elevators in Jiayuan Students' Apartment
- big number poj 1423
- VC中ftp协议实现多线程断点续传
- mysql数据据存储引擎InnoDB和MyISAM的优势及区别
- Android提高第九篇之SQLite分页表格
- Java 实现PDB数据库中蛋白质部分序列与Uniport数据库中相应的全长序列的最优匹配
- LDD3读书笔记(第2章 建立和运行模块)
- Matlab——多项式拟合
- C++实现FTP断点续传
- 时刻鼓舞自己的话 当心情不好时就看看