给定两个int A和B。编写一个函数返回A+B的值,但不得使用+或其他算数运算符。 测试样例: 1,2 返回:3
加载中...
import java.util.*; public class UnusualAdd { public int addAB(int A, int B) { // write code here } }
class UnusualAdd { public: int addAB(int A, int B) { // write code here } };
# -*- coding:utf-8 -*- class UnusualAdd: def addAB(self, A, B): # write code here
class UnusualAdd { public int addAB(int A, int B) { // write code here } }