結果
問題 |
No.207 世界のなんとか
|
ユーザー |
![]() |
提出日時 | 2020-10-09 06:41:34 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 8 ms / 5,000 ms |
コード長 | 439 bytes |
コンパイル時間 | 1,644 ms |
コンパイル使用メモリ | 192,560 KB |
最終ジャッジ日時 | 2025-01-15 03:35:21 |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
#include <bits/stdc++.h> #define fastIO (cin.tie(0), cout.tie(0), ios::sync_with_stdio(false)) #define lli long long int using namespace std; bool isDiv3(lli n) { while (n > 0) { if ((n % 10) == 3) { return true; } n /= 10; } return false; } int main() { fastIO; lli a, b; cin >> a >> b; for (lli i = a; i <= b; ++i) { if (i % 3 == 0 || isDiv3(i)) { cout << i << '\n'; } } return 0; }