Skip to content

Instantly share code, notes, and snippets.

@CAMOBAP
Created March 27, 2022 06:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CAMOBAP/89cbc22ef494444f5dad45ad6ed2a355 to your computer and use it in GitHub Desktop.
Save CAMOBAP/89cbc22ef494444f5dad45ad6ed2a355 to your computer and use it in GitHub Desktop.
#!/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