#T529. 求阶乘和

求阶乘和

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 a single line containing one integer n (1 ≤ n ≤ 10).

Output Format

The output should consist of exactly one line (which means there should be a newline character at the end), containing a single integer.

3
9

译文

CodesOnline