結果

問題 No.418 ミンミンゼミ
ユーザー cowgirl
提出日時 2018-09-26 19:50:51
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 391 bytes
コンパイル時間 1,699 ms
コンパイル使用メモリ 167,352 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-11 22:41:23
合計ジャッジ時間 2,721 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main(){
    string s; cin >> s;
    int counter = 0;
    int rel =0;
    for(int i=0; i <= s.size(); i++){
        if(s[i] == '-'){
            continue;
        }
        if(s[i] == 'm' || s[i] == 'i' || s[i] == 'n') counter++;
        if(counter == 3){
            rel++;
            counter = 0;
        }
    }
    cout << rel << endl;
}
0