title: Paper Cut Minimum Number Squares
signature: function paperCutMinimumNumberSquares($a, $b) {
test_code: <?php
  
  
  // SOLUTION CODE 
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function validateSolution($actual, $expected){
      return serialize($actual) == serialize($expected);
  }
  
  function driver($a, $b, $expected){
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME($a, $b), $expected)){
          return "PASSED";
        }
        return "FAILED";
      }
      catch (Exception $exception_obj) {
        return get_class($exception_obj);
      }
  }
  
  function main(){
      printf("TEST-0...%s\n",driver(
        87, 60, 
        9));
      
      printf("TEST-1...%s\n",driver(
        18, 35, 
        19));
      
      printf("TEST-2...%s\n",driver(
        68, 93, 
        11));
      
      printf("TEST-3...%s\n",driver(
        80, 20, 
        4));
      
      printf("TEST-4...%s\n",driver(
        87, 69, 
        10));
      
      printf("TEST-5...%s\n",driver(
        64, 29, 
        12));
      
      printf("TEST-6...%s\n",driver(
        64, 1, 
        64));
      
      printf("TEST-7...%s\n",driver(
        65, 95, 
        9));
      
      printf("TEST-8...%s\n",driver(
        43, 72, 
        18));
      
      printf("TEST-9...%s\n",driver(
        97, 41, 
        11));
      
  }
  
  main();
  ?>
source_py: def paper_cut_minimum_number_squares(a, b):
      result = 0
      rem = 0
      if (a < b):
          (a, b) = (b, a)
      while (b > 0):
          result += int((a / b))
          rem = int((a % b))
          a = b
          b = rem
      return result
source_cpp: int paper_cut_minimum_number_squares(int a, int b) {
    long long result = 0, rem = 0;
    if ( a < b ) swap ( a, b );
    while ( b > 0 ) {
      result += a / b;
      long long rem = a % b;
      a = b;
      b = rem;
    }
    return result;
  }