Study📚/백준

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

woo!na 2024. 6. 5. 23:49

문제 출처 : https://www.acmicpc.net/

 


#3003: 킹, 퀸, 룩, 비숍, 나이트, 폰 (언어 : Java11)


제출 답안

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer stk = new StringTokenizer(br.readLine());
		
		int[] sample = {1, 1, 2, 2, 2, 8};
		
		for(int i=0; i<sample.length; i++) {
			System.out.print(sample[i] - Integer.parseInt(stk.nextToken()) + " ");
		}
        br.close();
	}
}

comment

-

'Study📚 > 백준' 카테고리의 다른 글

[백준] - #2743: 단어 길이 재기  (0) 2024.06.10
[백준] - #2440: 별 찍기 - 3  (0) 2024.06.07
[백준] - #11399: ATM  (0) 2024.06.05
[백준] - #25083: 새싹  (0) 2024.06.04
[백준] - #11718: 그대로 출력하기  (0) 2024.06.04