TLE Tilling Problem 2


I dont know any other approach.

@Kinjal
hello kinjal,
you forget to take modulo of ur answer .
rest of ur code is correct.
to pass all test cases u need to use dynamic programming

Why I need to take modulo?

@Kinjal
it is mentioned in output format
image

I am sorry, Bhaiya. I have just ignored that in the question when I read it. It’s not cool for me. Sorry.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

When I clicked on this link, it was said that the page is unable to found.

@Kinjal
some issue is there in feedback page

Okay. I’ll let you know if I do give feedback.
Thank You.