結果
| 問題 | No.29 パワーアップ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-24 19:29:34 |
| 言語 | Common Lisp (sbcl 2.5.0) |
| 結果 |
AC
|
| 実行時間 | 10 ms / 5,000 ms |
| コード長 | 675 bytes |
| 記録 | |
| コンパイル時間 | 152 ms |
| コンパイル使用メモリ | 35,156 KB |
| 実行使用メモリ | 25,792 KB |
| 最終ジャッジ日時 | 2025-10-24 21:21:34 |
| 合計ジャッジ時間 | 924 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 24 OCT 2025 09:21:32 PM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.061
ソースコード
(defvar N)
(setq N (parse-integer (read-line)))
(defparameter item (make-array 11 :initial-element 0))
;テスト
(loop for line = (read-line nil nil) while line do
(setq line (concatenate 'string "(" line ")" ))
(setq line (read-from-string line))
(loop for i from 0 to 2 do
;(print (nth i line))
(incf (aref item (nth i line)))
)
;(print item )
)
(defparameter sum 0)
(loop for i from 1 to 10 do
(setq sum (+ sum (floor (aref item i) 2)))
(setf (aref item i) (mod (aref item i) 2) )
;(print item)
)
(defparameter sum2 0)
(loop for i from 1 to 10 do
(setq sum2 (+ sum2 (aref item i)))
)
(setq sum (+ sum (floor sum2 4)))
;(print sum)
(format 't "~d~%" sum)