title: Number Unique Rectangles Formed Using N Unit Squares
signature: number_unique_rectangles_formed_using_n_unit_squares <- function(n) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(n, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(n), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          34L, 
          66L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          49L, 
          104L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          41L, 
          83L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          17L, 
          28L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          67L, 
          151L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          38L, 
          76L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          59L, 
          128L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          64L, 
          144L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          61L, 
          135L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          58L, 
          127L
      )))
  
  }
  
  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;
  }