문제
아래 예제와 같이 개를 출력하시오.
입력
없음.
출력
개를 출력한다.
예제 입력 1
예제 출력 1
|\_/|
|q p| /}
( 0 )"""\
|"^"` |
||_/=\\__|
#문제 풀이 방법
기존의 10171번과 동일하게 보면 될 것같다.
여기서 주의할 점은
역슬래시 말고도 "(따옴표)도 출력하려면 \"로 표시해야하는 것이다!
#C/C++
#include <iostream>
using namespace std;
int main()
{
cout << "|\\_/|" << endl;
cout << "|q p| /}" << endl;
cout << "( 0 )\"\"\"\\" << endl;
cout << "|\"^\"` |" << endl;
cout << "||_/=\\\\__|" << endl;
return 0;
}
#Python
print('|\\_/|')
print('|q p| /}')
print('( 0 )\"\"\"\\')
print('|\"^\"` |')
print('||_/=\\\\__|')
반응형
'PS > 백준' 카테고리의 다른 글
[백준/Baekjoon]<10869번> 사칙연산 [C/C++/Python][Class 1] (0) | 2022.07.13 |
---|---|
[백준/Baekjoon]<10809번> 알파벳 찾기 [C/C++/Python][Class 1] (0) | 2022.07.12 |
[백준/Baekjoon]<10171번> 고양이 [C/C++/Python][Class 1] (0) | 2022.07.10 |
[백준/Baekjoon]<9498번> 시험 성적 [C/C++/Python][Class 1] (0) | 2022.07.10 |
[백준/Baekjoon]<2753번> 윤년 [C/C++/Python][Class 1] (0) | 2022.07.09 |