⭐ 문제 링크
hhttps://school.programmers.co.kr/learn/courses/30/lessons/176963
프로그래머스
코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.
programmers.co.kr
⭐ 풀이 코드
def solution(name, yearning, photo):
answer = []
# 인물별 추억점수 : dict()
score = {}
for i in range(len(name)):
score[name[i]] = yearning[i]
# 사진별 추억점수
for p in photo:
cnt = 0
for pp in p:
if pp in score:
cnt += score[pp]
answer.append(cnt)
return answer
'Python > Programmers' 카테고리의 다른 글
[프로그래머스/Python] Lv 2. 오픈채팅방 (0) | 2023.04.17 |
---|---|
[프로그래머스/Python] Lv 2. [3차] 압축 (0) | 2023.04.16 |
[프로그래머스/Python] Lv 1. 명예의 전당 (1) (0) | 2023.04.16 |
[프로그래머스/Python] Lv 1. 과일 장수 (0) | 2023.04.16 |
[프로그래머스/Python] Lv 2. 2 x n 타일링 (0) | 2023.04.15 |