結果
| 問題 | No.289 数字を全て足そう |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-06-08 03:29:50 |
| 言語 | Common Lisp (sbcl 2.6.9) |
| 結果 |
AC
不安定
|
| 実行時間 | 7 ms / 1,000 ms |
| + 454µs | |
| コード長 | 296 bytes |
| 記録 | |
| コンパイル時間 | 1,306 ms |
| コンパイル使用メモリ | 37,484 KB |
| 実行使用メモリ | 27,772 KB |
| 最終ジャッジ日時 | 2026-10-24 13:45:43 |
| 合計ジャッジ時間 | 3,343 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge6_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 24 OCT 2026 01:45:39 PM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.030
ソースコード
(defun solve ()
(let ((s (read-line)) (i 0) (answer 0))
(loop while (< i (length s)) do
(if (digit-char-p (char s i))
(setf answer (+ answer (- (char-code (char s i)) (char-code #\0)))))
(incf i))
answer))
(defun main () (format t "~A~%" (solve)))
(main)