본문 바로가기
Algorithm

[구현/수학] 백준 22193 Multiply - 파이썬(Python)

by jangThang 2022. 7. 8.
반응형

백준 온라인 저지

 

[ Contents ]

     

     

    1. 문제 (링크 참조)

     

    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

     

     

     

    2. 문제 풀이

     두 수를 곱하는 문제입니다.

     

     

    3. 코드

    import sys
    input = sys.stdin.readline
    
    # 입력
    N, M = map(int, input().split())
    a = int(input())
    b = int(input())
    
    # 출력
    print(a*b)

    파이썬에서는 N, M 자릿수가 필요하지 않습니다.

     

    star가 되고나서 Tistory

    반응형

    댓글