본문 바로가기
Algorithm

[백준 알고리즘] 10172번: 개 - Java

by Baest 2021. 8. 18.

https://www.acmicpc.net/problem/10172

 

10172번: 개

문제 아래 예제와 같이 개를 출력하시오. 입력 출력 예제 입력 1 복사 예제 출력 1 복사 |\_/| |q p| /} ( 0 )"""\ |"^"` | ||_/=\\__|...

www.acmicpc.net

 

 

[문제]

 

 

[풀이]

- https://create-something-from-nothing.tistory.com/65 문제와 동일한 방법으로 풀면 된다.

- 아래 출력문을 예제 출력의 줄만큼 복붙하였다.

- System.out.println("출력해야하는 내용 삽입")

 

 

 

[정답 코드]

1
2
3
4
5
6
7
8
9
10
11
12
public class Main {
 
    public static void main(String[] args) {
 
        System.out.println("|\\_/|");
        System.out.println("|q p|   /}");
        System.out.println("( 0 )\"\"\"\\");
        System.out.println("|\"^\"`    |");
        System.out.println("||_/=\\\\__|");
    }
}
 
 
cs