1.链接地址:

http://bailian.openjudge.cn/practice/1517

http://poj.org/problem?id=1517

2.题目:

总时间限制:
1000ms
内存限制:
65536kB
描述
A simple mathematical formula for e is
e=Σ0<=i<=n1/i!
where
n is allowed to go to infinity. This can actually yield very accurate
approximations of e using relatively small values of n.
输入
No input
输出
Output the approximations of e generated by the above formula for
the values of n from 0 to 9. The beginning of your output should appear
similar to that shown below.
样例输入
no input
样例输出
n e
- -----------
0 1
1 2
2 2.5
3 2.666666667
4 2.708333333
...
来源
Greater New York 2000

3.思路:

4.代码:

 #include "stdio.h"
//#include "stdlib.h"
int main()
{
int tmp=;
double sum=;
int i=;
printf("n e\n");
printf("- -----------\n");
printf("%d %.10g\n",i,sum);
for(i=;i<;i++)
{
tmp*=i;
sum+=(double)/tmp;
printf("%d %.10g\n",i,sum);
}
//system("pause");
return ;
}

OpenJudge/Poj 1517 u Calculate e的更多相关文章

  1. poj 1517 u Calculate e

    u Calculate e Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 19465   Accepted: 11362   ...

  2. poj 1517 u Calculate e(精度控制+水题)

    一.Description A simple mathematical formula for e is e=Σ0<=i<=n1/i! where n is allowed to go t ...

  3. OpenJudge/Poj 1915 Knight Moves

    1.链接地址: http://bailian.openjudge.cn/practice/1915 http://poj.org/problem?id=1915 2.题目: 总Time Limit: ...

  4. OpenJudge/Poj 1004 Financial Management

    1.链接地址: http://poj.org/problem?id=1004 http://bailian.openjudge.cn/practice/1004 2.题目: 总时间限制: 1000ms ...

  5. OpenJudge / Poj 1044 Date bugs C++

    链接地址: Poj:http://poj.org/problem?id=1044 OpenJudge:http://bailian.openjudge.cn/practice/1044/ 题目: 总时 ...

  6. OpenJudge / Poj 2141 Message Decowding

    1.链接地址: http://poj.org/problem?id=2141 http://bailian.openjudge.cn/practice/2141/ 2.题目: Message Deco ...

  7. OpenJudge/Poj 2105 IP Address

    1.链接地址: http://poj.org/problem?id=2105 http://bailian.openjudge.cn/practice/2105 2.题目: IP Address Ti ...

  8. OpenJudge/Poj 2027 No Brainer

    1.链接地址: http://bailian.openjudge.cn/practice/2027 http://poj.org/problem?id=2027 2.题目: 总Time Limit: ...

  9. OpenJudge/Poj 2013 Symmetric Order

    1.链接地址: http://bailian.openjudge.cn/practice/2013 http://poj.org/problem?id=2013 2.题目: Symmetric Ord ...

随机推荐

  1. POJ-3017 Cut the Sequence DP+单调队列+堆

    题目链接:http://poj.org/problem?id=3017 这题的DP方程是容易想到的,f[i]=Min{ f[j]+Max(num[j+1],num[j+2],......,num[i] ...

  2. 大家AK杯 灰天飞雁NOIP模拟赛题解/数据/标程

    数据 http://files.cnblogs.com/htfy/data.zip 简要题解 桌球碰撞 纯模拟,注意一开始就在袋口和v=0的情况.v和坐标可以是小数.为保险起见最好用extended/ ...

  3. 用Quartus II 建立一个工程模板,以后新建工程时无需再配置参数

    以前用Quartus II 每次新建工程时,都要设置工程名,选择工程路径,选择芯片型号等等,好麻烦呀!可不可以建一个工程模板,以后新建工程时直接改相应文件名就可以呀!后来我一琢磨,感觉也不是不可以.因 ...

  4. Mac 解决SSH登录服务器终端乱码

    一.Mac自带的终端 ssh 连接Linux 乱码,可用如下方法解决 终端 --> 偏好设置 --> 描述文件 --> 高级  --> 设为GBK 即可 二.secureCRT ...

  5. WinForm简单多国语言实现

    参考:http://minmin86121.blog.163.com/blog/static/4968115720119259151898/ http://www.cnblogs.com/hakuci ...

  6. jQuery EasyUI, datagrid, treegrid formatter 参数比较 row index

    如题: datagrid中,见官方文档: formatter function The cell formatter function, take three parameter:value: the ...

  7. SCVMM问题汇总

    1.在分配虚机到Hyper-V主机时,提示可用内存不足: 可能是虚机分配使用了动态内存,动态内存的最大值太大导致,将其改为固定内存大小即可.

  8. nginx模块编程之获取客户ip及端口号

    ngx_request_t结构体中有一个connection定义,该定义指向一个ngx_connection_t的结构体: 结构体定义如下: struct ngx_connection_s { voi ...

  9. [React Native] Basic iOS Routing -- NavigatorIOS

    Inside the app component, we use NavigatiorIOS to render the compoent: class githubnotetaker extends ...

  10. [AngularJS + Webpack] require directives

    direictives/index.js: module.exports = function(ngModule) { //register all the directives here requi ...