Skip to content

Commit 1d8c2ef

Browse files
committed
210523
1 parent be5f280 commit 1d8c2ef

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
'''
2+
https://programmers.co.kr/learn/courses/30/lessons/77484
3+
로또의 최고 순위와 최저 순위
4+
'''
5+
6+
def solution(lottos, win_nums):
7+
rank = [6, 6, 5, 4, 3, 2, 1]
8+
unk = lottos.count(0)
9+
win = 6 - len(set(win_nums) - set(lottos))
10+
return [rank[win + unk], rank[win]]
11+
12+
'''
13+
오랜만에 알고리즘
14+
다시 시작!
15+
'''
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
'''
2+
https://programmers.co.kr/learn/courses/30/lessons/76501
3+
음양 더하기
4+
'''
5+
6+
def solution(absolutes, signs):
7+
return sum([num*(2*int(sign)-1) for num, sign in zip(absolutes, signs)])
8+
9+
'''
10+
오랜만에 알고리즘
11+
다시 시작!
12+
'''

0 commit comments

Comments
 (0)