public int getScore(int a, int b) {
    int total = 0;
    for (int prime : primes) {
      if (prime > a) {
        break;
      }
      int val = prime;
      while (val <= a) {
        if (val > b) {
          int temp = val;
          while (temp % prime == 0) {
            total++;
            temp /= prime;
          }
        }
        val += prime;
      }
    }
    
    return total;
  }