Nantes Université

Skip to content
Extraits de code Groupes Projets
Valider 65c301fc rédigé par Alexandre CLENET's avatar Alexandre CLENET
Parcourir les fichiers

Delete py.py

parent 9f0e4a51
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
fichier=open("d01/input.txt","r")
lignes = fichier.readlines()
tab=[[]]
i=0
for z in lignes:
if z=="\n":
tab.append([])
i+=1
else:
tab[i].append(int(z.replace("\n","")))
tabsum =[]
for i in tab:
tabsum.append(sum(i))
tabsum.sort()
print(sum(tabsum[len(tabsum)-3:]))
\ No newline at end of file
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter