mirror of
https://github.com/Fare-spec/cours.git
synced 2025-12-08 03:00:37 +00:00
my version
This commit is contained in:
@@ -7,7 +7,7 @@ def force_brute(liste, i, j):
|
||||
|
||||
|
||||
def somme_max(liste):
|
||||
max_actuel = max_total = liste[0]
|
||||
max_actuel = max_total = liste[0]
|
||||
for x in liste[1:]:
|
||||
max_actuel = max(x, max_actuel + x)
|
||||
max_total = max(max_total, max_actuel)
|
||||
|
||||
Reference in New Issue
Block a user