[java] 백준 10757번 큰 수 A+B
알고리즘/백준2021. 7. 21. 22:01[java] 백준 10757번 큰 수 A+B

import java.math.BigInteger; import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); BigInteger A = sc.nextBigInteger(); BigInteger B = sc.nextBigInteger(); System.out.println(A.add(B)); } } int는 메모리 크기는 4byte로 표현할 수 있는 범위는 -2,147,483,648 ~ 2,147,483,647 이고 long은 메모리 크기는 8byte로 표현할 수 있는 범위는 -9,223,372,036,854,775,808 ~ 9,223,372,036,85..

image