Solved.ac - Python/Bronze V
[파이썬/Python] 백준 22193번 Multiply
ImJay
2022. 11. 29. 11:18
반응형
[파이썬/Python] 백준 22193번 Multiply
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
문제
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.
해설
The first line contains the lengths N and M, separated by a space. A is given on the second and B on the third line. The numbers will not have leading zeros.
첫 줄에 N, M 으로 A, B 의 길이를 입력 받고 차례로 A, B 를 입력 받는다.
Output the product of A and B without leading zeros.
A, B 의 곱을 출력한다.코드
N, M = map(int, input().split())
A = int(input())
B = int(input())
print(A*B)
풀이
1. 숫자의 길이 N, M 그리고 A, B 를 입력 받는다.
N, M = map(int, input().split())
A = int(input())
B = int(input())
2. A * B 를 출력한다.
print(A*B)

반응형