結果
| 問題 | No.418 ミンミンゼミ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-10-24 17:47:44 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 90 ms / 1,000 ms |
| + 320µs | |
| コード長 | 383 bytes |
| 記録 | |
| コンパイル時間 | 281 ms |
| コンパイル使用メモリ | 21,536 KB |
| 実行使用メモリ | 15,880 KB |
| 最終ジャッジ日時 | 2026-08-04 06:10:11 |
| 合計ジャッジ時間 | 4,183 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / 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()