Created
March 27, 2022 06:55
-
-
Save CAMOBAP/89cbc22ef494444f5dad45ad6ed2a355 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# https://www.bakonkurs.by/kenguru/primery/k2017-3.pdf - task 24 | |
flovers = [6, 7, 8, 11] | |
print(flovers) | |
while flovers.count(0) < 2: | |
mi = flovers.index(min(flovers)) | |
for i, v in enumerate(flovers): | |
if i != mi: | |
flovers[i] -= 1 | |
print(flovers) | |
print(sum(flovers)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment