๋ฐ์ํ
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 ๊ฐ์ ๋ฏธ๋ฆฌ ์ ๋ ฅํ ํ
- ์ ๋ ฅ๊ฐ๊ณผ ๋น๊ต๋ง ํ๋ฉด ๋ฉ๋๋ค.
๋ฐ์ํ
'๐ธ Algorithm > ๐ธ ๋ฐฑ์ค BaekJoon' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[๋ฐฑ์ค][java][10988][ํฐ๋ฆฐ๋๋กฌ์ธ์ง ํ์ธํ๊ธฐ] (0) | 2024.02.07 |
---|---|
[๋ฐฑ์ค][java][2444][๋ณ ์ฐ๊ธฐ - 7] (0) | 2024.02.04 |
[๋ฐฑ์ค][java][25083][์์น] (0) | 2024.01.29 |
[๋ฐฑ์ค][java][11718][๊ทธ๋๋ก ์ถ๋ ฅํ๊ธฐ] (0) | 2024.01.28 |
[๋ฐฑ์ค][java][5622][๋ค์ด์ผ] (1) | 2024.01.28 |