-Code
def solution(l):
places = [
[200, 210, 220], [210, 220, 225], [220, 225, 230],
[225, 230, 235], [230, 235, 245], [235, 245, 250],
[260, 265, 270], [265, 270, 275], [270, 275, 280],
[275, 280, 285], [280, 285, 290], [285, 290, 295],
[290, 295, 300]
]
cnts = [500, 300, 100]
answer = [0] * 13
for i in range(13):
for j in range(3):
if places[i][j] <= l:
answer[i] = cnts[j]
return answer
level = int(input())
res = solution(level)
print(*res[:6])
print(*res[6:])
'Beakjoon&프로그래머스 > 파이썬' 카테고리의 다른 글
[백준/파이썬] 32279번 수열의 비밀 (Easy) (0) | 2025.05.30 |
---|---|
[백준/파이썬] 33990번 3대 512 (0) | 2025.05.29 |
[백준/파이썬] 33950번 어게인 포닉스 (0) | 2025.05.27 |
[백준/파이썬] 33963번 돈복사 (0) | 2025.05.26 |
[백준/파이썬] 33869번 일기 암호화하기 (0) | 2025.05.24 |