about summary refs log tree commit diff
path: root/tht/C/TP-2018/guess.scm
diff options
context:
space:
mode:
authorNguyễn Gia Phong <vn.mcsinyx@gmail.com>2019-12-15 15:09:13 +0700
committerNguyễn Gia Phong <vn.mcsinyx@gmail.com>2019-12-15 15:09:13 +0700
commit9e28e4c7b67c54229df11d355047ac8a88ea1817 (patch)
tree0d9d40db69613c2c49564a3f1987a005d61f4db3 /tht/C/TP-2018/guess.scm
parent67393f42f41ab92219deb549f711121c4dab845b (diff)
downloadcp-9e28e4c7b67c54229df11d355047ac8a88ea1817.tar.gz
Normalize pathname
Diffstat (limited to 'tht/C/TP-2018/guess.scm')
-rw-r--r--tht/C/TP-2018/guess.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/tht/C/TP-2018/guess.scm b/tht/C/TP-2018/guess.scm
new file mode 100644
index 0000000..2274605
--- /dev/null
+++ b/tht/C/TP-2018/guess.scm
@@ -0,0 +1,8 @@
+(with-input-from-file "GUESS.INP"
+  (lambda ()
+    (with-output-to-file "GUESS.OUT"
+      (lambda ()
+        (let* ((a (read))
+               (b (read)))
+          (display ((list-ref (list + - *) (random 3)) a b))
+          (newline))))))