Tính tổng S2


Submit solution

Points: 1 (partial)
Time limit: 1.0s
Memory limit: 542M

Problem type

Viết hàm tính tổng:

s=1!2!+3!+...+(1)n+1n!

Nhập vào một số nguyên dương n, in ra màn hình tổng s theo công thức trên.

Input 1
Copy
3
Output 1
Copy
5
Input 2
Copy
7
Output 2
Copy
4421

Comments

There are no comments at the moment.