1012: 求Sn=1!+2!+3!+4!+5!+…+n!
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:3
Solved:3
Description
求Sn=1!+2!+3!+4!+5!+…+n!之值,其中n是一个数字。
Input
n
Output
和
Sample Input Copy
5
Sample Output Copy
153
HINT
n的取值比较大,Sn需要定义成long long型,输出使用%lld
如果使用VC6调试,Sn定义成__int64,输出使用%I64d,提交时记得改回来。
如果使用VC6调试,Sn定义成__int64,输出使用%I64d,提交时记得改回来。