結果

問題 No.418 ミンミンゼミ
ユーザー focusfocus
提出日時 2018-01-17 14:56:55
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 535 bytes
コンパイル時間 538 ms
コンパイル使用メモリ 58,784 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-16 02:31:20
合計ジャッジ時間 1,323 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<vector>
#include<string>
#include<cstdio>
using namespace std;
int main(){
    string s;
    int count = 0;
    cin >> s;
    for(int i=0;s[i+2]!='\0';i++){
        if(s[i]=='m'&&s[i+1]=='i'){
            for(int j=i+2;s[j]!='\0';j++){
                if(s[j]=='-'){
                }
                else if(s[j]=='n'){
                    count++;
                }
                else{
                    break;
                }
            }
        }
    }
    cout << count << endl;
    return 0;
}
0