반응형
문제
https://www.acmicpc.net/problem/28288
28288번: Special Event
The first line of input will contain a positive integer $N$, representing the number of people interested in attending your event. The next $N$ lines will each contain one person's availability using one character for each of Day $1$, Day $2$, Day $3$, Day
www.acmicpc.net
해설
numpy를 사용 못하니 map을 이용해서 계산해보았다.
person = int(input())
schedule = [
[int(d) for d in list(input().replace(".", "0").replace("Y", "1"))]
for _ in range(person)
]
vec = list(map(sum, zip(*schedule)))
result = [str(i + 1) for i, x in enumerate(vec) if x == (max(vec))]
print(",".join(result))
반응형