aboutsummaryrefslogtreecommitdiff
path: root/challenge-121/abigail/python/ch-1.py
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-121/abigail/python/ch-1.py')
-rw-r--r--challenge-121/abigail/python/ch-1.py15
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)))