結果

問題 No.369 足し間違い
コンテスト
ユーザー Common Lisp
提出日時 2024-10-08 20:28:08
言語 Common Lisp
(sbcl 2.6.7)
コンパイル:
sbclc _filename_
実行:
sbcl --script Main.fasl
結果
AC  
実行時間 7 ms / 2,000 ms
+ 763µs
コード長 302 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 270 ms
コンパイル使用メモリ 27,392 KB
実行使用メモリ 19,712 KB
最終ジャッジ日時 2026-09-12 05:47:23
合計ジャッジ時間 1,212 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5
権限があれば一括ダウンロードができます
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 12 SEP 2026 05:47:22 AM):

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

ソースコード

diff #
raw source code

; reduce #'+ => sum
; loop repeat n collect (read) => n 個の数を 1 つのリストとして読み込む
(defun main ()
  (let* ((n (read))
         (real-answer (reduce #'+ (loop repeat n collect (read))))
         (yuki-answer (read)))
    (princ (- real-answer yuki-answer))
    (terpri)))
(main)
0