2022 KAKAO TECH INTERNSHIP - 성격 유형 검사하기


2022 KAKAO TECH INTERNSHIP - 성격 유형 검사하기

카카오 인턴십 알고리즘 문제 - LV 1 문제 본문 나의 풀이(Python) import collections def solution(survey, choices): answer = '' type_count = collections.defaultdict(int) for idx, t in enumerate(survey): c = choices[idx] cnt = 0 if c == 4: continue elif c < 4: character_type = t[0] cnt = 4 - c else: character_type = t[-1] cnt = c - 4 type_count[character_type] += cnt type_collect = ['RT', 'CF', 'JM', 'AN'] for t in type_collect: if type_count[t[0]] > type_count[t[1]]: answer += t[0] elif type_count[t[0]] < type_count[t...


#Programmers #카카오 #코딩테스트

원문링크 : 2022 KAKAO TECH INTERNSHIP - 성격 유형 검사하기