[백준/Java] 3003 : 킹, 퀸, 룩, 비숍, 나이트, 폰

SEOP·2024년 6월 14일
0

import java.io.*;
import java.util.Arrays;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new BufferedReader(new InputStreamReader(System.in)));
        BufferedWriter bw = new BufferedWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

        int[] intArr = Arrays.stream(br.readLine().split(" ")).mapToInt(Integer::parseInt).toArray();
        int[] defaultNumber = {1, 1, 2, 2, 2, 8};

        for(int i = 0 ; i < defaultNumber.length ; i++){
            bw.write(String.valueOf(defaultNumber[i] - intArr[i]));
            bw.write(" ");
        }

        bw.flush();
        bw.close();
    }
}
profile
응애 나 애기 개발자

0개의 댓글