1174 1!到n!的和


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 32M

Problem types
Allowed languages
C, C++, Java, Python

Description

求1!+2!+3!+4!+...+n!的结果。

Input

输入数据含有不多于50个的正整数n(1≤n≤12)。

Output

对于每个n,输出计算结果。每个计算结果应占独立一行。

Sample

Input

3 6

Output

9
873

Source: qianneng


Comments

There are no comments at the moment.