둘만의 암호
-
둘만의 암호코딩테스트 연습 2023. 11. 14. 10:54
문제 설명 제한사항 입출력 예 및 설명 내 풀이 def solution(s, skip, index): answer = '' alpha = [chr(x) for x in range(97,123)] for rm in skip: alpha.remove(rm) alpha_dict = {} for idx, ch in enumerate(alpha): alpha_dict[ch] = idx check = True for ch in s: index += alpha_dict[ch] if index > alpha_dict['z']: index -= alpha_dict['z']+1 answer += alpha[index] index = 5 return answer 채점 결과 틀렸다.. 테스트 코드는 맞았는데... 뭐가 문제인..