문제 :
https://www.acmicpc.net/problem/2163
2163번: 초콜릿 자르기
정화는 N×M 크기의 초콜릿을 하나 가지고 있다. 초콜릿은 금이 가 있는 모양을 하고 있으며, 그 금에 의해 N×M개의 조각으로 나눠질 수 있다. 초콜릿의 크기가 너무 크다고 생각한 그녀는 초콜릿
www.acmicpc.net
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int col, row; | |
int main(void) | |
{ | |
ios_base::sync_with_stdio(false); | |
cin.tie(nullptr); | |
cin >> col >> row; | |
cout << col * row - 1 << '\n'; | |
return 0; | |
} |
'문제풀이 > 백준' 카테고리의 다른 글
15685 - 드래곤 커브 (0) | 2022.04.23 |
---|---|
10026 - 적록색약 (0) | 2022.04.23 |
11651 - 좌표 정렬하기 2 (0) | 2022.04.23 |
7579 - 앱 (0) | 2022.04.23 |
7576 - 토마토 (0) | 2022.04.23 |