Big numbers and decimals
Read · 1 of 4
int has a limit
An int holds numbers up to about 2 billion (2,147,483,647). Go past that and the value "wraps around" into nonsense, without any error.
long long holds numbers up to about 9 × 10^18. In DSA, whenever sums or products can get big, use long long.