battledev/2019_11_26/exo2.py

18 lines
272 B
Python
Raw Normal View History

2019-11-26 20:08:54 +01:00
import sys
2019-11-26 17:30:52 +01:00
def main():
2019-11-26 20:08:54 +01:00
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)
2019-11-26 17:30:52 +01:00
if __name__ == "__main__":
main()