結果

問題 No.188 HAPPY DAY
ユーザー kuuso1kuuso1
提出日時 2016-08-18 18:51:41
言語 F#
(F# 4.0)
結果
AC  
実行時間 79 ms / 1,000 ms
コード長 632 bytes
コンパイル時間 4,597 ms
コンパイル使用メモリ 167,484 KB
実行使用メモリ 24,944 KB
最終ジャッジ日時 2023-08-29 22:18:50
合計ジャッジ時間 5,220 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
24,944 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

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