結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー kuuso1kuuso1
提出日時 2016-08-18 18:21:13
言語 F#
(.NET 7)
結果
AC  
実行時間 81 ms / 1,000 ms
コード長 473 bytes
コンパイル時間 5,137 ms
コンパイル使用メモリ 168,748 KB
実行使用メモリ 24,824 KB
最終ジャッジ日時 2023-08-11 16:17:46
合計ジャッジ時間 8,674 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
22,876 KB
testcase_01 AC 76 ms
22,772 KB
testcase_02 AC 77 ms
22,832 KB
testcase_03 AC 77 ms
22,776 KB
testcase_04 AC 78 ms
22,832 KB
testcase_05 AC 75 ms
22,940 KB
testcase_06 AC 77 ms
22,824 KB
testcase_07 AC 76 ms
24,772 KB
testcase_08 AC 77 ms
20,716 KB
testcase_09 AC 77 ms
24,740 KB
testcase_10 AC 78 ms
24,820 KB
testcase_11 AC 78 ms
22,780 KB
testcase_12 AC 78 ms
22,740 KB
testcase_13 AC 76 ms
22,808 KB
testcase_14 AC 81 ms
22,740 KB
testcase_15 AC 75 ms
20,712 KB
testcase_16 AC 76 ms
20,844 KB
testcase_17 AC 75 ms
22,744 KB
testcase_18 AC 76 ms
22,804 KB
testcase_19 AC 75 ms
22,816 KB
testcase_20 AC 78 ms
22,844 KB
testcase_21 AC 79 ms
22,924 KB
testcase_22 AC 77 ms
22,728 KB
testcase_23 AC 77 ms
22,696 KB
testcase_24 AC 78 ms
24,824 KB
testcase_25 AC 77 ms
24,784 KB
testcase_26 AC 78 ms
22,876 KB
testcase_27 AC 77 ms
22,764 KB
testcase_28 AC 76 ms
20,744 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 ss = stdin.ReadLine() + stdin.ReadLine();
        let mutable cnt = 0
        let mutable max = 0
        let N = Seq.length ss
        for i = 0 to (N-1) do
            if ss.[i] = 'o' then (
                cnt <- cnt + 1;
                max <- if cnt > max then cnt else max
            ) else (
                cnt <- 0
            )
        printfn "%d" max
        
let mySol = new Sol()
mySol.Solve()
0