반응형
베스트 앨범
-
4. 딕셔너리(해시맵)코딩테스트 2024. 3. 20. 00:30
로그인 성공? - https://school.programmers.co.kr/tryouts/85912/challenges dict 메소드 활용해서 리스트를 변환한 후 해결 def solution(id_pw, db): hash_db = dict(db) if id_pw[0] in hash_db: ans = "login" if hash_db[id_pw[0]] == id_pw[1] else "wrong pw" else: ans = "fail" return ans 성격 유형 검사하기 - https://school.programmers.co.kr/tryouts/85913/challenges zip으로 묶어서 비교하는게 포인트 def solution(survey, choices): check = "RTCFJMAN" ..