(구) solved ac class 문제들/class 1

[class 1]백준 개(10172번) 풀이 (C++/Python)

isekaipudding 2026. 2. 9. 10:40

문제 : 개(10172번)(Bronze V)

문제 링크 : https://www.acmicpc.net/problem/10172
출처 : Baekjoon Online Judge

 

고양이 출력 문제에서 개를 출력하면 됩니다.

|\_/|
|q p|   /}
( 0 )"""\
|"^"`    |
||_/=\\__|

 

이스케이프 문자는 이전 게시글을 보면 되고, 여기서는 정답 소스 코드만 공유합니다.

[C++]

#include <bits/stdc++.h>
 
using namespace std;
 
int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    cout << "|\\_/|" << '\n';
    cout << "|q p|   /}" << '\n';
    cout << "( 0 )\"\"\"\\" << '\n';
    cout << "|\"^\"\`    |" << '\n';
    cout << "||_/=\\\\__|" << '\n';
 
    return 0;
}

[Python]

print("|\\_/|")
print("|q p|   /}")
print("( 0 )\"\"\"\\")
print("|\"^\"`    |")
print("||_/=\\\\__|")