GAMES problem on spoj

I’s going through the following problem of spoj 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);
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

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