Anyone know why this code is wrong CodeChef: Practical coding for everyone?
not sure but I’ve got WA in 3rd test case too. @prakhar_87 could you reveal the third test case.
my soln : CodeChef: Practical coding for everyone
damn it. I tried by luck change tower = 0 to tower = 1 at the beginning and pass in my code CodeChef: Practical coding for everyone
did’nt get it , can you please provide me the 3rd test case that was wrong and how did you fix that issue.
I didn’t figure out which case failed in mine, but a luck pass. but i just figure out yours
you case failed this
1
1 0
this should be 0 not 1
For M = 0 , output will always be 0, since you can’t perform any operation on the blocks present in the inventory
ooff i regret it now, such a silly yet a grave mistake
I guess your code won’t work for X = 1 and M = 1. Output should be 1 since we can build tower of height 1 in 1 operation @henrychen222
thanks!