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. ural 1748 The Most Complex Number 和 丑数

    题目:http://acm.timus.ru/problem.aspx?space=1&num=1748 题意:求n范围内约数个数最多的那个数. Roughly speaking, for a ...

  2. 细说Oracle数据库与操作系统存储管理二三事

    在上大学的时候,学习操作系统感觉特别枯燥,都是些条条框框的知识点,感觉和实际应用的关联不大.发现越是工作以后,在工作中越想深入了解,发现操作系统知识越发重要.在实践中结合理论还是不错的一种学习方法.自 ...

  3. MySQL开发中常用的查询语句总结

    1.查询数值型数据: SELECT * FROM tb_name WHERE sum > 100; 查询谓词:>,=,<,<>,!=,!>,!<,=>, ...

  4. 百度参投 Uber中国12亿美元融资已到账

    滴快车单单2.5倍,注册地址:http://www.udache.com/ 如何注册Uber司机(全国版最新最详细注册流程)/月入2万/不用抢单:http://www.cnblogs.com/mfry ...

  5. android ORMlite的应用

    ORMLite -轻量级的对象关系映射(ORM) 如果你需要在android中使用ORMLite 你需要进入官方网站http://ormlite.com/ 中下载 下载了这两个包以后,你还需要在对应的 ...

  6. qt学习笔记(五) QGraphicsPixmapItem与QGraphicsScene的编程实例 图标拖动渐变效果

    应大家的要求,还是把完整的project文件贴出来,大家省点事:http://www.kuaipan.cn/file/id_48923272389086450.htm 先看看执行效果,我用的群创7寸屏 ...

  7. 礼仪或许就是尊重的还有一个说法——leo鉴书61

    <Leo鉴书(第1辑)>已登陆百度阅读,今后还将不断更新,免费下载地址:http://t.cn/RvawZEx 礼仪从字面上就区分成"礼"和"仪"两 ...

  8. [Javascript] Ex: concatAll, map and filter

    concatAll: Array.prototype.concatAll = function() { var results = []; this.forEach(function(subArray ...

  9. 聊聊动画引擎 pop

    iOS可以通过CADisplayLink实现自定义动画引擎,pop就是基于此实现的,而且比原生Core Animation更强大好用.譬如当ViewController侧滑返回的时候,系统会将Core ...

  10. PPTP、L2TP、IPSec和SSLVPN的区别

    VPN (虚拟专用网)发展至今已经不在是一个单纯的经过加密的访问隧道了,它已经融合了访问控制.传输管理.加密.路由选择.可用性管理等多种功能,并在全球的信息安全体系中发挥着重要的作用.也在网络上,有关 ...