import java.util.Scanner; public class Main { // 3003킹, 퀸, 룩, 비숍, 나이트, 폰 public static void main(String[] args) { Scanner in = new Scanner(System.in); int[] chess = {1, 1, 2, 2, 2, 8}; int[] cnt = new int[6]; for (int i = 0; i < cnt.length; i++) { cnt[i] = in.nextInt(); System.out.print(chess[i] - cnt[i] + " "); } in.close(); } } 배열에 chess 값을 미리 입력한 후 입력값과 비교만 하면 됩니다.