結果
| 問題 | No.188 HAPPY DAY |
| コンテスト | |
| ユーザー |
Common Lisp
|
| 提出日時 | 2024-10-08 14:38:56 |
| 言語 | Common Lisp (sbcl 2.6.3) |
| 結果 |
AC
|
| 実行時間 | 9 ms / 1,000 ms |
| コード長 | 656 bytes |
| 記録 | |
| コンパイル時間 | 947 ms |
| コンパイル使用メモリ | 35,292 KB |
| 実行使用メモリ | 22,400 KB |
| 最終ジャッジ日時 | 2026-04-25 00:00:15 |
| 合計ジャッジ時間 | 1,633 ms |
|
ジャッジサーバーID (参考情報) |
judge4_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 25 APR 2026 12:00:13 AM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.098
ソースコード
; 月の値 = (日の値 / 10) + (日の値 % 10)
; となる日を毎月カウントし
; 通年で足し合わせる 答えは 30
(defvar *2015days* #(0 31 28 31 30 31 30 31 31 30 31 30 31))
(defun main ()
(princ
; from i to j [i, i+1, i+2, ..., j] の範囲を繰り返す
(loop for i from 1 to 12
for d = (aref *2015days* i)
; sum 以下の値を足し合わせたものを返す
sum (loop for j from 1 to d
; count 条件を満たす要素数を返す
count (= i (+ (floor j 10) (mod j 10))))))
(terpri))
(main)
; (defun main ()
; (princ 30)
; (terpri))
; (main)
Common Lisp