From 22dfd7513afc117a65d61eb4143bcfa562d243a1 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Tue, 26 Nov 2019 20:08:54 +0100 Subject: [PATCH] Solve exo 2 --- exo2.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/exo2.py b/exo2.py index cd9ac48..f48480b 100644 --- a/exo2.py +++ b/exo2.py @@ -1,5 +1,16 @@ +import sys + + 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__":