結果
| 問題 | No.188 HAPPY DAY |
| コンテスト | |
| ユーザー |
kuuso1
|
| 提出日時 | 2016-08-18 18:51:41 |
| 言語 | F# (F# 10.0) |
| 結果 |
AC
|
| 実行時間 | 210 ms / 1,000 ms |
| コード長 | 632 bytes |
| 記録 | |
| コンパイル時間 | 13,678 ms |
| コンパイル使用メモリ | 218,736 KB |
| 実行使用メモリ | 37,268 KB |
| 最終ジャッジ日時 | 2026-06-04 12:23:08 |
| 合計ジャッジ時間 | 14,777 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (195 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net10.0/main.dll main -> /home/judge/data/code/bin/Release/net10.0/publish/
ソースコード
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()
kuuso1