title: Add Two Numbers Without Using Arithmetic Operators
signature: fun addTwoNumbersWithoutUsingArithmeticOperators(x: Int, y: Int): Int {
test_code: package main
  
  import kotlin.text.*
  import kotlin.math.*
  
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  fun validateSolution(actual:Int, expected:Int):Boolean{
    return actual.equals(expected)
  }
  fun driver(x: Int, y: Int, expected:Int):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(x, y), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver(56, 60, 116)
      println("TEST-0...${result}")
      
      result = driver(17, 44, 61)
      println("TEST-1...${result}")
      
      result = driver(73, 96, 169)
      println("TEST-2...${result}")
      
      result = driver(75, 3, 78)
      println("TEST-3...${result}")
      
      result = driver(27, 54, 81)
      println("TEST-4...${result}")
      
      result = driver(61, 1, 62)
      println("TEST-5...${result}")
      
      result = driver(65, 63, 128)
      println("TEST-6...${result}")
      
      result = driver(22, 19, 41)
      println("TEST-7...${result}")
      
      result = driver(61, 9, 70)
      println("TEST-8...${result}")
      
      result = driver(97, 23, 120)
      println("TEST-9...${result}")
      
          
  }
  
  main()
source_py: def add_two_numbers_without_using_arithmetic_operators(x, y):
      while (y != 0):
          carry = (x & y)
          x = (x ^ y)
          y = (carry << 1)
      return x
source_cpp: int add_two_numbers_without_using_arithmetic_operators(int x, int y) {
    while ( y != 0 ) {
      int carry = x & y;
      x = x ^ y;
      y = carry << 1;
    }
    return x;
  }