結果
問題 | No.207 世界のなんとか |
ユーザー |
![]() |
提出日時 | 2015-05-15 22:22:31 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 759 bytes |
コンパイル時間 | 855 ms |
コンパイル使用メモリ | 93,584 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-09 09:19:45 |
合計ジャッジ時間 | 1,581 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:30:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 30 | scanf("%lld%lld", &a, &b); | ~~~~~^~~~~~~~~~~~~~~~~~~~
ソースコード
#include<iostream> #include<cstdio> #include<cstring> #include<string> #include<cctype> #include<cstdlib> #include<algorithm> #include<bitset> #include<vector> #include<list> #include<deque> #include<queue> #include<map> #include<set> #include<stack> #include<cmath> #include<sstream> #include<fstream> #include<iomanip> #include<ctime> #include<complex> #include<functional> #include<climits> #include<cassert> #include<iterator> using namespace std; long long int a; long long int b; int main(){ scanf("%lld%lld", &a, &b); for (long long int i = a; i <= b; i++){ if (i % 3LL == 0){ printf("%lld\n", i); continue; } stringstream ss; ss << i; string k = ss.str(); if (k.find('3') != string::npos){ cout << k << endl; } } return 0; }