Getting WA repeatedly. Can’t find the error in my logic. Can anyone Help??
check for input 0 0 0 0
its a tricky case of this question ,i guess… answer should be 0 right? as he’s not wasting anything…
Have you tried using C++?
No, I dont’t think language is a problem here. The only difference between my code and the accepted ones seems to be in the ratio line http://qr.ae/mK44O. But still I dont find anything wrong in my logic of taking ratios
I can’t find anything wrong with your logic. Someone must answer this question. But I would like to point out one thing:
b+=max-b; does nothing but assigning max to b. Same for b,b,b.
Yeah I knew that before…but still can’t find anything wrong
can anyone help tried many test cases
lol…thanks mate such a bad mistake on my part of not checking the boundary cases.
but one thing… after adding this tricky case i still didn’t got a AC
You can use this Solution for reference.
And can you also look into