1. 문제
문제 출처: www.acmicpc.net/problem/10172
10172번: 개
문제 아래 예제와 같이 개를 출력하시오. 입력 출력 예제 입력 1 복사 예제 출력 1 복사 |\_/| |q p| /} ( 0 )"""\ |"^"` | ||_/=\\__|...
www.acmicpc.net
2. 코드
This file contains 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 main(void) | |
{ | |
cout << "|\\_/|" << endl; | |
cout << "|q p| /}" << endl; | |
cout << "( 0 )\"\"\"\\" << endl; | |
cout << "|\"^\"` |" << endl; | |
cout << "||_/=\\\\__|" << endl; | |
return 0; | |
} |
3. 풀이
이스케이프 문자에 대해 알고 있으면 쉽게 풀 문제이다. 여기서 주의할 점은 띄어쓰기 개수가 동일한 개수인지 확인만 한다면 충분하다.
'컴퓨터 > 백준 알고리즘' 카테고리의 다른 글
백준 알고리즘 1008번: A/B [C++] (0) | 2020.11.19 |
---|---|
백준 알고리즘 1914번: 하노이 탑 [C++] (0) | 2020.11.18 |
백준 알고리즘 2751번: 수 정렬하기 2 C언어 합병 정렬(merge sort) (0) | 2020.05.31 |
백준 알고리즘 2750번: 수 정렬하기 C언어(버블 정렬) (0) | 2020.05.23 |
백준 알고리즘 2750번: 수 정렬하기 C언어 (0) | 2020.05.21 |