結果

問題 No.188 HAPPY DAY
ユーザー kuuso1
提出日時 2016-08-18 18:51:41
言語 F#
(F# 4.0)
結果
AC  
実行時間 354 ms / 1,000 ms
コード長 632 bytes
コンパイル時間 16,229 ms
コンパイル使用メモリ 200,736 KB
実行使用メモリ 33,840 KB
最終ジャッジ日時 2024-12-31 01:01:47
合計ジャッジ時間 11,098 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (352 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

open System
type Sol() =
    member this.Solve() = 
        
        let happyDays m ds = 
            ds |> Seq.filter (fun d -> ((d%10) + (d/10)) = m ) |> Seq.length
        
        let y2015 = [
            (1,[1..31]);
            (2,[1..28]);
            (3,[1..31]);
            (4,[1..30]);
            (5,[1..31]);
            (6,[1..30]);
            (7,[1..31]);
            (8,[1..31]);
            (9,[1..30]);
            (10,[1..31]);
            (11,[1..30]);
            (12,[1..31]) ]
        
        y2015 |> Seq.sumBy (fun (m,ds) -> happyDays m ds ) |> printfn "%d"
        
let mySol = new Sol()
mySol.Solve()
0