Playground/자바문제집

[백준] 3003번

미숫가루설탕많이 2022. 12. 23. 22:44
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int king = 1;
        int queen = 1;
        int rook = 2;
        int bishop = 2;
        int knight = 2;
        int pawn = 8;

        king = king - sc.nextInt();
        queen = queen - sc.nextInt();
        rook = rook - sc.nextInt();
        bishop = bishop - sc.nextInt();
        knight = knight - sc.nextInt();
        pawn = pawn - sc.nextInt();

        System.out.print(king + " ");
        System.out.print(queen + " ");
        System.out.print(rook + " ");
        System.out.print(bishop + " ");
        System.out.print(knight + " ");
        System.out.print(pawn);

    }
}

'Playground > 자바문제집' 카테고리의 다른 글

[백준] 10171번  (0) 2022.12.23
[백준] 10430번  (0) 2022.12.23
[백준] 18108번  (0) 2022.12.23
[백준] 10926번  (0) 2022.12.23
[백준] 10869번  (0) 2022.12.23