Python
Code prints 5 which is correct answer for this task.
def int(a): return ~eval(a) def add(a,b): return int(a)+int(b) print ~add("2","2") def int(a): return ~eval(a) def add(a,b): return int(a)+int(b) print ~add("2","2") Edit: Here's alternative version which adds integers, not stringified twos.
def int(a): return ~eval(`a`) def add(a,b): return int(a)+int(b) print ~add(2,2) Tilde is an unary inverse operator which returns
-x-1, so first step is to get-6and then with another operator in5