java solution: I think it is satisfied with the requirements.


  • 0
    3

    public class Solution {
    int getSum(int a, int b) {
    return new BigInteger(Integer.toString(a)).add(new BigInteger(Integer.toString(b))).intValue();
    }
    }


  • 0
    J

    Your solution looks right but I wonder if the implementation of BigInteger.add() have operator + or -?


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.