NEED help with TLE. Is my approach correct?

Revision en1, by ApaarGulati, 2024-07-12 08:48:21

HI. I am a beginner in CP. and know only python. While solving the given problem https://codeforces.com/contest/1992/problem/C i was able to write the given code 269990236. but i got a TLE on test 5. i looked at the tutorial and found that my way of thinking and the tutorial's approach were the same. But i am still not sure if the orders of the 'numbers in the middle' matters or not. can someone please look into my code and tell if what i am doing with 'the numbers in the middle' is ok?

link to tutorial: https://youtu.be/9Vv2ZukG1CM?t=2685

also, if his and my methods are the same, am i getting TLE just because of python? or is my method just longer than his is?

Tags need help, i need help, tle

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English ApaarGulati 2024-07-12 08:48:21 732 Initial revision (published)