結果
問題 | No.341 沈黙の期間 |
ユーザー |
![]() |
提出日時 | 2016-08-17 03:01:26 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 334 ms / 5,000 ms |
コード長 | 510 bytes |
コンパイル時間 | 7,009 ms |
コンパイル使用メモリ | 195,032 KB |
実行使用メモリ | 34,524 KB |
最終ジャッジ日時 | 2024-11-07 18:37:47 |
合計ジャッジ時間 | 12,666 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (232 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 Systemtype Sol() =member this.Solve() =let s = stdin.ReadLine()let mutable max = 0let mutable cnt = 0let N = Seq.length sfor i = 0 to (N-1) domatch 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" maxlet mySol = new Sol()mySol.Solve()