package divisors_example;

import popcorn.*;

public class MaximalSumOfDivisors {
    public static void main(String[] args) {
       if (args.length!=2) {
           System.out.println("usage: java MaximalSumOfDivisors <from> <till>");
           return;
       }

       int n1 = Integer.parseInt(args[0]);
       int n2 = Integer.parseInt(args[1]);
       new popcorn.benchmark.DistributerTracer().start();
       MaxSumOfDivisorsComputation computation =
          new MaxSumOfDivisorsComputation(n1,n2);
       computation.go();
       Computation.collectAll();
       System.out.println("The number with the maximal sum-of-divisors is "+
          computation.getMaxArg());
    }
}

