結果
問題 | No.207 世界のなんとか |
ユーザー |
![]() |
提出日時 | 2020-03-05 19:40:52 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 406 bytes |
コンパイル時間 | 1,490 ms |
コンパイル使用メモリ | 170,772 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-14 02:05:01 |
合計ジャッジ時間 | 2,338 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; bool f2(ll i) { return i % 3 == 0; } bool f1(ll i) { while (i > 0) { if (i % 10 == 3) return true; i /= 10; } return false; } int main() { ll a, b; cin >> a >> b; set<int> s; for (ll i = a; i <= b; ++i) { if (f1(i) || f2(i)) s.insert(i); } for (auto &e: s) { cout << e << '\n'; } return 0; }