結果
問題 | No.656 ゴルフ |
ユーザー | tak |
提出日時 | 2018-03-06 09:45:40 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 82 ms / 2,000 ms |
コード長 | 443 bytes |
コンパイル時間 | 4,613 ms |
コンパイル使用メモリ | 161,064 KB |
実行使用メモリ | 24,868 KB |
最終ジャッジ日時 | 2023-10-13 11:15:53 |
合計ジャッジ時間 | 6,295 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 77 ms
20,672 KB |
testcase_01 | AC | 78 ms
24,868 KB |
testcase_02 | AC | 79 ms
22,752 KB |
testcase_03 | AC | 79 ms
24,788 KB |
testcase_04 | AC | 78 ms
24,864 KB |
testcase_05 | AC | 78 ms
22,828 KB |
testcase_06 | AC | 80 ms
20,760 KB |
testcase_07 | AC | 82 ms
24,764 KB |
testcase_08 | AC | 78 ms
22,872 KB |
testcase_09 | AC | 79 ms
22,876 KB |
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0 Copyright (c) Microsoft Corporation. All Rights Reserved.
ソースコード
open System open System.Collections open System.Collections.Generic open System.IO [<EntryPoint>] let main _ = let S = Console.ReadLine().ToCharArray() |> Array.map (fun c -> int c - int '0') let ans = let under = S |> Array.sum let over = S |> Array.where(fun x -> x = 0) |> Array.length |> (*) 10 under + over printfn "%i" ans 0