
-Code
import java.math.BigInteger;
public class LeetCode415 {
public String addStrings(String num1, String num2) {
// BigInteger로 변환
BigInteger bigNum1 = new BigInteger(num1);
BigInteger bigNum2 = new BigInteger(num2);
// 문자열로 변경하여 반환
return String.valueOf(bigNum1.add(bigNum2));
}
}'알고리즘 문제 > Java' 카테고리의 다른 글
| [LeetCode/Java] Keyboard Row (0) | 2026.06.26 |
|---|---|
| [LeetCode/Java] Number Complement (0) | 2026.06.25 |
| [LeetCode/Java] Reverse Bits (0) | 2026.06.23 |
| [LeetCode/Java] Add Digits (0) | 2026.06.22 |
| [LeetCode/Java] Contains Duplicate II (0) | 2026.06.21 |