728x90
풀이
문제 길이에 비해 풀이는 매우 심플했다.
N*M개로 초콜릿을 쪼갤거고 쪼개진 초콜릿 한 조각으로 또 쪼개는 거라
(N*M)-1을 하면 된다.
코드
N, M = map(int, input().split())
print((N*M)-1)
728x90
'🥧 Python > ⚙️ 코딩테스트' 카테고리의 다른 글
[백준-Python] 11022번: A+B -8 (0) | 2023.02.14 |
---|---|
[백준-Python] 11021번: A+B -7 (0) | 2023.02.14 |
[백준-Python] 3046번: R2 (0) | 2023.02.14 |
[백준-Python] 2588번: 곱셈 (0) | 2023.02.14 |
[백준-Python] 2558번: A+B -2 (0) | 2023.02.14 |