結果
| 問題 |
No.207 世界のなんとか
|
| コンテスト | |
| ユーザー |
fushime2
|
| 提出日時 | 2016-09-23 15:51:37 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 472 bytes |
| コンパイル時間 | 1,473 ms |
| コンパイル使用メモリ | 157,796 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-17 18:58:52 |
| 合計ジャッジ時間 | 1,907 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define rep(i,n) FOR(i,0,n)
#define ALL(x) (x).begin(),(x).end()
bool OK(int n) {
if(n % 3 == 0) return true;
while(n > 0) {
if(n % 10 == 3) return true;
n /= 10;
}
return false;
}
int main() {
ll a, b;
cin>>a>>b;
FOR(i,a,b+1) {
if(OK(i)) {
cout << i << "\n";
}
}
return 0;
}
fushime2