結果

問題 No.418 ミンミンゼミ
ユーザー vwxyzvwxyz
提出日時 2022-08-08 20:31:44
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 1,000 ms
コード長 306 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-09-19 05:15:59
合計ジャッジ時間 1,873 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
readline=sys.stdin.readline

lst=[]
ans=0
for s in readline().rstrip():
    if len(lst)==0 and s=="m":
        lst.append(s)
    elif len(lst)==1 and s=="i":
        lst.append(s)
    elif len(lst)==2 and s=="n":
        lst.append(s)
    if len(lst)==3:
        ans+=1
        lst=[]
print(ans)
0