結果

問題 No.418 ミンミンゼミ
ユーザー kikage
提出日時 2020-03-06 05:00:01
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 287 bytes
コンパイル時間 411 ms
コンパイル使用メモリ 54,880 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-14 02:34:56
合計ジャッジ時間 1,339 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
int main(){
    string str;
    cin >> str;
    int cnt=0;
    for(int p=0;p<str.size();p++){
        if(str[p]=='m' && str[p+1]=='i'){
            while(str[p]!='n')p++;
            cnt++;
        }
    }
    cout << cnt << endl;
    return 0;
}
0