scientific_comp_projects/CODE/[python]kattis/trivial/bijele.py
2021-10-29 15:16:40 +02:00

31 lines
469 B
Python

# the order is : kings, queens, rooks, bishops, knights and pawns
pieces = input()
pieces = pieces.split(' ')
answer = ''
for i,piece in enumerate(pieces):
piece = int(piece)
if 0<=i<2 :
piece = 1-piece
elif 2<=i<5 :
piece = 2-piece
elif i==5 :
piece = 8 - piece
answer = answer + str(piece) +' '
print(answer[:-1])
"""
One king
One queen
Two rooks
Two bishops
Two knights
Eight pawns
"""