結果
| 問題 |
No.1534 おなかがいたい
|
| コンテスト | |
| ユーザー |
wesoweeen
|
| 提出日時 | 2021-06-19 10:18:17 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 299 bytes |
| コンパイル時間 | 72 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 11,136 KB |
| 最終ジャッジ日時 | 2024-06-22 21:54:09 |
| 合計ジャッジ時間 | 1,479 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 18 WA * 1 |
ソースコード
def main():
S = input()
target = 'pain'
idx = S.find(target)
if idx == -1:
print(idx)
else:
r = S[:idx]
pains = r.count('pon') - 1
if pains > 1:
print(pains)
else:
print('-1')
if __name__ == '__main__':
main()
wesoweeen