Type: Default 1000ms 64MiB

n! 之和

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

題目描述

Sn=1!+2!+3!+4!+5!++n!S_n=1!+2!+3!+4!+5!+…+n! 之值,其中 nn 是一個數字, nn 不大於 1010

輸入格式

nn

輸出格式

Samples

5
153

2025-2026年度 PCOI 第二季

Not Attended
Status
Done
Rule
IOI
Problem
9
Start at
2026-2-28 14:30
End at
2026-2-28 16:30
Duration
2 hour(s)
Host
Partic.
41