結果

問題 No.71 そろばん
ユーザー Common Lisp
提出日時 2024-10-28 17:18:52
言語 Common Lisp
(sbcl 2.5.0)
結果
AC  
実行時間 21 ms / 5,000 ms
コード長 276 bytes
コンパイル時間 375 ms
コンパイル使用メモリ 32,640 KB
実行使用メモリ 32,020 KB
最終ジャッジ日時 2024-10-28 17:18:54
合計ジャッジ時間 1,940 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 28 OCT 2024 05:18:52 PM):

; wrote /home/judge/data/code/Main.fasl
; compilation finished in 0:00:00.038

ソースコード

diff #

(defun main (&rest argv)
  (declare (ignorable argv))
  (let* ((n (read))
         (m 0))
    (loop for i from 1 to n do
          (let ((l (+ i (* (- n i) (1+ i)))))
              (when (> l m)
                    (setq m l)))
          finally (format t "~D~%" m))))

(main)
0