結果
| 問題 |
No.1081 和の和
|
| コンテスト | |
| ユーザー |
Common Lisp
|
| 提出日時 | 2024-11-05 16:42:21 |
| 言語 | Common Lisp (sbcl 2.5.0) |
| 結果 |
AC
|
| 実行時間 | 11 ms / 2,000 ms |
| コード長 | 377 bytes |
| コンパイル時間 | 495 ms |
| コンパイル使用メモリ | 39,688 KB |
| 実行使用メモリ | 29,884 KB |
| 最終ジャッジ日時 | 2024-11-05 16:42:23 |
| 合計ジャッジ時間 | 1,393 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 8 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 05 NOV 2024 04:42:21 PM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.019
ソースコード
(defconstant +mod107+ 1000000007)
(defun main (&rest argv)
(declare (ignorable argv))
(let* ((n (read))
(a (make-array 100 :element-type 'integer)))
(dotimes (i n) (setf (aref a i) (read)))
(dotimes (i (1- n))
(dotimes (j (- n 1 i))
(setf (aref a j) (mod (+ (aref a j) (aref a (1+ j))) +mod107+))))
(format t "~d~%" (aref a 0))))
(main)
Common Lisp