結果
問題 | No.1005 BOT対策 |
ユーザー | ikd |
提出日時 | 2020-05-04 21:36:04 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 89 ms / 2,000 ms |
コード長 | 485 bytes |
コンパイル時間 | 6,022 ms |
コンパイル使用メモリ | 196,080 KB |
実行使用メモリ | 32,132 KB |
最終ジャッジ日時 | 2025-01-01 20:12:09 |
合計ジャッジ時間 | 9,446 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (225 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
// Learn more about F# at http://fsharp.org open System [<EntryPoint>] let main argv = let s = stdin.ReadLine() let t = stdin.ReadLine() if t.Length = 1 && s |> String.exists (fun c -> c = t.[0]) then printfn "-1" exit 0 let rec solve i = if i + t.Length > s.Length then 0 elif s.[i..(i + t.Length - 1)] = t then 1 + solve (i + t.Length - 1) else solve (i + 1) solve 0 |> printfn "%A" 0 // return an integer exit code