結果

問題 No.418 ミンミンゼミ
ユーザー fura
提出日時 2020-03-16 03:30:27
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 1,000 ms
コード長 179 bytes
コンパイル時間 2,578 ms
コンパイル使用メモリ 191,952 KB
最終ジャッジ日時 2025-01-09 07:15:50
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 25
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:9:18: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type’ {aka ‘long int’} [-Wformat=]
    9 |         printf("%d\n",count(s.begin(),s.end(),'m'));
      |                 ~^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                  |         |
      |                  int       std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type {aka long int}
      |                 %ld

ソースコード

diff #

#include <bits/stdc++.h>

#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

int main(){
	string s; cin>>s;
	printf("%d\n",count(s.begin(),s.end(),'m'));
	return 0;
}
0