본문 바로가기
Beakjoon&프로그래머스/파이썬

[백준/파이썬] 30889번 좌석 배치도

by 현장 2023. 12. 11.

-Code

seats = [['.' for _ in range(20)] for _ in range(10)]

for _ in range(int(input())):
    line = input()
    x = int(line[1:]) - 1
    y = ord(line[0]) - ord('A')
    seats[y][x] = 'o'

for line in seats:
    print(*line, sep='')