Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 이득우
- 구현
- unity
- DFS
- BFS
- 재귀
- 언리얼
- 개발일지
- 이분탐색
- fsm
- 게임개발공모전
- 알고리즘
- binary_search
- 안드로이드
- unreal
- c++
- lower_bound
- 운영체제
- upper_bound
- 게임개발
- 유한상태기계
- 인프런
- c#
- 프로그래머스
- UI 자동화
- 유니티
- 너비우선탐색
- 백준
- 시리얼라이제이션
- 웅진씽크빅
Archives
- Today
- Total
초고교급 희망
[백준][Python]10866 0 = not cute / 1 = cute 본문
728x90

N = int(input())
survey: int = 0
for i in range(N):
opinion = int(input())
survey += opinion
if (survey / N) > 0.5:
print("Junhee is cute!")
elif (survey / N) < 0.5:
print("Junhee is not cute!")
의견으로 평균을 낸 다음에 분석
귀엽다는 의견(1)이 더 많으면 0.5 초과
안 귀엽다는 의견(0)이 더 많으면 0.5 미만
N은 홀수이니 0.5인 경우는 무시


728x90
'Algorithm > Baekjoon' 카테고리의 다른 글
[백준][C++]2805번 나무 자르기 (0) | 2022.05.16 |
---|---|
[백준][C++]1072번 게임 (0) | 2022.05.16 |
[백준][C++]2908번 상수 (0) | 2021.07.09 |
[백준][C++] 1157번 단어 공부 (0) | 2021.07.08 |
[백준][C++] 4673번 셀프 넘버 (0) | 2021.06.30 |