[C#] 백준 3003번 : 킹, 퀸, 룩, 비숍, 나이트, 폰
using System;
class Program
{
static void Main()
{
string[] arr = Console.ReadLine().Split(" ");
string[] chess = new string[] { "1", "1", "2", "2", "2", "8" };
int remain = 0;
int[] output = new int[6];
for (int i = 0; i < arr.Length; i++)
{
int a = int.Parse(arr[i]);
int b = int.Parse(chess[i]);
remain = b - a;
output[i] = remain;
}
for (int j = 0; j < output.Length; j++)
{
Console.Write(output[j] + " ");
}
}
}
반응형
'백준 > C#' 카테고리의 다른 글
[C#] 백준 10988번 : 팰린드롬인지 확인하기 (0) | 2025.02.06 |
---|---|
[C#] 백준 2444번 : 별 찍기 - 7 (0) | 2025.02.06 |
[C#] 백준 25083번 : 새싹 (0) | 2025.02.06 |
[C#] 백준 11718번 : 그대로 출력하기 (0) | 2025.02.06 |
[C#] 백준 5622번 : 다이얼 (0) | 2025.02.06 |