Little chef sums september challenge (time limit exceeded )

QUESTION DELETED

You shouldn’t be sharing code during the contest, please delete your question otherwise there’s possibility you can get disqualified