Last 2 test cases are giving wrong answer
@chiraggaur45
Your logic is correct. Just start cnt with 1 and change line 11 to if((paint+(t*l[i]))>mid).
@chiraggaur45
Your logic is correct. Just start cnt with 1 and change line 11 to if((paint+(t*l[i]))>mid).