Skip to content · ⁨Lompat ke konten⁩

Factorial (mind the size) · ⁨Faktorial (perhatikan ukurannya)⁩

English

Factorial (mind the size)

n! is 1 × 2 × … × n, and 0! is 1. It grows fast — 20! is over two billion billion — so the method returns a long, not an int, or the answer would overflow. Multiply from 2 up to n.

Bahasa Indonesia

Faktorial (hati-hati dengan ukurannya)

n! adalah 1 × 2 × … × n, dan 0! adalah 1. Nilainya tumbuh sangat cepat — 20! melebihi dua miliar miliar — sehingga metode ini mengembalikan sebuah long, bukan sebuah int, agar tidak terjadi overflow. Kalikan dari 2 hingga n.

Log in or create account · ⁨Masuk atau buat akun⁩

IGCSE, A-Level & AP