結果
| 問題 | No.418 ミンミンゼミ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-10-24 17:47:44 |
| 言語 | Python3 (3.14.3 + numpy 2.4.2 + scipy 1.17.0) |
| 結果 |
AC
|
| 実行時間 | 98 ms / 1,000 ms |
| コード長 | 383 bytes |
| 記録 | |
| コンパイル時間 | 546 ms |
| コンパイル使用メモリ | 20,700 KB |
| 実行使用メモリ | 15,484 KB |
| 最終ジャッジ日時 | 2026-03-24 04:33:35 |
| 合計ジャッジ時間 | 4,300 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 25 |
ソースコード
def main():
S = input()
ctr = 0
current_idx = 0
while current_idx < len(S):
current_idx = S.find("mi", current_idx)
if current_idx == -1:
break
current_idx = S.find("n", current_idx+2)
if current_idx == -1:
break
ctr += 1
current_idx += 1
print(ctr)
if __name__ == "__main__":
main()