I got am getting WR for this problem in testcase 33.
Input is :7 6 3
Output is:1/1
When I run this program in my computer for this input its shows correct output. But When i submit here it gives WR(shows output 4/3). I don't know why ? Anyone can help me about this. Here is my Submission.
I guess it is a eps issure and a compile dependent ... ... Always check eps and use the same compile as the platform will be a wise idea for the similar issure.
3286407 — I just added "cout<<endl;" to your submission and it now get WA12. What's wrong with it?
What are you doing here? You don't use 'j' in your code after this Oo
I just changed
to
and got Accepted. Can any one explain why?
It works cause it not the same k*0.9999999 to k*1
I think that it is because the type of the var "long"
But My Computer gives correct output for
this code.
I had the same problem and I switched from int to long long for some variables and got accepted.
It's really frustrating to get WA on a problem because of these kind of things.
Similar things happened to me on SPOJ in some problems where you can't use iostream because it's too slow, but you can't use stdio either because it's incredibly unreliable with long long's. Sometimes %I64d works while %lld doesn't, and sometimes it's the other way around. You never know what to do.