You are viewing a single comment's thread. Return to all comments →
My solution, with Streams
class MyCalculator implements AdvancedArithmetic{ @Override public int divisor_sum(int n){ return java.util.stream .IntStream.range(1, n+1) .filter(x->(n%x==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 →
My solution, with Streams