結果
問題 | No.418 ミンミンゼミ |
ユーザー | tottoripaper |
提出日時 | 2016-09-09 22:24:41 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 351 bytes |
コンパイル時間 | 1,465 ms |
コンパイル使用メモリ | 159,336 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-16 01:14:03 |
合計ジャッジ時間 | 2,307 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 25 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:18:14: 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=] 18 | printf("%d\n", count(ALL(S), 'n')); | ~^ ~~~~~~~~~~~~~~~~~~ | | | | int std::__iterator_traits<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >, void>::difference_type {aka long int} | %ld
ソースコード
#include <bits/stdc++.h> using namespace std; #define DPRINTF(...) printf(__VA_ARGS_) #define FOR0(i, n) for(int i=0;i<=n;i++) #define ALL(c) (begin(c)), (end(c)) #define fst(t) get<0>(t) #define snd(t) get<1>(t) #define thd(t) get<2>(t) typedef long long ll; int main(){ std::string S; cin >> S; printf("%d\n", count(ALL(S), 'n')); }