http://acm.hdu.edu.cn/showproblem.php?pid=1012

简单套公式

# include <stdio.h>

double Factorial(double num)
{
if(num == 0 || num == 1)
return 1;
return Factorial(num - 1) * num;
} int main ()
{
double Ans[11];
int i; printf("n e\n- -----------\n0 1\n1 2\n2 2.5\n"); Ans[2] = 2.5;
for(i = 3; i <= 9; i++)
{
Ans[i] = Ans[i - 1] + (1 / Factorial(i));
printf("%d %.9lf\n",i, Ans[i]);
} return 0;
}

  

HDOJ-1012 u Calculate e(水)的更多相关文章

  1. hdoj 1012 u Calculate e

    u Calculate e Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Tot ...

  2. HDU 1012 u Calculate e(简单阶乘计算)

    传送门: http://acm.hdu.edu.cn/showproblem.php?pid=1012 u Calculate e Time Limit: 2000/1000 MS (Java/Oth ...

  3. hdu 1012:u Calculate e(数学题,水题)

    u Calculate e Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Tot ...

  4. HDU 1012 u Calculate e【暴力打表,水】

    u Calculate e Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Tot ...

  5. HDOJ(HDU) 2139 Calculate the formula(水题,又一个用JavaAC不了的题目)

    Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) 看到这个时间,我懵逼了... 果然,J ...

  6. HDOJ 2317. Nasty Hacks 模拟水题

    Nasty Hacks Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Tota ...

  7. LightOJ 1012 简单bfs,水

    1.LightOJ 1012  Guilty Prince  简单bfs 2.总结:水 题意:迷宫,求有多少位置可去 #include<iostream> #include<cstr ...

  8. ACM YTU 1012 u Calculate e

    u Calculate e Problem Description A simple mathematical formula for e is where n is allowed to go to ...

  9. HDOJ/HDU 2560 Buildings(嗯~水题)

    Problem Description We divide the HZNU Campus into N*M grids. As you can see from the picture below, ...

  10. HDOJ(HDU) 1859 最小长方形(水题、、)

    Problem Description 给定一系列2维平面点的坐标(x, y),其中x和y均为整数,要求用一个最小的长方形框将所有点框在内.长方形框的边分别平行于x和y坐标轴,点落在边上也算是被框在内 ...

随机推荐

  1. RedHat9通过Host-only配置网络连接

    首先我用的是VMware8版本安装的RedHat9.VMware给我们提供了三种让虚拟机里的安装系统连上网的方式.分别是Host-only,Bridge,NAT.我要讲的是Host-only. 第一步 ...

  2. hdu 4504 威威猫系列故事——篮球梦_简单dp

    题目链接 题意:你现在分数为a,对方分数为b,你比赛还有n分钟,每次进攻需要15分钟,现在你先进攻,每次进攻可以得1或2或3,对方每次进攻得一分,问超过对方分数有多少种打法 思路:因为情况太多要用__ ...

  3. [RxJS] Reactive Programming - What is RxJS?

    First thing need to understand is, Reactive programming is dealing with the event stream. Event stre ...

  4. [Regular Expressions] Find the Start and End of Whole Words

    Regular Expression Word Boundaries allow to perform "whole word only" searches within our ...

  5. win7 AnkhSVN 安装报错

    重装系统后,需要安装AnkhSVN,结果一直报如下错误 An error occurred during the installation of assembly"Microsoft.VC8 ...

  6. C#设置程序自启动

    public static void SetAutoRun(string fileName, bool isAutoRun)        {            RegistryKey reg = ...

  7. SQLSERVER执行时间统计工具SQLQueryStress

    有时候需要检测一下SQL语句的执行时间,相信大家都会用SET STATISTICS TIME ON开关打开SQLSERVER内置的时间统计 SET STATISTICS TIME ON 不过这款小工具 ...

  8. Comparator TreeSet

    package study; import java.util.Comparator;import java.util.TreeSet; public class TreeSetTest { publ ...

  9. codeforces 340D Bubble Sort Graph(dp,LIS)

    转载请注明出处: http://www.cnblogs.com/fraud/          ——by fraud  Bubble Sort Graph Iahub recently has lea ...

  10. 关于char/varchar(n)中n的探究:字符数or字节数

    [问题来源]将设计的数据库表展示的时候,yu哥问我,你的那个top_info字段定义的类型是varchar(100),为什么是100呢,这100的长度能存多少个中文? 当时的想法就是,这个100能存多 ...