-
[브론즈 Ⅴ] 22193번 :: Multiply / Java백준/브론즈 2022. 4. 29. 20:10
문제
https://www.acmicpc.net/problem/22193
22193번: Multiply
Write a program that computes a product of two non-negative integers A and B. The integers are represented in decimal notation and have N and M digits, respectively.
www.acmicpc.net
코드
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.math.BigInteger; public class Main { public static void main(String[] args) throws IOException { BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); String NM = bf.readLine(); BigInteger a = new BigInteger(bf.readLine()); BigInteger b = new BigInteger(bf.readLine()); System.out.println(a.multiply(b)); } }
썸네일 '백준 > 브론즈' 카테고리의 다른 글
[브론즈 Ⅴ] 24262번 :: 알고리즘 수업 - 알고리즘의 수행 시간 1 / Java (0) 2022.04.29 [브론즈 Ⅴ] 23234번 :: The World Responds / Java (0) 2022.04.29 [브론즈 Ⅴ] 21300번 :: Bottle Return / Java (0) 2022.04.29 [브론즈 Ⅴ] 20492번 :: 세금 / Java (0) 2022.04.28 [브론즈 Ⅴ] 20254번 :: Site Score / Java (0) 2022.04.28