TLE

Правка en1, от toTalmeSS, 2016-11-08 09:08:13

Hello... I got TLE on the following problem. I myself found out that it's taking an awful amount of time for inputs with eight or nine digits! How can I optimize my code and reduce the complexity? I tried to devise a formula, but couldn't go anywhere. I can still try if any of you could tell me how to approach...

Thanks in advance.

Problem link My code

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский toTalmeSS 2016-11-08 09:08:13 455 Initial revision (published)