← 返回 microsoft 的题目列表Python Recursion Problem
类型:online_judge
Implement a recursive function that takes a positive integer and returns its factorial. The requirements and test cases are as follows:
Input: 5
Output: 120
Input: 0
Output: 1
Input: 1
Output: 1
Input: 10
Output: 3628800
Input constraints: The input integer is between 0 and 20.
Example
Input
5