Tổng giai thừa


Submit solution

Points: 1
Time limit: 1.0s
Memory limit: 1G

Problem type

Cho số nguyên $N$. Hãy tính tổng: $1!+2!+...+N!$.

Dữ liệu

  • Một dòng duy nhất chứa số nguyên $N \ (0<N\le10^5)$.

Kết quả

  • Kết quả bài toán sau khi chia lấy dư cho $10^9+7$.

Ví dụ

Ví dụ 1

input

5

output

153

Comments

There are no comments at the moment.