백준 3003

Oak_Cassia·2022년 1월 17일
0

백준 3003

필요한 체스 기물 개수 맞추기

#include<iostream>
using namespace std;

int main()
{
    enum Chess
    { 
    King = 1,
    Queen = 1,
    Rook = 2,
    Bishop = 2,
    Knight = 2,
    Pawn = 8 
    };
   
    Chess chess[6] = {King, Queen, Rook, Bishop, Knight, Pawn};
    int white_piece[6];
    for (int i = 0; i < 6; i++)
        cin >> white_piece[i];

    for (int i = 0; i < 6; i++)
        cout << chess[i] - white_piece[i] << " ";
}
profile
rust로 뭐할까

0개의 댓글