문제
https://www.acmicpc.net/problem/20336
풀이
입력 받은 n개의 세트 메뉴 중에 아무거나 출력하면 되므로, 그냥 첫 번째 세트 메뉴의 개수와 메뉴를 출력하면 된다.
코드
#include <iostream>
#include <string>
using namespace std;
int main() {
int n, m;
string str;
cin>>n>>m;
cout<<m<<'\n';
for(int i=0;i<m;i++){
cin>>str;
cout<<str<<'\n';
}
return 0;
}
'PS > Baekjoon' 카테고리의 다른 글
[백준] 27159: 노 땡스!(Kotlin) (0) | 2025.10.09 |
---|---|
[백준] 28648: Торговый центр(Kotlin) (0) | 2025.10.02 |
[백준] 30045: ZOAC 6(C++) (0) | 2025.08.23 |
[백준] 30676: 이 별은 무슨 색일까(C++) (1) | 2025.08.09 |
[백준] 11319: Count Me In(C++) (0) | 2025.06.24 |
댓글