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

Shows wrong Answer for Guessing Game problem

$
0
0
//CODE DELETED

I wrote the above code, i solved it mathematically and then came out to the conclusion that we do not need gcd for this question if we frame it like this. Anyone can help...?

Compile this in c++ 4.8.1 in ideone.com once and run the test cases, it gives correct answers.


Viewing all articles
Browse latest Browse all 40121

Trending Articles



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