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 9616KB
stdin
工藤嘉悦
stdout
名前または学籍番号を入力:結果:小吉!まずは一歩
stderr
Warning: reserving address range 0x80000c0000...0x1fffffffffff that contains memory mappings. clisp might crash later!
Memory dump:
  0x8000000000 - 0x80000bffff
  0x14ff38e00000 - 0x14ff390e4fff
  0x14ff39215000 - 0x14ff39239fff
  0x14ff3923a000 - 0x14ff393acfff
  0x14ff393ad000 - 0x14ff393f5fff
  0x14ff393f6000 - 0x14ff393f8fff
  0x14ff393f9000 - 0x14ff393fbfff
  0x14ff393fc000 - 0x14ff393fffff
  0x14ff39400000 - 0x14ff39402fff
  0x14ff39403000 - 0x14ff39601fff
  0x14ff39602000 - 0x14ff39602fff
  0x14ff39603000 - 0x14ff39603fff
  0x14ff39680000 - 0x14ff3968ffff
  0x14ff39690000 - 0x14ff396c3fff
  0x14ff396c4000 - 0x14ff397fafff
  0x14ff397fb000 - 0x14ff397fbfff
  0x14ff397fc000 - 0x14ff397fefff
  0x14ff397ff000 - 0x14ff397fffff
  0x14ff39800000 - 0x14ff39803fff
  0x14ff39804000 - 0x14ff39a03fff
  0x14ff39a04000 - 0x14ff39a04fff
  0x14ff39a05000 - 0x14ff39a05fff
  0x14ff39a31000 - 0x14ff39a34fff
  0x14ff39a35000 - 0x14ff39a35fff
  0x14ff39a36000 - 0x14ff39a37fff
  0x14ff39a38000 - 0x14ff39a38fff
  0x14ff39a39000 - 0x14ff39a39fff
  0x14ff39a3a000 - 0x14ff39a3afff
  0x14ff39a3b000 - 0x14ff39a48fff
  0x14ff39a49000 - 0x14ff39a56fff
  0x14ff39a57000 - 0x14ff39a63fff
  0x14ff39a64000 - 0x14ff39a67fff
  0x14ff39a68000 - 0x14ff39a68fff
  0x14ff39a69000 - 0x14ff39a69fff
  0x14ff39a6a000 - 0x14ff39a6ffff
  0x14ff39a70000 - 0x14ff39a71fff
  0x14ff39a72000 - 0x14ff39a72fff
  0x14ff39a73000 - 0x14ff39a73fff
  0x14ff39a74000 - 0x14ff39a74fff
  0x14ff39a75000 - 0x14ff39aa2fff
  0x14ff39aa3000 - 0x14ff39ab1fff
  0x14ff39ab2000 - 0x14ff39b57fff
  0x14ff39b58000 - 0x14ff39beefff
  0x14ff39bef000 - 0x14ff39beffff
  0x14ff39bf0000 - 0x14ff39bf0fff
  0x14ff39bf1000 - 0x14ff39c04fff
  0x14ff39c05000 - 0x14ff39c2cfff
  0x14ff39c2d000 - 0x14ff39c36fff
  0x14ff39c37000 - 0x14ff39c38fff
  0x14ff39c39000 - 0x14ff39c3efff
  0x14ff39c3f000 - 0x14ff39c41fff
  0x14ff39c44000 - 0x14ff39c44fff
  0x14ff39c45000 - 0x14ff39c45fff
  0x14ff39c46000 - 0x14ff39c46fff
  0x14ff39c47000 - 0x14ff39c47fff
  0x14ff39c48000 - 0x14ff39c48fff
  0x14ff39c49000 - 0x14ff39c4ffff
  0x14ff39c50000 - 0x14ff39c52fff
  0x14ff39c53000 - 0x14ff39c53fff
  0x14ff39c54000 - 0x14ff39c74fff
  0x14ff39c75000 - 0x14ff39c7cfff
  0x14ff39c7d000 - 0x14ff39c7dfff
  0x14ff39c7e000 - 0x14ff39c7efff
  0x14ff39c7f000 - 0x14ff39c7ffff
  0x55d5dd772000 - 0x55d5dd862fff
  0x55d5dd863000 - 0x55d5dd96cfff
  0x55d5dd96d000 - 0x55d5dd9ccfff
  0x55d5dd9ce000 - 0x55d5dd9fcfff
  0x55d5dd9fd000 - 0x55d5dda2dfff
  0x55d5dda2e000 - 0x55d5dda31fff
  0x55d5df606000 - 0x55d5df626fff
  0x7ffee7a66000 - 0x7ffee7a86fff
  0x7ffee7ba2000 - 0x7ffee7ba5fff
  0x7ffee7ba6000 - 0x7ffee7ba7fff