Post

[BOJ 10171] 고양이

Baekjoon Online Judge 10171(Java 11)
[고양이] 문제 풀이

[BOJ 10171] 고양이

-> 문제 바로가기



시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초256 MB66961223642720101036.205%

문제


  • 아래 예제와 같이 고양이를 출력하시오.


입력


  • 없음.


출력


  • 고양이를 출력한다.


예제


1
2
// 입력

1
2
3
4
5
// 출력
\    /\
 )  ( ')
(  /  )
 \(__)|


출처



알고리즘 분류








제출



내 제출


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import java.io.*;

public class Main {
    public static void solution() throws IOException {
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

        bw.write("\\    /\\");
        bw.newLine(); // 줄 바꿈

        bw.write(" )  ( ')");
        bw.newLine(); // 줄 바꿈

        bw.write("(  /  )");
        bw.newLine(); // 줄 바꿈

        bw.write(" \\(__)|");
        bw.newLine(); // 줄 바꿈

        bw.flush();
        bw.close();
    }

    public static void main(String[] args) throws IOException {
        solution();
    }
}


런타임메모리
104 ms14224 KB


Reference


This post is licensed under CC BY 4.0 by the author.