Solve exo 2

This commit is contained in:
Gabriel Augendre 2019-11-26 20:08:54 +01:00
parent 2dc25838c2
commit 22dfd7513a
No known key found for this signature in database
GPG key ID: 1E693F4CE4AEE7B4

13
exo2.py
View file

@ -1,5 +1,16 @@
import sys
def main(): def main():
pass lines = []
for line in sys.stdin:
lines.append(int(line.rstrip("\n")))
smallest = min(lines)
dropped = 0
for line in lines:
dropped += line - smallest
print(dropped)
if __name__ == "__main__": if __name__ == "__main__":