You are viewing a single comment's thread. Return to all comments →
This range doesn't make any sense.
After the middle you don't need to check all values. You should have taken the range(1, n//2+1).
And the beginning value of summ is n. Because the number can always be divided by itself.