You are viewing a single comment's thread. Return to all comments →
Again the most elegant solution is a one liner:
java.util.stream.IntStream.rangeClosed(1,number) .filter(e -> number % e == 0) .sum();
Seems like cookies are disabled on this browser, please enable them to open this website
Java Interface
You are viewing a single comment's thread. Return to all comments →
Again the most elegant solution is a one liner: