[프로그래머스 - Javascript] Lv.1 모의고사
문제 https://school.programmers.co.kr/learn/courses/30/lessons/42840?language=javascript 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 풀이 function solution(answers) { one = [1, 2, 3, 4, 5]; two = [2, 1, 2, 3, 2, 4, 2, 5]; three = [3, 3, 1, 1, 2, 2, 4, 4, 5, 5]; let countOne = 0; let countTwo = 0; let countThree = 0; for (let i = 0; i..
2023. 2. 7.
[프로그래머스 - Python/JavaScript] Lv.1 숫자 문자열과 영단어
문제 https://school.programmers.co.kr/learn/courses/30/lessons/81301 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 풀이 - Python def solution(s): change = { 0: 'zero', 1: 'one', 2: 'two', 3: 'three', 4: 'four', 5: 'five', 6: 'six', 7: 'seven', 8: 'eight', 9: 'nine' } for x in change.values(): if x in s: s = s.replace(x, str([i for i, j..
2023. 2. 7.