We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
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.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 19: Interfaces
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.