2661 Factstone Benchmark 解题报告
2009-03-15 11:22
267 查看
#include<math.h> #include<stdio.h> #define pi 3.14159265 #define e 2.71828183 int main() { int y,last(0); double m; for(int y = 1; y <= 22; y++){ m = pow(2.0,y)/log(2.0); for(int n = 1; true; n++) if(n*log(1.0*n/e)+log(sqrt(2*pi*n)) > m) break; else last = n; printf("%d,",last); } return 0; }
#include<math.h> #include<stdio.h> #define pi 3.14159265 #define e 2.71828183 int main() { int y,last(0); double m; int arr[] = {3,5,8,12,20,34,57,98,170,300,536,966,1754,3210,5910,10944,20366,38064,71421,134480,254016}; while(scanf("%d",&y)&&y) { printf("%d/n",arr[(y-1940)/10-2]); } return 0; }
相关文章推荐
- POJ 2661 Factstone Benchmark 数学题
- POJ 2661-Factstone Benchmark(log()的应用)
- POJ-2661-Factstone Benchmark
- POJ2661 Factstone Benchmark
- zoj 2545 || poj 2661 Factstone Benchmark
- POJ 2661 Factstone Benchmark (斯特灵公式)
- POJ 2661 Factstone Benchmark
- poj 2661 Factstone Benchmark 取对数
- POJ 2661 Factstone Benchmark (log2的故事)
- poj-2661-Factstone Benchmark
- POJ 2661 Factstone Benchmark
- poj 2661 Factstone Benchmark (Stirling数)
- poj--2661 Factstone Benchmark
- hdu 1141 Factstone Benchmark
- 2013秋13级预备队集训练习4 --H - Factstone Benchmark
- Sicily 1119. Factstone Benchmark
- Uva 10916 - Factstone Benchmark
- hdu 1141 Factstone Benchmark
- hdoj-1141-Factstone Benchmark
- Sicily 1119. Factstone Benchmark