title: Number Unique Rectangles Formed Using N Unit Squares
signature: def numberUniqueRectanglesFormedUsingNUnitSquares(n: Int) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: Int , expected: Int): Boolean = {
      actual.toString == expected.toString
  }
  
  def driver(n: Int, expected: Int): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(n),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        34, 
        66    
      )}")   
  
  
      println(s"TEST-1...${driver(
        49, 
        104    
      )}")   
  
  
      println(s"TEST-2...${driver(
        41, 
        83    
      )}")   
  
  
      println(s"TEST-3...${driver(
        17, 
        28    
      )}")   
  
  
      println(s"TEST-4...${driver(
        67, 
        151    
      )}")   
  
  
      println(s"TEST-5...${driver(
        38, 
        76    
      )}")   
  
  
      println(s"TEST-6...${driver(
        59, 
        128    
      )}")   
  
  
      println(s"TEST-7...${driver(
        64, 
        144    
      )}")   
  
  
      println(s"TEST-8...${driver(
        61, 
        135    
      )}")   
  
  
      println(s"TEST-9...${driver(
        58, 
        127    
      )}")   
  
  }
  
source_py: def number_unique_rectangles_formed_using_n_unit_squares(n):
      ans = 0
      for length in range(1, (int(math.sqrt(n)) + 1)):
          height = length
          while ((height * length) <= n):
              ans += 1
              height += 1
      return ans
source_cpp: int number_unique_rectangles_formed_using_n_unit_squares(int n) {
    int ans = 0;
    for ( int length = 1;
    length <= sqrt ( n );
    ++ length ) for ( int height = length;
    height * length <= n;
    ++ height ) ans ++;
    return ans;
  }