Could you humor a coding noob--how do you deal with utterly insane inputs like that?
At some point you can just refuse. Too many digits. Well time to quit with error.
You first ask if you really need to.
Arbitrary precision arithmetic (GMP, BigInteger, etc). Numbers can take arbitrary amounts of memory, instead of just a single machine word.
Crash and report an error.
At some point you can just refuse. Too many digits. Well time to quit with error.