Huge Factorial

Factorials grow into very large numbers quickly, so the result is returned as a string. The function extra_long_factorials receives an integer n and calculates n!, the product of all whole numbers from 1 to n. Remember that the factorial of 0 is 1.

Примеры

Ввод
5
Вывод
"120"
Ввод
0
Вывод
"1"
Ввод
1
Вывод
"1"

Нужно реализовать

def extra_long_factorials(n: int) -> str:

Теги

mathrecursion
PostgreSQLv16

Your code output will appear here

Visible tests
1
Input
5
Expected"120"
2
Input
0
Expected"1"
3
Input
1
Expected"1"
4
Input
10
Expected"3628800"
5
Input
25
Expected"15511210043330985984000000"
6
Input
-100
Expected"1"
Focus radio
Paused · SomaFM · Fluid