How to detect overflow in a function when n becomes greater than 64 bits?
uint64_t col(uint64_t n)
{
int count = 0;
while (n != 1) {
if (n % 2 == 0) {
n /= 2;
} else {
n = (3 * n) + 1;
}
count++;
}
return count;
}