結果
問題 | No.207 世界のなんとか |
ユーザー |
![]() |
提出日時 | 2017-03-07 00:54:40 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 463 bytes |
コンパイル時間 | 523 ms |
コンパイル使用メモリ | 67,200 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-23 16:03:18 |
合計ジャッジ時間 | 1,204 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
#include <iostream>#include <sstream>using namespace std;template <typename T> std::string tostr(const T& t){std::ostringstream os; os<<t; return os.str();}int main(void){long long A = 0;long long B = 0;cin >> A >> B;for(long long i = A;i<=B;i++){string s = tostr(i);if(i%3==0){cout << i << "\n";}else if((int)s.find('3')!=-1){cout << s << "\n";}}return 0;}