1 min to read
BigInteger
BigInteger 사용 방법.

int 최대값 2147483647
long 최대값 9223372036854775807
알고리즘 문제에서 100자리 수도 나올 수 있다면 BigInteger 사용해야겠죠?
- 더하기 : add()
- 빼기 : subtract()
- 곱하기 : multiply()
- 나누기 : divide()
BigInteger big=new BigInteger("3000000000000");
BigInteger c=big.add(new BigInteger("341341234"));
System.out.println(c);
Comments