UVa 10368
From Algorithmist
[edit] 10368 - Euclid's Game
http://acm.uva.es/p/v103/10368.html
[edit] Gotchas
The input number may be greater than 2^31.
http://acm.uva.es/p/v103/10368.html
The input number may be greater than 2^31.