1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#!/opt/local/bin/python # # See ../README.md # # # Run as: python ch-2.py < input-file # import fileinput for line in fileinput . input (): numbers = list (map (lambda _: int (_), line . split ())) total = sum (numbers) print (' ' . join (map (lambda _: str (total - _), numbers)))