結果
問題 | No.418 ミンミンゼミ |
ユーザー |
![]() |
提出日時 | 2020-02-05 23:16:26 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 1,000 ms |
コード長 | 310 bytes |
コンパイル時間 | 561 ms |
コンパイル使用メモリ | 65,824 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-23 06:13:04 |
合計ジャッジ時間 | 1,609 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 25 |
ソースコード
#include <iostream> #include <string> using namespace std; int main(void) { char c; string s; while (cin >> c) { if (c != '-') s += c; } int cnt = 0; if (s.size() >= 3) { for (int i = 0; i < s.size() - 2; ++i) { if (s.substr(i, 3) == "min") ++cnt; } } cout << cnt << endl; return 0; }