結果
| 問題 |
No.418 ミンミンゼミ
|
| コンテスト | |
| ユーザー |
cb_4150
|
| 提出日時 | 2017-08-16 22:31:59 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 344 bytes |
| コンパイル時間 | 445 ms |
| コンパイル使用メモリ | 55,004 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-16 02:26:03 |
| 合計ジャッジ時間 | 1,226 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 25 |
ソースコード
#include <iostream>
#include <string>
int main() {
std::string s;
std::cin >> s;
int i = 0, f = 0, cnt = 0;
while (i != s.size()) {
if (s[i] == '-') {
i++;
continue;
}
if (s[i] == 'm' && s[i + 1] == 'i') {
f = 1;
}
if (s[i] == 'n' && f) {
cnt++;
f = 0;
}
i++;
}
std::cout << cnt << std::endl;
return 0;
}
cb_4150