title: Paper Cut Minimum Number Squares
signature: func paperCutMinimumNumberSquares(a int, b int) int {
test_code: package main
  
  import (
      "fmt"
      "reflect"
      "math"
      "sort"
  )
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  func validateSolution(actual int, expected int) bool {
      return reflect.DeepEqual(actual,expected)
  }
  
  func driver(a int, b int, expected int) string {
      if validateSolution(PLACEHOLDER_FN_NAME(a, b),expected) {
              return "PASSED"
      }
      return "FAILED"
  
  }
  
  func main() {
  
      // Use imports to avoid undefined errors
      var _ = reflect.DeepEqual
      _ = math.Abs
      _ = sort.Sort
      result := ""
      result = driver(87, 
  	60, 9)
      fmt.Printf("TEST-0...%s\n", result)
      
      result = driver(18, 
  	35, 19)
      fmt.Printf("TEST-1...%s\n", result)
      
      result = driver(68, 
  	93, 11)
      fmt.Printf("TEST-2...%s\n", result)
      
      result = driver(80, 
  	20, 4)
      fmt.Printf("TEST-3...%s\n", result)
      
      result = driver(87, 
  	69, 10)
      fmt.Printf("TEST-4...%s\n", result)
      
      result = driver(64, 
  	29, 12)
      fmt.Printf("TEST-5...%s\n", result)
      
      result = driver(64, 
  	1, 64)
      fmt.Printf("TEST-6...%s\n", result)
      
      result = driver(65, 
  	95, 9)
      fmt.Printf("TEST-7...%s\n", result)
      
      result = driver(43, 
  	72, 18)
      fmt.Printf("TEST-8...%s\n", result)
      
      result = driver(97, 
  	41, 11)
      fmt.Printf("TEST-9...%s\n", result)
      
          
  }
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;
  }