結果

問題 No.188 HAPPY DAY
ユーザー MOD9cXWdOsRxvPyMOD9cXWdOsRxvPy
提出日時 2022-09-18 18:20:46
言語 Scheme
(Gauche-0.9.14)
結果
WA  
実行時間 -
コード長 342 bytes
コンパイル時間 51 ms
コンパイル使用メモリ 5,296 KB
実行使用メモリ 12,836 KB
最終ジャッジ日時 2023-08-23 18:15:23
合計ジャッジ時間 620 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

(define eom '(31 28 31 30 31 30 31 31 30 31 30 31))
(define ds (iota 31 1))

(define (sum-digit x)
  (if (< x 10)
      x
      (+ (div x 10) (mod x 10))))

(define sdod (map (^ (x) (sum-digit x)) ds))

(let loop ([i 0] [s 0])
  (if (= i 12)
      (format #t "~d~%" s)
      (loop (+ i 1) (+ s(length (filter (^ (x) (= x (+ i 1))) sdod))))))
0