結果
問題 |
No.207 世界のなんとか
|
ユーザー |
|
提出日時 | 2020-12-16 22:07:32 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 536 bytes |
コンパイル時間 | 1,542 ms |
コンパイル使用メモリ | 169,336 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-20 05:22:49 |
合計ジャッジ時間 | 2,240 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define all(x) x.begin(),x.end() #define rep(i, n) for (int i = 0; i < (int)(n); i++) template<class T> inline bool chmax(T&a,T b){if(a<b){a=b;return 1;}return 0;} template<class T> inline bool chmin(T&a,T b){if(a>b){a=b;return 1;}return 0;} using ll = long long; int a,b; int main(){ cin >> a >> b; for(int i=a;i<=b;i++){ if(i%3==0) cout << i << endl; else{ string s=to_string(i); if(count(all(s),'3')) cout << i << endl; } } }