diff options
| author | Mohammad S Anwar <Mohammad.Anwar@yahoo.com> | 2021-11-26 13:16:22 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-26 13:16:22 +0000 |
| commit | df966962c65252efa22bc8b686013c9c1b0f8680 (patch) | |
| tree | 2cf0b1edf0048ce1058d557b9d6a424e0f6fca2a /challenge-140/abigail/python/ch-1.py | |
| parent | c58aa139f267a08aee64b3129f854b6e637022b3 (diff) | |
| parent | 5e0ab324c5a454538d112d0930d0fa15d6c8c4b7 (diff) | |
| download | perlweeklychallenge-club-df966962c65252efa22bc8b686013c9c1b0f8680.tar.gz perlweeklychallenge-club-df966962c65252efa22bc8b686013c9c1b0f8680.tar.bz2 perlweeklychallenge-club-df966962c65252efa22bc8b686013c9c1b0f8680.zip | |
Merge pull request #5283 from Abigail/abigail/week-140
Abigail/week 140
Diffstat (limited to 'challenge-140/abigail/python/ch-1.py')
| -rw-r--r-- | challenge-140/abigail/python/ch-1.py | 15 |
1 files changed, 15 insertions, 0 deletions
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:]) |
