結果
問題 | No.341 沈黙の期間 |
ユーザー | kuuso1 |
提出日時 | 2016-08-17 03:01:26 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 302 ms / 5,000 ms |
コード長 | 510 bytes |
コンパイル時間 | 5,915 ms |
コンパイル使用メモリ | 188,932 KB |
実行使用メモリ | 34,500 KB |
最終ジャッジ日時 | 2024-04-25 08:13:26 |
合計ジャッジ時間 | 11,020 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 292 ms
34,144 KB |
testcase_01 | AC | 293 ms
34,392 KB |
testcase_02 | AC | 301 ms
34,268 KB |
testcase_03 | AC | 293 ms
34,500 KB |
testcase_04 | AC | 294 ms
33,696 KB |
testcase_05 | AC | 300 ms
33,840 KB |
testcase_06 | AC | 292 ms
33,548 KB |
testcase_07 | AC | 294 ms
34,272 KB |
testcase_08 | AC | 302 ms
34,144 KB |
testcase_09 | AC | 291 ms
34,268 KB |
testcase_10 | AC | 294 ms
34,276 KB |
testcase_11 | AC | 293 ms
34,276 KB |
testcase_12 | AC | 297 ms
34,140 KB |
testcase_13 | AC | 293 ms
34,272 KB |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (202 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
open System type Sol() = member this.Solve() = let s = stdin.ReadLine() let mutable max = 0 let mutable cnt = 0 let N = Seq.length s for i = 0 to (N-1) do match i with | 0 -> ( if s.[0] = '…' then (cnt <- 1 ; max <- 1) else ( cnt <- 0 ) ) | _ -> ( if s.[i] = '…' then (cnt <- (cnt+1) ; max <- if cnt > max then cnt else max ) else ( cnt <- 0 ) ) printfn "%d" max let mySol = new Sol() mySol.Solve()