728x90
반응형
단순 구현 문제이다.
n = int(input())
li = list(map(int, input().split()))
cnt = li.count(1)
print(cnt if cnt <= n-cnt else n-cnt)
728x90
반응형
'Agorithm > 백준 알고리즘' 카테고리의 다른 글
백준 알고리즘 8815번 Test(python) (0) | 2021.02.20 |
---|---|
백준 알고리즘 8721번 Wykreślanka(python) (0) | 2021.02.20 |
백준 알고리즘 10103번 주사위 게임(python) (0) | 2021.02.19 |
백준 알고리즘 10178번 할로윈의 사탕(python) (0) | 2021.02.19 |
백준 알고리즘 10214번 Baseball(python) (0) | 2021.02.19 |