title: Check Integer Overflow Multiplication
signature: func checkIntegerOverflowMultiplication(a int64, b int64) bool {
test_code: package main
  
  import (
      "fmt"
      "reflect"
      "math"
      "sort"
  )
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  func validateSolution(actual bool, expected bool) bool {
      return reflect.DeepEqual(actual,expected)
  }
  
  func driver(a int64, b int64, expected bool) 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(37, 
  	80, false)
      fmt.Printf("TEST-0...%s\n", result)
      
      result = driver(10000000000, 
  	-10000000000, true)
      fmt.Printf("TEST-1...%s\n", result)
      
      result = driver(10000000000, 
  	10000000000, true)
      fmt.Printf("TEST-2...%s\n", result)
      
      result = driver(999999999, 
  	999999999, false)
      fmt.Printf("TEST-3...%s\n", result)
      
      result = driver(39, 
  	36, false)
      fmt.Printf("TEST-4...%s\n", result)
      
      result = driver(92, 
  	56, false)
      fmt.Printf("TEST-5...%s\n", result)
      
      result = driver(14, 
  	21, false)
      fmt.Printf("TEST-6...%s\n", result)
      
      result = driver(19, 
  	38, false)
      fmt.Printf("TEST-7...%s\n", result)
      
      result = driver(14, 
  	82, false)
      fmt.Printf("TEST-8...%s\n", result)
      
      result = driver(88, 
  	41, false)
      fmt.Printf("TEST-9...%s\n", result)
      
          
  }
source_py: def check_integer_overflow_multiplication(a, b):
      if ((a == 0) or (b == 0)):
          return False
      result = (a * b)
      if ((result >= 9223372036854775807) or (result <= (- 9223372036854775808))):
          result = 0
      if (a == (result // b)):
          print((result // b))
          return False
      else:
          return True
source_cpp: bool check_integer_overflow_multiplication(long long a, long long b) {
    if ( a == 0 || b == 0 ) return false;
    long long result = a * b;
    if ( a == result / b ) return false;
    else return true;
  }