Prog Caml : Ecrire la fonction factorielle

Écrire une fonction factorielle qui renvoie le produit des n premiers entiers, où n est un paramètre.

Votre programme demandera à l'utilisateur un entier puis appellera cette fonction.

LIMITES DE TIEMPO Y MEMORIA (Python)

  • Tiempo: 4s sobre una máquina de 1GHz.
  • Memoria: 1,000 Kb.

EJEMPLO

entrada:

10

salida:

3628800

Source : https://www.france-ioi.org/ Creado por : Arthur Charguéraud.