結果
問題 | No.418 ミンミンゼミ |
ユーザー |
![]() |
提出日時 | 2017-10-02 16:46:00 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 404 bytes |
コンパイル時間 | 136 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-11-15 22:41:23 |
合計ジャッジ時間 | 1,908 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | WA * 25 |
ソースコード
s = input() i = 0 count = 0 mi = False while i < len(s) - 1: if mi: if s[i] == 'n' and not s[i + 1] == 'n': count += 1 mi = False elif s[i] == '-': pass else: mi = False i += 1 else: if s[i] == 'm' and s[i + 1] == 'i': mi = True i += 2 else: i += 1 print(count)