結果
問題 |
No.207 世界のなんとか
|
ユーザー |
![]() |
提出日時 | 2016-04-07 20:59:58 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 301 bytes |
コンパイル時間 | 531 ms |
コンパイル使用メモリ | 63,232 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-10 23:54:12 |
合計ジャッジ時間 | 1,305 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
#include <iostream> #include <string> using namespace std; bool existThree(int n) { while(n > 0) { if(n % 10 == 3) return true; n /= 10; } return false; } int main() { int a, b; cin >> a >> b; for(; a<=b; ++a) { if(a % 3 == 0 || existThree(a)) { cout << a << endl; } } return 0; }