Skip to content

Instantly share code, notes, and snippets.

@michaelorionmcmanus
Created February 17, 2012 22:04
Show Gist options
  • Save michaelorionmcmanus/1855707 to your computer and use it in GitHub Desktop.
Save michaelorionmcmanus/1855707 to your computer and use it in GitHub Desktop.
__int64 number = 317584931803;
int divisor = 2;
while (number > 1) {
if (0 == (number % divisor)) {
number /= divisor;
divisor--;
}
divisor++;
}
// [i]divisor[/i] is the answer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment