Guest User

Untitled

a guest
Apr 8th, 2017
856
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private static void initFactors() {
  2.         Arrays.fill(factors, 0, MAX, 1);
  3.  
  4.         int x= (int) Math.sqrt(MAX);
  5.        
  6.         for (int i = 2; i<=x ; i++) {
  7.  
  8.             for (int j = i; j < MAX; j += i) {
  9.  
  10.                 if ((j%i)==0)
  11.                     factors[j]++;
  12.             }
  13.         }
  14.     }
RAW Paste Data