結果

問題 No.712 赤旗
ユーザー taktak
提出日時 2018-07-27 17:17:41
言語 F#
(F# 4.0)
結果
AC  
実行時間 86 ms / 2,000 ms
コード長 311 bytes
コンパイル時間 5,340 ms
コンパイル使用メモリ 154,460 KB
実行使用メモリ 24,932 KB
最終ジャッジ日時 2023-09-13 18:54:47
合計ジャッジ時間 6,500 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

let R () = stdin.ReadLine()

let N, M = 
    let t = R().Split() |> Array.map int
    t.[0], t.[1]
let A = Array.init N (fun _ -> R())

let countWhite (line:string) =
    line.ToCharArray()
    |> Array.where(fun x -> x = 'W')
    |> Array.length
    
let ans = A |> Array.sumBy(countWhite)

ans |> printfn "%i"
0