note
Anonymous Monk
Seems to me that this problem requires you to factor numbers. Factoring numbers is considered to be a really hard problem - it's what public key encryption makes secure. Noone knows a fast way to factor numbers (well, maybe someone does, but then, they have kept it a secret), so if you are going to have big numbers, the factoring will be the bottleneck.
481987
481987
-1