Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static void initFactors() {
- Arrays.fill(factors, 0, MAX, 1);
- int x= (int) Math.sqrt(MAX);
- for (int i = 2; i<=x ; i++) {
- for (int j = i; j < MAX; j += i) {
- if ((j%i)==0)
- factors[j]++;
- }
- }
- }
Add Comment
Please, Sign In to add comment