mirror of
https://github.com/theoludwig/programming-challenges.git
synced 2024-10-29 22:17:23 +01:00
feat(solutions): add cakes-swerc-2020-2021/python/function
This commit is contained in:
parent
112a141caa
commit
0df7b6620e
@ -0,0 +1,3 @@
|
||||
# cakes-swerc-2020-2021/python/function
|
||||
|
||||
Created by [@Divlo](https://github.com/Divlo) on 23 April 2022.
|
@ -0,0 +1,13 @@
|
||||
from typing import List
|
||||
import sys
|
||||
|
||||
maximum_number_of_cake_possible = None
|
||||
|
||||
next(sys.stdin)
|
||||
for line in sys.stdin:
|
||||
quantity_per_cake, quantity_available = list(map(int, line.split(' ')))
|
||||
cake_possible = quantity_available // quantity_per_cake
|
||||
if maximum_number_of_cake_possible == None or cake_possible < maximum_number_of_cake_possible:
|
||||
maximum_number_of_cake_possible = cake_possible
|
||||
|
||||
print(maximum_number_of_cake_possible)
|
Loading…
Reference in New Issue
Block a user