LoginSignup
1
0

More than 3 years have passed since last update.

眠れない夜のために(2)〜延々と羊を数え続ける関数〜sheeps.

Last updated at Posted at 2019-01-16

眠れない夜にこのプログラムを実行して、延々と画面を見続けましょう。
多倍長数なので、オーバーフローするまで寝ないで見続けると、多分、人間は死にます。

(defun sheeps () (do ((i 1 (+ i 1))) (() ()) (format t "羊が~A匹~%" i)))

clispのインストール(Ubuntu,Debian)

sudo apt-get install clisp

python版

sheeps.py
#!/usr/bin/python3
print ("1 sheep.")
i=2
while True:
  print(i,"sheeps.")
  i+=1
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0