I’s going through the following problem of spoj
http://www.spoj.com/problems/GAMES/ but when I submit the code, it showa Wrong Answer and I think there is no mistake in my code.
using namespace std;
int gcd(int a, int b)
if(b == 0)
return gcd(b, (a%b));
int a = fl*10000;
printf("%d\n", 10000/(gcd(a, 10000)));