title: Compute Average Two Numbers Without Overflow 1
signature: computeAverageTwoNumbersWithoutOverflow1(a, b) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(int actual, int expected){
      return actual.toString() == expected.toString();
  }
  
  String driver(a, b, int expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(a, b), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          9, 81, 
          45)
      }");
  
      print("TEST-1...${driver(
          68, 79, 
          73)
      }");
  
      print("TEST-2...${driver(
          51, 2, 
          26)
      }");
  
      print("TEST-3...${driver(
          31, 49, 
          40)
      }");
  
      print("TEST-4...${driver(
          14, 10, 
          12)
      }");
  
      print("TEST-5...${driver(
          73, 9, 
          41)
      }");
  
      print("TEST-6...${driver(
          51, 13, 
          32)
      }");
  
      print("TEST-7...${driver(
          75, 67, 
          71)
      }");
  
      print("TEST-8...${driver(
          98, 51, 
          74)
      }");
  
      print("TEST-9...${driver(
          83, 74, 
          78)
      }");
  
      return 0;
  }
source_py: def compute_average_two_numbers_without_overflow_1(a, b):
      return (((a // 2) + (b // 2)) + (((a % 2) + (b % 2)) // 2))
source_cpp: int compute_average_two_numbers_without_overflow_1(int a, int b) {
    return ( a / 2 ) + ( b / 2 ) + ( ( a % 2 + b % 2 ) / 2 );
  }