結果
問題 | No.207 世界のなんとか |
ユーザー |
|
提出日時 | 2018-11-22 15:12:14 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 454 bytes |
コンパイル時間 | 1,673 ms |
コンパイル使用メモリ | 55,252 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-24 17:37:27 |
合計ジャッジ時間 | 2,782 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
#include <iostream> #include <string> using namespace std; int main() { long a, b, i, bef; cin >> a >> b; for (i=a; i<=b; i++) { if (i % 3 == 0 || i % 10 == 3) { cout << i << endl; } else { bef = i; while (bef /= 10) { if (bef % 10 == 3) { cout << i << endl; break; } } } } return 0; }