結果

問題 No.418 ミンミンゼミ
ユーザー kekenx
提出日時 2020-03-05 11:38:29
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 359 bytes
コンパイル時間 1,557 ms
コンパイル使用メモリ 166,408 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-14 00:54:34
合計ジャッジ時間 2,511 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main() {
  string s;
  cin >> s;
  int n = s.size();

  string t = "";
  for (int i = 0; i < n; ++i) {
    if (s[i] != '-') t += s[i];
  }
  int ans = 0;
  for (int i = 0; i < t.size() - 2; ++i) {
    if (t[i] == 'm' && t[i + 1] == 'i' && t[i + 2] == 'n') ans++;
  }
  cout << ans << '\n';
  return 0;
  
}
0