Timelimit error in Form Biggest Number


Any suggestions as of how i can reduce its time complexity