a lot of people have solved this one , my output is fine for all the test cases i know of can someone tell me the error please
here's the code
code removed after ac
8 slices, 4 are 1/4, 4 are 3/4. Your code outputs 5, right?
yes , my method was wrong thanx
could somone please tell how to approach the problem?
There is nothing special about that problem - just do it.If that doesn't help: Buy some pizzas, invite some friends and then try it ...
shouldn't 5 be the answer in this case? i am also getting WA .Here is my code , i have tried many test cases :
Removed after AC
Yes. The OP was returning 6.
but i am getting 5 , and have tried out other cases also , still getting WA , could you please tell the mistake in my code( posted above)
After rejudge there is only 1 AC, previously there were 30+.Nice!
Fixing seems to be in progress ...
still getting WA
there are51 ac after rejudge
4 3/4 3/4 3/4 3/4
The correct answer is 5. Read the problem statement.
thanks, i modified the code as below, still WA
Are you even trying? Think about the order in which you are doing things here. This is not a difficult problem If you plan.
thanks a ton again leppy , got AC
hi ppl ...i tried pizza and here s my code...it works well for all testcases...but still getting WA...help me plz...thx in advance
....here s my code
Updated code in a later post
Welcome to the forum!
You've missed a possibility. Take a look over it carefully and think about all of the possible situations.
plz help me.... i'm getting WA repeatedly.. i think my code works for all test cases u have mentioned
You can't greedily assign the slices to a pizza like this. If you do, you waste too much pizza. Think about what you're doing.