#T581. 阶乘和
阶乘和
Description
Given a positive integer n (n <= 100), let s = 1! + 2! + 3! + ... + n!. Here, '!' denotes the factorial, where n! = 1 × 2 × 3 × ... × (n-1) × n. For example, 3! = 1 × 2 × 3 = 6. Please implement a program that takes a positive integer n as input and outputs the computed value of s.
Input Format
A positive integer n.
Output Format
The computed result s.
4
33
The translation of "CodesOnline" remains the same in English, as it is already an English term. However, if you'd like a more descriptive or expanded version, you could consider:
- CodesOnline (direct translation, retains the original name)
- Online Code Repository (if referring to a platform for code)
- Coding Online (if referring to the activity of writing code online)
Let me know if you'd like any adjustments based on the specific context!