fork download
  1. (defun fortunecookie ()
  2. (princ "名前または学籍番号を入力:")
  3. (let* ((id (read-line))
  4. (now (multiple-value-list (decode-universal-time (get-universal-time))))
  5. (year (nth 5 now))
  6. (month (nth 4 now))
  7. (day (nth 3 now))
  8. ;; 日付文字列を作成して、IDと一緒に使う
  9. (date-str (format nil "~4,'0D~2,'0D~2,'0D" year month day))
  10. (full-seed-str (concatenate 'string id date-str))
  11. (char-codes (map 'list #'char-code full-seed-str))
  12. (seed (reduce #'+ char-codes :initial-value 0))
  13. (result (nth (mod seed 5)
  14. '("大吉!挑戦を続けよう"
  15. "中吉!今日は集中の日"
  16. "小吉!まずは一歩"
  17. "吉!粘り勝ちを目指そう"
  18. "凶…でも明日がある!"))))
  19. (format t "結果:~A~%" result)))
  20.  
  21. (fortunecookie)
  22.  
Success #stdin #stdout #stderr 0.02s 9632KB
stdin
工藤嘉悦
stdout
名前または学籍番号を入力:結果:小吉!まずは一歩
stderr
Warning: reserving address range 0x80000c0000...0x1fffffffffff that contains memory mappings. clisp might crash later!
Memory dump:
  0x8000000000 - 0x80000bffff
  0x14f326200000 - 0x14f3264e4fff
  0x14f326600000 - 0x14f326602fff
  0x14f326603000 - 0x14f326801fff
  0x14f326802000 - 0x14f326802fff
  0x14f326803000 - 0x14f326803fff
  0x14f326815000 - 0x14f326839fff
  0x14f32683a000 - 0x14f3269acfff
  0x14f3269ad000 - 0x14f3269f5fff
  0x14f3269f6000 - 0x14f3269f8fff
  0x14f3269f9000 - 0x14f3269fbfff
  0x14f3269fc000 - 0x14f3269fffff
  0x14f326a00000 - 0x14f326a03fff
  0x14f326a04000 - 0x14f326c03fff
  0x14f326c04000 - 0x14f326c04fff
  0x14f326c05000 - 0x14f326c05fff
  0x14f326c30000 - 0x14f326c31fff
  0x14f326c32000 - 0x14f326c41fff
  0x14f326c42000 - 0x14f326c75fff
  0x14f326c76000 - 0x14f326dacfff
  0x14f326dad000 - 0x14f326dadfff
  0x14f326dae000 - 0x14f326db0fff
  0x14f326db1000 - 0x14f326db1fff
  0x14f326db2000 - 0x14f326db3fff
  0x14f326db4000 - 0x14f326db4fff
  0x14f326db5000 - 0x14f326db6fff
  0x14f326db7000 - 0x14f326db7fff
  0x14f326db8000 - 0x14f326db8fff
  0x14f326db9000 - 0x14f326db9fff
  0x14f326dba000 - 0x14f326dc7fff
  0x14f326dc8000 - 0x14f326dd5fff
  0x14f326dd6000 - 0x14f326de2fff
  0x14f326de3000 - 0x14f326de6fff
  0x14f326de7000 - 0x14f326de7fff
  0x14f326de8000 - 0x14f326de8fff
  0x14f326de9000 - 0x14f326deefff
  0x14f326def000 - 0x14f326df0fff
  0x14f326df1000 - 0x14f326df1fff
  0x14f326df2000 - 0x14f326df2fff
  0x14f326df3000 - 0x14f326df3fff
  0x14f326df4000 - 0x14f326e21fff
  0x14f326e22000 - 0x14f326e30fff
  0x14f326e31000 - 0x14f326ed6fff
  0x14f326ed7000 - 0x14f326f6dfff
  0x14f326f6e000 - 0x14f326f6efff
  0x14f326f6f000 - 0x14f326f6ffff
  0x14f326f70000 - 0x14f326f83fff
  0x14f326f84000 - 0x14f326fabfff
  0x14f326fac000 - 0x14f326fb5fff
  0x14f326fb6000 - 0x14f326fb7fff
  0x14f326fb8000 - 0x14f326fbdfff
  0x14f326fbe000 - 0x14f326fc0fff
  0x14f326fc3000 - 0x14f326fc3fff
  0x14f326fc4000 - 0x14f326fc4fff
  0x14f326fc5000 - 0x14f326fc5fff
  0x14f326fc6000 - 0x14f326fc6fff
  0x14f326fc7000 - 0x14f326fc7fff
  0x14f326fc8000 - 0x14f326fcefff
  0x14f326fcf000 - 0x14f326fd1fff
  0x14f326fd2000 - 0x14f326fd2fff
  0x14f326fd3000 - 0x14f326ff3fff
  0x14f326ff4000 - 0x14f326ffbfff
  0x14f326ffc000 - 0x14f326ffcfff
  0x14f326ffd000 - 0x14f326ffdfff
  0x14f326ffe000 - 0x14f326ffefff
  0x559329591000 - 0x559329681fff
  0x559329682000 - 0x55932978bfff
  0x55932978c000 - 0x5593297ebfff
  0x5593297ed000 - 0x55932981bfff
  0x55932981c000 - 0x55932984cfff
  0x55932984d000 - 0x559329850fff
  0x55932ab97000 - 0x55932abb7fff
  0x7fffc077c000 - 0x7fffc079cfff
  0x7fffc07f2000 - 0x7fffc07f5fff
  0x7fffc07f6000 - 0x7fffc07f7fff