結果
| 問題 | No.87 Advent Calendar Problem | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2018-09-05 18:02:31 | 
| 言語 | Scheme (Gauche-0.9.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 45 ms / 5,000 ms | 
| コード長 | 402 bytes | 
| コンパイル時間 | 118 ms | 
| コンパイル使用メモリ | 6,820 KB | 
| 実行使用メモリ | 19,584 KB | 
| 最終ジャッジ日時 | 2024-11-15 17:18:53 | 
| 合計ジャッジ時間 | 3,673 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 24 | 
ソースコード
(use srfi-19)
(define (main args)
  (let* [(n (read))
         (c4 (quotient (- n 2014) 400))
         (rsy (+ 2015 (* 400 c4)))
         (d4 (days-wednesday 2015 2414))]
    (print (+ (* c4 d4) (days-wednesday rsy n))))
  0)
(define (days-wednesday sy ey)
  (length
   (filter (^y (= y 3))
           (map (^y (date-week-day (make-date 0 0 0 0 23 7 y 0)))
                (iota (- ey sy -1) sy)))))
            
            
            
        