본문 바로가기

Algorithm/Baekjoon

[백준_JAVA] 3003 킹, 퀸, 룩, 비숍, 나이트, 폰

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 knite = 2;
		int pawn = 8;
		
		king = king - sc.nextInt();
		queen = queen - sc.nextInt();
		rook = rook - sc.nextInt();
		bishop = bishop - sc.nextInt();
		knite = knite - 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(knite+" ");
		System.out.print(pawn);
	}
}

'Algorithm > Baekjoon' 카테고리의 다른 글

[백준_JAVA] 10807 개수 세기  (0) 2023.07.30
[백준_JAVA] 2444 별 찍기 - 7  (0) 2023.07.28
[백준_JAVA] 25083 새싹  (0) 2023.07.25
[백준_JAVA] 11718 그대로 출력하기  (0) 2023.07.25
[백준_JAVA] 5622 다이얼  (0) 2023.07.25