GAMES problem on spoj

Hi,
I’s going through the following problem of spoj
SPOJ.com - Problem GAMES but when I submit the code, it showa Wrong Answer and I think there is no mistake in my code.
#include <bits/stdc++.h>

using namespace std;

int gcd(int a, int b)
{
if(b == 0)
return a;

return gcd(b, (a%b));

}
int main()
{
int t;
scanf(“%d”, &t);
while(t–)
{
float fl;
scanf(“%f”, &fl);
int a = fl*10000;
printf(“%d\n”, 10000/(gcd(a, 10000)));
}

return 0;

}

Dont use float instead use a string to store the input
Also here is my code if u need any help KDHBUI - Online C++ Compiler & Debugging Tool - Ideone.com

why not float, I’m not getting please help.