結果

問題 No.146 試験監督(1)
コンテスト
ユーザー Common Lisp
提出日時 2024-11-09 16:04:59
言語 Common Lisp
(sbcl 2.6.3)
コンパイル:
sbclc _filename_
実行:
sbcl --script Main.fasl
結果
AC  
実行時間 117 ms / 1,000 ms
コード長 295 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 283 ms
コンパイル使用メモリ 29,696 KB
実行使用メモリ 28,672 KB
最終ジャッジ日時 2026-05-09 07:59:36
合計ジャッジ時間 2,512 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 3
権限があれば一括ダウンロードができます
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 09 MAY 2026 07:59:32 AM):

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

ソースコード

diff #
raw source code

(defconstant +mod+ 1000000007)

(defun main (&rest argv)
  (declare (ignorable argv))
  (let* ((n (read))
         (res 0))
    (dotimes (_ n)
      (let* ((c (read))
             (d (read)))
        (incf res (mod (* (floor (1+ c) 2) d) +mod+))))
    (format t "~d~%" (mod res +mod+))))

(main)
0