aboutsummaryrefslogtreecommitdiff
path: root/challenge-121/abigail/tcl/ch-1.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-121/abigail/tcl/ch-1.tcl')
-rw-r--r--challenge-121/abigail/tcl/ch-1.tcl12
1 files changed, 12 insertions, 0 deletions
diff --git a/challenge-121/abigail/tcl/ch-1.tcl b/challenge-121/abigail/tcl/ch-1.tcl
new file mode 100644
index 0000000000..5fe52269a8
--- /dev/null
+++ b/challenge-121/abigail/tcl/ch-1.tcl
@@ -0,0 +1,12 @@
+#
+# See ../README.md
+#
+
+#
+# Run as: tclsh ch-1.tcl < input-file
+#
+
+while {[gets stdin line] >= 0} {
+ lassign [split $line " "] m n
+ puts [expr $m ^ (1 << ($n - 1))]
+}