Calcular factorial


Submit solution

Points: 1.9
Time limit: 1.0s
Memory limit: 64M

Author:
Problem type
Bucles simples
Category
Introduccio
Allowed languages
Bash, C Hashtag, Haskell, Java, Kotlin, PHP, Python

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

Comments


  • 0
    Anais  commented on Dec. 14, 2023, 1:58 p.m.

    miau


  • -4
    JouGhost  commented on Oct. 25, 2023, 5:45 p.m.

    el juego


  • -2
    chriwbrown  commented on Oct. 24, 2023, 4:11 p.m.

    ezz


  • -2
    AlanTeixido  commented on Oct. 23, 2023, 5:22 p.m.

    Ferran the Shark


  • 1
    DeividRopi31  commented on Oct. 20, 2023, 5:35 p.m.

    :)


  • -3
    ReyEspañol  commented on Oct. 12, 2023, 1:33 p.m.

    We have no enemies Torffin


  • 3
    hector  commented on Oct. 5, 2023, 6:38 p.m.

    miau guau


  • 5
    Sergio22  commented on Sept. 28, 2023, 4:54 p.m.

    I belong to Jesus


  • -13
    marc  commented on Sept. 25, 2020, 8:26 p.m.

    This comment is hidden due to too much negative feedback. Click here to view it.