728x90
https://www.acmicpc.net/problem/22193
문제
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.
출력
Output the product of A and B without leading zeros.
제한
- 1 ≤ N, M ≤ 50 000
서브태스크
번호 | 배점 | 제한 |
1 | 20 | N, M ≤ 4 |
2 | 20 | N, M ≤ 9 |
3 | 30 | N, M ≤ 5 000 |
4 | 30 | No additional constraints |
728x90
예제 입력 1
3 4
123
4567
예제 출력 1
561741
예제 입력 2
3 1
100
0
예제 출력 2
0
# A와 B의 곱을 구하여라
n, m = map(int, input().split())
A = int(input())
B = int(input())
print(A * B)
728x90
'Problem Solving > BOJ' 카테고리의 다른 글
[백준, BOJ 2164] 카드2 (python) (0) | 2021.12.01 |
---|---|
[백준, BOJ 2108] 통계학 (python) (0) | 2021.11.29 |
[백준, BOJ 21300] Bottle Return (python) (0) | 2021.11.28 |
[백준, BOJ 20492] 세금 (python) (0) | 2021.11.28 |
[백준, BOJ 20254] Site Score (python) (0) | 2021.11.28 |