반응형
Notice
Recent Posts
Recent Comments
Link
«   2024/07   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
Archives
Today
Total
07-04 04:13
관리 메뉴

ImJay

[파이썬/Python] 백준 22193번 Multiply 본문

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)

 

반응형
Comments