結果
問題 |
No.418 ミンミンゼミ
|
ユーザー |
|
提出日時 | 2016-09-15 22:51:41 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 253 bytes |
コンパイル時間 | 225 ms |
コンパイル使用メモリ | 34,048 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-16 01:23:43 |
合計ジャッジ時間 | 918 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 25 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:13:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 13 | scanf("%s", s); | ~~~~~^~~~~~~~~
ソースコード
#include <cstdio> #include <cstring> #include <algorithm> #define rep(i, n) for(int i = 0; i < (n); ++i) using namespace std; int n; char s[101]; int main(){ scanf("%s", s); n = strlen(s); printf("%d\n", (int)count(s, s + n, 'm')); return 0; }