[백준] #10886 0 = not cute / 1 = cute python
2023. 1. 15. 06:00
https://www.acmicpc.net/problem/10886
10886번: 0 = not cute / 1 = cute
준희는 자기가 팀에서 귀여움을 담당하고 있다고 생각한다. 하지만 연수가 볼 때 그 의견은 뭔가 좀 잘못된 것 같았다. 그렇기에 설문조사를 하여 준희가 귀여운지 아닌지 알아보기로 했다.
www.acmicpc.net
📕 설명 📕
python의 Counter를 이용하여 개수를 세어 풀이하였다.
🧑🏻💻 나의 풀이 🧑🏻💻
from collections import Counter
N = int(input())
result = []
for _ in range(N):
result.append(int(input()))
if Counter(result)[0] > Counter(result)[1]:
print("Junhee is not cute!")
else:
print("Junhee is cute!")
'Programming > Algorithm' 카테고리의 다른 글
[백준] #2747 피보나치 수 python (0) | 2023.01.17 |
---|---|
[백준] #1075 나누기 python (0) | 2023.01.16 |
[백준] #10953 A + B - 6 python (0) | 2023.01.14 |
[백준] #2559 수열 python (0) | 2023.01.13 |
[백준] #11659 구간 합 구하기 4 (0) | 2023.01.12 |