title: Check Integer Overflow Multiplication
signature: class Solution {
  
      public Boolean checkIntegerOverflowMultiplication(Long a, Long b) {
test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(Long a, Long b, Boolean expected){
          try{
              Driver driver = new Driver();
              if (driver.run(a, b,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution(37L, 80L, false);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(10000000000L, -10000000000L, true);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(10000000000L, 10000000000L, true);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(999999999L, 999999999L, false);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution(39L, 36L, false);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution(92L, 56L, false);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution(14L, 21L, false);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution(19L, 38L, false);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution(14L, 82L, false);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution(88L, 41L, false);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(Long a, Long b, Boolean expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(a, b),expected);
      }
      
      public boolean validateSolution(Boolean actual, Boolean expected){
          return actual.equals(expected);
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
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;
  }