Painter problem


i am not able to pass the test cases

i suggest u use the t parameter at the end

it makes life simpler
ur logic seems fine but that t paramter is making it hard to track the problem

refer to this code