/v1/factorial
Factorial
Essayez-le en direct
10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.
Ça marche. Récupérez une clé API et utilisez-la dans votre projet.
Obtenez une clé APIExtraits de code
curl "https://api.oanor.com/combinatorics-api/v1/factorial" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/combinatorics-api/v1/factorial", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/combinatorics-api/v1/factorial");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/combinatorics-api/v1/factorial",
headers={"x-oanor-key": "oanor_test_..."}
)
Exemple de réponse
Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.
{
"data": {
"note": "n! = 1·2·3···n (0! = 1). Returned exactly as a string; the floating-point approximation is null once it exceeds ~1.8×10^308.",
"inputs": {
"n": 10
},
"factorial": {
"exact": "3628800",
"digits": 7,
"approximate": 3628800
}
},
"meta": {
"timestamp": "2026-06-05T11:30:32.029Z",
"request_id": "63d6cf92-61b6-4ef3-92ec-a2cb169b92c2"
},
"status": "ok",
"message": "Factorial",
"success": true
}