TouchStone
  Please Login
Login Sign Up
 Homepage  Problem Set  Examinations  Submissions  Discussions  Statistics
  • Home
  • Problem Set
  • P5106
  • Problem
  • P5106阶乘求和
    Limits : Time Limit : - MS   Memory Limit : - KB
    Judgment Tips : 1s,64m
    Description

    给你一个正整数n(n<=20),请你计算: 1!+2!+3!+ … +n!

    Input Format

    一个整数n

    Output Format

    一个整数,表示计算结果

    Sample Input 1

    5

    Sample Output 1

    153

    Sample Input 2

    10

    Sample Output 2

    4037913