문제 링크: https://www.codetree.ai/frequent-problems/virus-detector/description
코드트리
국가대표가 만든 코딩 공부의 가이드북 코딩 왕초보부터 꿈의 직장 코테 합격까지, 국가대표가 엄선한 커리큘럼으로 준비해보세요.
www.codetree.ai
*같은 문제: 백준 13458 - 시험 감독
간단한 사칙연산 문제. 팀장은 무조건 1명씩 들어가야 한다.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n = int(input()) | |
lst = list(map(int, input().split())) | |
x, y = map(int, input().split()) | |
sol = len(lst) # 무조건 팀장 1명 | |
for num in lst: | |
sol += max(num-x, 0)//y + bool(max(num-x, 0)%y) | |
print(sol) |
'알고리즘 문제풀이 > 코드트리(삼성 기출)' 카테고리의 다른 글
정육면체 한번 더 굴리기(2021 하반기 오전 1번, 백준 23288 주사위 굴리기 2) (0) | 2022.10.11 |
---|---|
술래잡기(2022 상반기 오전 1번) (0) | 2022.10.11 |
외주 수익 최대화하기(2017 상반기 오전 2번, 백준 14501 퇴사) (0) | 2022.10.09 |
토스트 계란틀(2018 하반기 오전 2번, 백준 16234 인구 이동) (0) | 2022.10.09 |
연산자 배치하기(2017 하반기 오후 2번, 백준 14888 연산자 끼워넣기) (0) | 2022.10.08 |