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 1579 Function Run Fun

    简单动态规划,详细代码网上有!

  2. NULL指针 Void* 和野指针

    在C和C++的语言中常常有这几个概念: NULL指针.空指针.Void *指针.野指针(Wild Pointer)甚至垂悬指针(Dangling Pointer). 1.NULL指针,一般用于指向一个 ...

  3. poj 1144 Network【双连通分量求割点总数】

    Network Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 11042   Accepted: 5100 Descript ...

  4. iOS网络编程(三) 异步加载及缓存图片---->SDWebImage

    @SDWebImage提供一个UIImageView的类别以支持加载来自网络的远程图片.具有缓存管理.异步下载.同一个URL下载次数控制和优化等特征. @SDWebImage的导入1.https:// ...

  5. requirejs 打包参数

    https://github.com/requirejs/r.js/blob/master/build/example.build.js

  6. OceanBase里面的rowkey是什么概念,是由哪些要素构成的?

    Rowkey是OceanBase诞生之初就引入的概念,最终被确立是在OceanBase 0.3. 为了便于理解,不妨把OceanBase想象成一个Key-Value系统,Rowkey就是Key,Val ...

  7. 成员方法的this指针

    1.我们知道成员方法中,有个隐式的this常量指针.考虑,Derived继承的成员方法中this指针的表面类型是什么?子类重写的虚方法中this指针的表面类型是什么? 2.Derived继承的方法,就 ...

  8. OpenOffice的安装与启动

    一.安装openOffice1.使用tar -xzvf OOo_3.2.0_LinuxIntel_install_wJRE_en-US.tar.gz解压缩后,会得到OOO320_m12_native_ ...

  9. [Javascript] Implement zip function

    1. Use a for loop to traverse the videos and bookmarks array at the same time. For each video and bo ...

  10. [AngularJS] angular-formly: expressionProperties

    angular-formly provides a very simple API to dynamically change properties of your field (like disab ...