結果
| 問題 | No.1534 おなかがいたい |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-08-01 16:20:58 |
| 言語 | F# (F# 10.0) |
| 結果 |
AC
|
| 実行時間 | 221 ms / 2,000 ms |
| コード長 | 286 bytes |
| 記録 | |
| コンパイル時間 | 12,448 ms |
| コンパイル使用メモリ | 206,728 KB |
| 実行使用メモリ | 51,856 KB |
| 最終ジャッジ日時 | 2026-04-27 14:50:53 |
| 合計ジャッジ時間 | 13,164 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 19 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (272 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net10.0/main.dll main -> /home/judge/data/code/bin/Release/net10.0/publish/
ソースコード
let s = stdin.ReadLine ()
let mutable pon_count = 0
for i in 0..s.Length-1 do
if s.[i..i+3] = "pain" then
printfn "%d" (if pon_count < 2 then -1 else pon_count - 1)
exit 0
elif s.[i..i+2] = "pon" then
pon_count <- pon_count + 1
printfn "-1"