title: Number Unique Rectangles Formed Using N Unit Squares
signature: function number_unique_rectangles_formed_using_n_unit_squares(n)
test_code: using Printf
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  function validate_solution(actual, expected)
      return actual == expected
  end
  
  function driver(n, expected)
      try
  
          if validate_solution(PLACEHOLDER_FN_NAME(n), expected)
              return "PASSED";
          end
          return "FAILED";
      catch exception_obj
          return string(Base.typename(typeof(exception_obj)).wrapper);
      end
  end
  
  function main()
      
      result = driver(34, 66);
      @printf("TEST-0...%s\n",result);
      
      result = driver(49, 104);
      @printf("TEST-1...%s\n",result);
      
      result = driver(41, 83);
      @printf("TEST-2...%s\n",result);
      
      result = driver(17, 28);
      @printf("TEST-3...%s\n",result);
      
      result = driver(67, 151);
      @printf("TEST-4...%s\n",result);
      
      result = driver(38, 76);
      @printf("TEST-5...%s\n",result);
      
      result = driver(59, 128);
      @printf("TEST-6...%s\n",result);
      
      result = driver(64, 144);
      @printf("TEST-7...%s\n",result);
      
      result = driver(61, 135);
      @printf("TEST-8...%s\n",result);
      
      result = driver(58, 127);
      @printf("TEST-9...%s\n",result);
      
  end
  
  main()
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;
  }