[백준] #25757 임스와 함께하는 미니게임 python

2023. 9. 25. 10:55

 

https://www.acmicpc.net/problem/25757

 

25757번: 임스와 함께하는 미니게임

첫 번째 줄에는 사람들이 임스와 같이 플레이하기를 신청한 횟수 $N$과 같이 플레이할 게임의 종류가 주어진다. $(1 \le N \le 100\,000)$ 두 번째 줄부터 $N$개의 줄에는 같이 플레이하고자 하는 사람들

www.acmicpc.net

 

📕 나의 풀이 📕

 

'''
Method : Typing Studying

title : Good PW

condition :

mini game : Y, F, O

solutions :

using dict to solve this problem.

'''

 

🧑🏻‍💻 나의 코드 🧑🏻‍💻

 

N, mini_game_type = input().split()

members_count = len(set([input() for i in range(int(N))]))

if mini_game_type == "Y":
    print(members_count)
elif mini_game_type == "F":
    print(members_count // 2)
else:
    print(members_count // 3)

BELATED ARTICLES

more