#T732. 求阶乘和
求阶乘和
Description
Calculate N! = 1 × 2 × ... × N
Example: 5! = 1 × 2 × 3 × 4 × 5 = 120
Write a program to compute the sum of factorials: 1! + 2! + 3! + ... + N!.
Input Format
The input consists of one line containing a single integer n (1 ≤ n ≤ 10).
Output Format
The output consists of exactly one line (which means there should be a newline character at the end), containing a single integer.
3
9
译文
CodesOnline