for else2 구름레벨 '계수기 만들기' 파이썬 코드 https://level.goorm.io/exam/43061/%EA%B3%84%EC%88%98%EA%B8%B0-%EB%A7%8C%EB%93%A4%EA%B8%B0/quiz/1 구름LEVEL 난이도별 다양한 문제를 해결함으로써 SW 역량을 향상시킬 수 있습니다. level.goorm.io m = int(input()) line_maxs = [v + 1 for v in map(int, input().split())] line_inits = list(map(int, input().split())) answers = [0] * m count = int(input()) for a, b in zip(line_maxs, line_inits): if a 2023. 10. 17. 프로그래머스 '스킬트리' 파이썬 풀이 https://school.programmers.co.kr/learn/courses/30/lessons/49993 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr def solution(skill, skill_trees): answer = 0 for skill_tree in skill_trees: _max = -1 for step in skill_tree: if step in skill and skill.index(step) != (_max:=_max+1): break else: answer += 1 return answer """ for-else 구문을 .. 2023. 7. 10. 이전 1 다음