title: Number Unique Rectangles Formed Using N Unit Squares
signature: fun numberUniqueRectanglesFormedUsingNUnitSquares(n: Int): Int {
test_code: package main
  
  import kotlin.text.*
  import kotlin.math.*
  
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  fun validateSolution(actual:Int, expected:Int):Boolean{
    return actual.equals(expected)
  }
  fun driver(n: Int, expected:Int):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(n), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver(34, 66)
      println("TEST-0...${result}")
      
      result = driver(49, 104)
      println("TEST-1...${result}")
      
      result = driver(41, 83)
      println("TEST-2...${result}")
      
      result = driver(17, 28)
      println("TEST-3...${result}")
      
      result = driver(67, 151)
      println("TEST-4...${result}")
      
      result = driver(38, 76)
      println("TEST-5...${result}")
      
      result = driver(59, 128)
      println("TEST-6...${result}")
      
      result = driver(64, 144)
      println("TEST-7...${result}")
      
      result = driver(61, 135)
      println("TEST-8...${result}")
      
      result = driver(58, 127)
      println("TEST-9...${result}")
      
          
  }
  
  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;
  }