結果
| 問題 |
No.701 ひとりしりとり
|
| コンテスト | |
| ユーザー |
Common Lisp
|
| 提出日時 | 2024-11-03 10:51:43 |
| 言語 | Common Lisp (sbcl 2.5.0) |
| 結果 |
AC
|
| 実行時間 | 212 ms / 2,000 ms |
| コード長 | 746 bytes |
| コンパイル時間 | 180 ms |
| コンパイル使用メモリ | 39,828 KB |
| 実行使用メモリ | 57,724 KB |
| 最終ジャッジ日時 | 2024-11-03 10:51:46 |
| 合計ジャッジ時間 | 2,753 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 03 NOV 2024 10:51:43 AM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.024
ソースコード
(defun main (&rest argv)
(declare (ignorable argv))
(let* ((n (read))
(alphabet (make-array 26 :initial-contents '("a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z")))
(word-array (make-array (* 26 26 26 26) :element-type 'string :initial-element "")))
(dotimes (a 26)
(dotimes (b 26)
(dotimes (c 26)
(dotimes (d 26)
(setf (aref word-array (+ (* 26 26 26 a) (* 26 26 b) (* 26 c) d))
(concatenate 'string "a" (aref alphabet a) (aref alphabet b) (aref alphabet c) (aref alphabet d) "a"))))))
(dotimes (i (1- n))
(format t "~a~%" (aref word-array i)))
(format t "~an~%" (aref word-array (1- n)))))
(main)
Common Lisp