fork download
  1. (defun fortunecookie ()
  2. (princ "今日の日付を入力:")
  3. (let* ((id (read-line))
  4. (seed (reduce (lambda(a b)(+ a b)) (map 'list #'char-code id)))
  5. (result (nth (mod seed 5)
  6. '("大吉! 挑戦を続けよう"
  7. "中吉! 今日は集中の日"
  8. "小吉! まずは一歩"
  9. "吉! 粘り勝ちを目指そう"
  10. "凶...でも明日がある! "))))
  11. (format t "結果:~A~%" result)))
  12. (fortunecookie)
Success #stdin #stdout 0.01s 29288KB
stdin
2025年6月17日
stdout
今日の日付を入力:結果:大吉! 挑戦を続けよう