From fb39699b31d65405e7d104ee2b1c1c4edcdf51a8 Mon Sep 17 00:00:00 2001 From: Abigail Date: Tue, 23 Nov 2021 16:00:43 +0100 Subject: Solutions for week 140, part 1. --- challenge-140/abigail/python/ch-1.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 challenge-140/abigail/python/ch-1.py (limited to 'challenge-140/abigail/python/ch-1.py') diff --git a/challenge-140/abigail/python/ch-1.py b/challenge-140/abigail/python/ch-1.py new file mode 100644 index 0000000000..7002b13c03 --- /dev/null +++ b/challenge-140/abigail/python/ch-1.py @@ -0,0 +1,15 @@ +#!/opt/local/bin/python + +# +# See ../README.md +# + +# +# Run as: python ch-1.py < input-file +# + +import fileinput + +for line in fileinput . input (): + a, b = line . strip () . split (" ") + print (bin (int (a, 2) + int (b, 2)) [2:]) -- cgit