Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

GAMES problem on spoj

$
0
0

Hi, 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.

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;

}


Viewing all articles
Browse latest Browse all 39796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>