title: Check Integer Overflow Multiplication
signature: fun checkIntegerOverflowMultiplication(a: Long, b: Long): Boolean {
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;
  }
question_info.test_list: [{"idx": 0, "outputs": false, "inputs": {"a": 37, "b": 80}}, {"idx": 1, "outputs": true, "inputs": {"a": 10000000000, "b": -10000000000}}, {"idx": 2, "outputs": true, "inputs": {"a": 10000000000, "b": 10000000000}}, {"idx": 3, "outputs": false, "inputs": {"a": 999999999, "b": 999999999}}, {"idx": 4, "outputs": false, "inputs": {"a": 39, "b": 36}}, {"idx": 5, "outputs": false, "inputs": {"a": 92, "b": 56}}, {"idx": 6, "outputs": false, "inputs": {"a": 14, "b": 21}}, {"idx": 7, "outputs": false, "inputs": {"a": 19, "b": 38}}, {"idx": 8, "outputs": false, "inputs": {"a": 14, "b": 82}}, {"idx": 9, "outputs": false, "inputs": {"a": 88, "b": 41}}]
question_info.extension: kts
question_info.test_code: package main
  
  import kotlin.text.*
  import kotlin.math.*
  
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  fun validateSolution(actual:Boolean, expected:Boolean):Boolean{
    return actual.equals(expected)
  }
  fun driver(a: Long, b: Long, expected:Boolean):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(a, b), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver(37, 80, false)
      println("TEST-0...${result}")
      
      result = driver(10000000000, -10000000000, true)
      println("TEST-1...${result}")
      
      result = driver(10000000000, 10000000000, true)
      println("TEST-2...${result}")
      
      result = driver(999999999, 999999999, false)
      println("TEST-3...${result}")
      
      result = driver(39, 36, false)
      println("TEST-4...${result}")
      
      result = driver(92, 56, false)
      println("TEST-5...${result}")
      
      result = driver(14, 21, false)
      println("TEST-6...${result}")
      
      result = driver(19, 38, false)
      println("TEST-7...${result}")
      
      result = driver(14, 82, false)
      println("TEST-8...${result}")
      
      result = driver(88, 41, false)
      println("TEST-9...${result}")
      
          
  }
  
  main()
question_info.entry_fn_name: checkIntegerOverflowMultiplication
question_info.entry_cls_name: Solution
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: kotlinc -script __FILENAME__ -no-reflect -nowarn