title: Count Factorial Numbers In A Given Range
signature: class Solution {
  
      public Integer countFactorialNumbersInAGivenRange(Integer low, Integer high) {
source_py: def count_factorial_numbers_in_a_given_range(low, high):
      fact = 1
      x = 1
      while (fact < low):
          fact = (fact * x)
          x += 1
      res = 0
      while (fact <= high):
          res += 1
          fact = (fact * x)
          x += 1
      return res
source_cpp: int count_factorial_numbers_in_a_given_range(int low, int high) {
    int fact = 1, x = 1;
    while ( fact < low ) {
      fact = fact * x;
      x ++;
    }
    int res = 0;
    while ( fact <= high ) {
      res ++;
      fact = fact * x;
      x ++;
    }
    return res;
  }
question_info.extension: java
question_info.entry_fn_name: countFactorialNumbersInAGivenRange
question_info.entry_cls_name: Solution
question_info.test_list: [{"idx": 0, "outputs": 0, "inputs": {"low": 57, "high": 79}}, {"idx": 1, "outputs": 0, "inputs": {"low": 57, "high": 21}}, {"idx": 2, "outputs": 0, "inputs": {"low": 31, "high": 37}}, {"idx": 3, "outputs": 0, "inputs": {"low": 62, "high": 87}}, {"idx": 4, "outputs": 0, "inputs": {"low": 49, "high": 98}}, {"idx": 5, "outputs": 0, "inputs": {"low": 82, "high": 76}}, {"idx": 6, "outputs": 0, "inputs": {"low": 31, "high": 45}}, {"idx": 7, "outputs": 2, "inputs": {"low": 5, "high": 52}}, {"idx": 8, "outputs": 0, "inputs": {"low": 76, "high": 43}}, {"idx": 9, "outputs": 0, "inputs": {"low": 55, "high": 6}}]
question_info.test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(Integer low, Integer high, Integer expected){
          try{
              Driver driver = new Driver();
              if (driver.run(low, high,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution(57, 79, 0);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(57, 21, 0);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(31, 37, 0);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(62, 87, 0);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution(49, 98, 0);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution(82, 76, 0);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution(31, 45, 0);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution(5, 52, 2);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution(76, 43, 0);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution(55, 6, 0);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(Integer low, Integer high, Integer expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(low, high),expected);
      }
      
      public boolean validateSolution(Integer actual, Integer expected){
          return actual.equals(expected);
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: java __FILENAME__