Skip to content

Commit f81fad8

Browse files
committed
69차 3번 문제 풀이 (푸는중)
1 parent 68f88f0 commit f81fad8

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

live6/test69/문제3/박희경.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import copy
2+
3+
4+
def solution(want, number, discount):
5+
answer = 0
6+
7+
product = {}
8+
for i in range(len(want)):
9+
product[want[i]] = number[i]
10+
11+
for a in range(len(discount) - 9):
12+
tmp_product = copy.deepcopy(product)
13+
for i in range(a, a + 10):
14+
if discount[i] in want:
15+
tmp_product[discount[i]] -= 1
16+
print(tmp_product)
17+
# 모두 0일 때 카운팅
18+
# for value in tmp_product.values():
19+
# if value > 0:
20+
# break
21+
# answer += 1
22+
23+
return answer

0 commit comments

Comments
 (0)