title: Minimum Perimeter N Blocks
signature: def minimum_perimeter_n_blocks(n):
source_py: def minimum_perimeter_n_blocks(n):
      l = math.sqrt(n)
      sq = (l * l)
      if (sq == n):
          return (l * 4)
      else:
          row = (n / l)
          perimeter = (2 * (l + row))
          if ((n % l) != 0):
              perimeter += 2
          return perimeter
source_cpp: int minimum_perimeter_n_blocks(int n) {
    int l = sqrt ( n );
    int sq = l * l;
    if ( sq == n ) return l * 4;
    else {
      long long int row = n / l;
      long long int perimeter = 2 * ( l + row );
      if ( n % l != 0 ) perimeter += 2;
      return perimeter;
    }
  }
question_info.test_code: import array
  import bisect
  import collections
  import datetime
  import functools
  import heapq
  import itertools
  import math
  import queue
  import re
  import string
  import sys
  from typing import Any, Dict, List, Optional, Set
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  def validate_solution(actual, expected):
      return abs(actual - expected) < 1e-09
  
  def driver(n, expected):
      try:
          if validate_solution(PLACEHOLDER_FN_NAME(
              n),
              expected
          ):
              return "PASSED"
          return "FAILED"
      except Exception as exception_obj:
          return type(exception_obj).__name__
      
  if __name__ == "__main__":
      result = driver(45, 28.832815729997478)
      print(f"TEST-0...{result}")
  
      result = driver(80, 37.77708763999664)
      print(f"TEST-1...{result}")
  
      result = driver(54, 29.393876913398138)
      print(f"TEST-2...{result}")
  
      result = driver(48, 29.712812921102035)
      print(f"TEST-3...{result}")
  
      result = driver(83, 36.4417343165772)
      print(f"TEST-4...{result}")
  
      result = driver(68, 32.984845004941285)
      print(f"TEST-5...{result}")
  
      result = driver(32, 24.62741699796952)
      print(f"TEST-6...{result}")
  
      result = driver(20, 19.88854381999832)
      print(f"TEST-7...{result}")
  
      result = driver(68, 32.984845004941285)
      print(f"TEST-8...{result}")
  
      result = driver(66, 34.49615361854384)
      print(f"TEST-9...{result}")
  
      sys.exit(0)
question_info.test_case_ids: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
question_info.entry_fn_name: minimum_perimeter_n_blocks
question_info.test_list: [{"idx": 0, "outputs": 28.832815729997478, "inputs": {"n": 45}}, {"idx": 1, "outputs": 37.77708763999664, "inputs": {"n": 80}}, {"idx": 2, "outputs": 29.393876913398138, "inputs": {"n": 54}}, {"idx": 3, "outputs": 29.712812921102035, "inputs": {"n": 48}}, {"idx": 4, "outputs": 36.4417343165772, "inputs": {"n": 83}}, {"idx": 5, "outputs": 32.984845004941285, "inputs": {"n": 68}}, {"idx": 6, "outputs": 24.62741699796952, "inputs": {"n": 32}}, {"idx": 7, "outputs": 19.88854381999832, "inputs": {"n": 20}}, {"idx": 8, "outputs": 32.984845004941285, "inputs": {"n": 68}}, {"idx": 9, "outputs": 34.49615361854384, "inputs": {"n": 66}}]
question_info.entry_cls_name: Solution