https://www.acmicpc.net/problem/25757
25757번: 임스와 함께하는 미니게임
첫 번째 줄에는 사람들이 임스와 같이 플레이하기를 신청한 횟수 $N$과 같이 플레이할 게임의 종류가 주어진다. $(1 \le N \le 100\,000)$ 두 번째 줄부터 $N$개의 줄에는 같이 플레이하고자 하는 사람들
www.acmicpc.net
import sys
input = sys.stdin.readline
n, game = input().split()
s = set()
for _ in range(int(n)):
s.add(input())
if game == 'Y':
print(len(s))
elif game == 'F':
print(len(s) // 2)
else:
print(len(s) // 3)
'백준' 카테고리의 다른 글
백준 8979. 올림픽 (0) | 2024.03.25 |
---|---|
백준 11557. Yangjojang of The Year (0) | 2024.03.25 |
백준 2292. 벌집 (0) | 2024.03.21 |
백준 10431. 줄세우기 (0) | 2024.03.20 |
백준 23971. ZOAC 4 (0) | 2024.03.20 |