Skip to content

Commit c0109e2

Browse files
committed
95차 3번 문제풀이
1 parent 154cbd9 commit c0109e2

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

live9/test95/문제3/백유진.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from itertools import combinations
2+
def solution(brown, yellow):
3+
answer = []
4+
5+
total = brown + yellow
6+
7+
for h in range(1, total+1):
8+
if total%h == 0:
9+
w = total//h
10+
if (w-2)*(h-2) == yellow:
11+
return [w, h]
12+
13+
return answer

0 commit comments

Comments
 (0)