TLE (title short bol rha hai btaao jii)

sir, i tried this valentine magic ques using TOP-DOWN DP and on submitting this i’m getting TLE
but when i see the EDITORIAL approach
they have used the same way(obviously there is only 1 way and they use the same top down DP approach but in C++)
and i’m doing on python

so i don’t why i’m getting TLE and editorialist code is getting all test cases passed inspite of doing the ques in same way.

hello @coding_daddy
sayad is question me python aur c++ ka time limit same rakha hua hai isliye tle aa raha hai.

python thodi slow language hai isilye uska time limit thoda jayda hona chaiye.

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.