結果
問題 | No.418 ミンミンゼミ |
ユーザー |
![]() |
提出日時 | 2016-09-09 22:23:12 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 334 bytes |
コンパイル時間 | 515 ms |
コンパイル使用メモリ | 65,648 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-16 01:11:46 |
合計ジャッジ時間 | 1,304 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 25 |
ソースコード
#include<iostream>#include<string>#include<numeric>int main() {std::string s;std::cin >> s;int count = 0;for (int i = 0; i < s.length(); i++) {if (s[i] == 'm') {if (s[i+1] != 'i') break;i++;while (s[i + 1] == '-')i++;if (s[i + 1] == 'n') count++;}}std::cout << count << std::endl;return 0;}