結果
問題 | No.207 世界のなんとか |
ユーザー |
![]() |
提出日時 | 2019-12-15 04:27:38 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 448 bytes |
コンパイル時間 | 1,495 ms |
コンパイル使用メモリ | 165,644 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-28 13:30:19 |
合計ジャッジ時間 | 2,261 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
#include <bits/stdc++.h> using namespace std; bool check(int num) { bool res = false; if (num % 3 == 0) { return true; } while (num > 0) { if (num % 10 == 3) { res = true; } num = num / 10; } return res; } int main() { int a, b; cin >> a >> b; for (int i = a; i <= b; i++) { if (check(i)) { cout << i << "\n"; } } return 0; }