백준 #2338번 긴 자리 계산

jhj·2024년 1월 29일

백준 JAVA

목록 보기
7/583
import java.math.BigInteger;
import java.util.Scanner;
public 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));
		System.out.println(a.subtract(b));
		System.out.println(a.multiply(b));
		sc.close();
	}
}

BigInteger 활용!!

profile
개발자를 꿈꾸는

0개의 댓글