diff options
| author | Luis Mochan <mochan@fis.unam.mx> | 2021-07-19 14:26:28 -0500 |
|---|---|---|
| committer | Luis Mochan <mochan@fis.unam.mx> | 2021-07-19 14:26:28 -0500 |
| commit | e542ee52b8f6be5d340550000cbe98f4b2aefb1e (patch) | |
| tree | f419b7bb3501203a1d2b637eeb61df2eba87768d /challenge-121/abigail/python/ch-1.py | |
| parent | 51feed7f6f1ba280658615d36ee2f7ccf77b5000 (diff) | |
| parent | 675c4ed9a3b441729b9558c051638027242ba77a (diff) | |
| download | perlweeklychallenge-club-e542ee52b8f6be5d340550000cbe98f4b2aefb1e.tar.gz perlweeklychallenge-club-e542ee52b8f6be5d340550000cbe98f4b2aefb1e.tar.bz2 perlweeklychallenge-club-e542ee52b8f6be5d340550000cbe98f4b2aefb1e.zip | |
Merge branch 'master' of github.com:manwar/perlweeklychallenge-club into challenges
Diffstat (limited to 'challenge-121/abigail/python/ch-1.py')
| -rw-r--r-- | challenge-121/abigail/python/ch-1.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/challenge-121/abigail/python/ch-1.py b/challenge-121/abigail/python/ch-1.py new file mode 100644 index 0000000000..559b5e16d0 --- /dev/null +++ b/challenge-121/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 (): + [m, n] = map (lambda _: int (_), line . rstrip () . split (" ")) + print (m ^ (1 << (n - 1))) |
