Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- Split
- 프로그래머스
- deque
- DICTIONARY
- 문자열 내마음대로 정렬하기
- IO bound
- port
- 크기가 작은 부분 문자열
- CPU bound
- dns
- http
- URL
- process
- stack
- 2차원 배열 출력
- green thread
- reflection
- springMVC
- 가장 가까운 단어
- 코딩테스트
- TCP/IP
- Spring
- annotation
- CPU
- java
- frontPattern
- 십진수 이진수 전환
- 문자열
- 동시성문제
- Queue
Archives
- Today
- Total
아무나개발하자
완주하지 못한 선수 본문
문제
https://school.programmers.co.kr/learn/courses/30/lessons/42576?language=python3
프로그래머스
코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.
programmers.co.kr
풀이
def solution(participant, completion):
answer = ''
check = dict()
for elem in completion:
if elem not in check:
check[elem] = 1
else:
check[elem] += 1
for elem in participant:
if elem in check:
check[elem] -= 1
if check[elem] == -1:
answer = elem
break
else:
answer = elem
break
return answer
'코딩테스트' 카테고리의 다른 글
N개의 최소 공배수 (0) | 2023.01.30 |
---|---|
영어 끝말잇기 (0) | 2023.01.28 |
[1차] 캐시 (0) | 2023.01.27 |
문자열 내 마음대로 정렬하기 (0) | 2023.01.26 |
가장 가까운 같은 글자 (0) | 2023.01.13 |