結果
問題 |
No.207 世界のなんとか
|
ユーザー |
|
提出日時 | 2020-08-02 11:14:37 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 528 bytes |
コンパイル時間 | 1,489 ms |
コンパイル使用メモリ | 167,264 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-18 09:24:11 |
合計ジャッジ時間 | 2,239 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
/** * author: boutarou * created: 02.08.2020 11:12:37 **/ #include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i = 0; i < int(n); i++) using ll = long long; using P = pair<int, int>; bool check(ll x) { if (x % 3 == 0) return true; while(x > 0) { if (x % 10 == 3) return true; x /= 10; } return false; } int main() { ll a, b; cin >> a >> b; for (ll i = a; i <= b; i++) { if (check(i)) { cout << i << endl; } } return 0; }