Welcome   HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online
Home
FAQs
Problem Set
Practices
Online Contests
Major Exercises
OI Special
Judgement
Submit
Online Status
User Ranklist
Users
Register new
Login
Web Links
Hunan Normal University
College of Information Science and Engineering
求自然对数的底e
Time Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:32768KB
Total submit users: 19, Accepted users: 18
Problem 11605 : No special judgement
Problem description
  计算完π,来计算一下自然对数的底e吧。这里有一个简单的公式:
e= 1/0! + 1/1! + 1/2! + 1/3! + …

Input
  输入有若干行,每行一个非负整数n,表示输出e的小数位数,n小于等于12。n等于-1时,测试结束。

Output
  对每个输入(-1除外),输出对应小数位数的e,四舍五入。

Sample Input
2
3
-1
Sample Output
2.72
2.718
Submit   Clarifications   Judge Status  Problems  Ranklist 

HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online, Version 2010.5.5.final.
Web visits:2141 today,16258868 total, since 2010-05-07