int numGood(int a, int b) { int count = 0; for(int k = a; k <= b; k++) { if(isGood(k)) { count++; } } return count; }