백준 #2935 소음

jhj·2024년 6월 18일

백준 JAVA

목록 보기
514/583
import java.util.Scanner;
import java.math.BigInteger;
public class Main {
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		BigInteger A = sc.nextBigInteger();
		String B = sc.next();
		BigInteger C = sc.nextBigInteger();
		
		if(B.equals("+")) {
			System.out.println(A.add(C));
		}else if(B.equals("*")) {
			System.out.println(A.multiply(C));
		}
		
		sc.close();
	}
}
profile
개발자를 꿈꾸는

0개의 댓글