백준 1107 리모컨 C++
https://www.acmicpc.net/problem/1107 1107번: 리모컨 첫째 줄에 수빈이가 이동하려고 하는 채널 N (0 ≤ N ≤ 500,000)이 주어진다. 둘째 줄에는 고장난 버튼의 개수 M (0 ≤ M ≤ 10)이 주어진다. 고장난 버튼이 있는 경우에는 셋째 줄에는 고장난 버튼 www.acmicpc.net #include #include #include #include #include using namespace std; vector mal(10); bool check(int now) { //고장난 키가 있는지 확인하기 string s = to_string(now); for (int i = 0; i < s.length(); i++) { if (mal[s[i] - 48]) {//0은 ..
2022.06.09