結果
問題 | No.188 HAPPY DAY |
ユーザー | regerege |
提出日時 | 2015-09-03 23:51:26 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 161 ms / 1,000 ms |
コード長 | 425 bytes |
コンパイル時間 | 5,769 ms |
コンパイル使用メモリ | 159,476 KB |
実行使用メモリ | 25,004 KB |
最終ジャッジ日時 | 2023-08-29 03:00:38 |
合計ジャッジ時間 | 6,380 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0 Copyright (c) Microsoft Corporation. All Rights Reserved.
ソースコード
open System let rec s (d:DateTime) = seq { yield d yield! s (d.AddDays(1.0)) } let sd = DateTime.Parse("2015/01/01") let ed = DateTime.Parse("2015/12/31") s sd |> Seq.takeWhile ((>=)ed) |> Seq.filter (fun d -> let dd = d.ToString("dd") |> Seq.map (string >> int) |> Seq.reduce((+)) int(d.ToString("MM")) = dd ) |> Seq.length |> printfn "%A"