Doubt in painter problem

sir why is the test cases failing for this code the code is working fine still???

hello @tejasddongare
a) use long long in place of int to avoid overflow

b) search space
start=max elemnt in array * time
end=summation of array * time

c) check output forrmat, u r asked to take modulo of answer and then print

sir all variables are done long long int
start=max element*time
end=summation of array * time
modulo also still the test cases are failing why sir???


check ur updated code.

sir got it thnxs for clearing

i have made these changes in ur code.