Time limit in Python

Правка en1, от ADIS1, 2020-10-26 23:05:10

Hello, everyone. I have a problem with solving this task.

So, the main problem is — time limit. My code just can't pass tests, because tests be like: "let's go 500 lines with 500 symbols each and you gonna run it". This is my latest try on solving this task. As you can see, I'm using Python via functions and sys to decrease memory usage and speed up code, but it's not working fine.

Don't tell me: 'Use C++, Python is very slow'. No, look at this solve. Why it's working? Maybe someone who codes on Python can help with my problem.

Thanks for any advices.

Теги #newbie, #python, #timelimit

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский ADIS1 2020-10-26 23:05:10 779 Initial revision (published)