Calcular factorial
Enviar solució
Bash, C#, Haskell, Java, Kotlin, PHP, Python
Punts:
3
Temps Límit:
1.0s
Límit de memòria:
64M
Autor/a:
tipus del problema
Bucles simples
Categoria
Llenguatges permesos
Anem a fer operacions matemàtiques. Donat un nombre enter n >= 0 calcula el seu factorial (n!). Ajuda : si n> 2 , n! = n (n-1) (n-2) …. 1 0! = 1 i 1! = 1
Entrada
La primera línia indica els casos de prova a considerar Cada cas compta amb 1 linea amb un número enter positiu
Sortida
Per cada cas de prova caldrà mostrar el resultat de n!
Exemple d'Entrada
3
2
6
4
Exemple de Sortida
2
720
24
Comentaris
chamorro prime
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣤⣤⣤⣴⣦⣤⣤⣤⣤⣤⣄⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⣤⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⢀⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠛⠛⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠋⠉⠉⠁⠀⠀⠀⠀⠀⠀⠈⠙⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⢸⣿⣿⣿⣿⡿⠛⠛⠛⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠘⢻⣿⣿⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⣿⡟⠀⠀⠀⣀⠀⠀⠀⡐⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠿⠿⣿⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⣿⡇⢀⠄⠉⣀⡀⢉⠁⣠⣶⣶⣶⣶⣤⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣿⣿⣿⣿⣿⣿⡿⢁⠔⠀⠀⠪⢂⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠹⡇⢀⣴⣿⡿⢀⠀⠀⠉⠛⠛⠛⠿⣿⣿⣿⣿⣿⣿⣦⠀⡀⠀⠀⠀⠀⠀⢹⣿⣿⣿⡿⠋⠀⠁⠀⠀⠀⠀⢻⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⢀⣼⣿⣿⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⠀⠀⠀⢉⠡⢀⡀⠀⠀⠀⠀⠀⠸⣿⣿⡟⠀⠀⠀⠐⠂⠀⠀⡠⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⣾⣿⡿⠛⠐⠂⠤⡐⠄⠀⢠⠀⠀⠊⠶⠛⠛⠛⠊⠥⠄⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠀⠀⠀⠇⢸⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⢹⡏⠀⣀⣴⠶⠶⢾⠰⠀⠀⠀⠀⠀⠠⠤⠄⠂⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠘⠊⢸⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠣⡞⢟⠁⢀⠠⢘⡼⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⠁⠀⠀⢀⠆⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⡹⠂⠀⠀⡐⠁⠆⠀⠀⠀⠀⠀⠀⠀⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣠⠃⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⢠⠁⠀⠀⡌⠀⡘⠀⠀⠀⠀⠀⠀⠀⢱⠀⠀⠑⢄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠁⢸⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠈⠀⠀⢰⠀⢈⢃⡀⠀⢠⠐⠀⠀⠀⠁⠀⠀⠀⠀⠑⠄⠀⠀⠀⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⣼⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠘⡀⠀⠀⠄⠀⠉⠁⠀⠀⠀⠀⣀⠠⠄⢀⣀⣤⣀⠀⠈⡄⡄⠀⢡⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⠀⣿⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠐⡄⠀⡀⠀⢀⠤⠒⣈⣩⡤⢶⠞⠟⢙⠉⡋⣛⣿⡆⠀⡇⠀⡈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠈⢄⠐⢄⠠⣿⣿⡋⡁⢁⣀⣤⣷⣾⣿⣿⣿⢿⠃⠀⡇⢠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠈⠢⡀⠑⡜⢜⠻⣿⣿⡿⢻⣻⠹⠕⠋⢁⠊⠀⠀⠇⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠈⠢⠈⢄⠢⢀⣉⡁⠁⠀⠤⠐⠊⠀⠀⠀⠠⠰⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠂⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⡈⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠔⢁⠁⠀⠀⠀⠀⠀⠀⠀⠀⢀⠔⠀⠀⠀⠠⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠃⠀⠀⠀⠀⠀⠘⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢣⢀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⢄⠀⠀⠀⠀⠀⢀⠠⠔⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⡄⠱⡀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡰⠫⡁⠒⢄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⡄⠈⠐⠠⡀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡔⠀⠀⢡⠀⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡅⠀⠀⠀⠈⠰⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠀⠀⠀⠀⠡⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀
miau
This comment is hidden due to too much negative feedback. Click here to view it.
This comment is hidden due to too much negative feedback. Click here to view it.
This comment is hidden due to too much negative feedback. Click here to view it.
:)
This comment is hidden due to too much negative feedback. Click here to view it.
miau guau
I belong to Jesus
This comment is hidden due to too much negative feedback. Click here to view it.