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.

TIME AND MEMORY LIMITS (Python)

  • Time: 4s on a 1GHz machine.
  • Memory: 1,000 KB.

EXAMPLE

input:

10

output:

3628800

Source: https://www.france-ioi.org. Created by : Arthur Charguéraud.