Skip to content

Commit 79493f3

Browse files
authored
Create make_bricks.py
1 parent 524ce1c commit 79493f3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Logic-2/make_bricks.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
def make_bricks(small, big, goal):
2+
if big * 5 + small < goal:
3+
return False
4+
elif (goal % 5 == 0) and (big >= goal//5):
5+
return True
6+
elif (big >= goal // 5) and (small >= goal % 5):
7+
return True
8+
elif goal - big * 5 <= small and big * 5 <= goal:
9+
return True
10+
return False

0 commit comments

Comments
 (0)