結果
問題 | No.207 世界のなんとか |
ユーザー |
![]() |
提出日時 | 2015-05-27 00:37:26 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 1,506 bytes |
コンパイル時間 | 1,641 ms |
コンパイル使用メモリ | 159,000 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-09 10:20:02 |
合計ジャッジ時間 | 2,259 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<(n);++i) #define loop for(;;) #define trace(var) cerr<<">>> "<<#var<<" = "<<var<<endl; #define inf (1e9) #define eps (1e-9) using Integer = long long; using Real = long double; const Real PI = acos(-1); template<class S, class T> inline ostream& operator<<(ostream&os, pair<S,T> p) { return os << '(' << p.first << ", " << p.second << ')'; } template<class S, class T, class U> inline ostream& operator<<(ostream&os, tuple<S,T,U> t) { return os << '(' << get<0>(t) << ", " << get<1>(t) << ", " << get<2>(t) << ')'; } template<class T> inline ostream& operator<<(ostream&os, vector<T> v) { if (v.size() == 0) { return os << "(empty)"; } os << v[0]; for (int i=1, len=v.size(); i<len; ++i) os << ' ' << v[i]; return os; } template<class T> inline istream& operator>>(istream&is, vector<T>&v) { rep (i, v.size()) is >> v[i]; return is; } int dx[] = { -1, 0, 1, 0 }; int dy[] = { 0, -1, 0, 1 }; using vi = vector<int>; using vvi = vector<vi>; int main() { cin.tie(0); ios::sync_with_stdio(0); cout.setf(ios::fixed); cout.precision(10); random_device dev; mt19937 rand(dev()); Integer a, b; cin >> a >> b; for (; a <= b; ++a) { bool t = a % 3 == 0; if (not t) { Integer c = a; while (c > 0) { if (c % 10 == 3) { t = true; break; } c /= 10; } } if (t) { cout << a << endl; } } return 0; }