結果
問題 |
No.207 世界のなんとか
|
ユーザー |
![]() |
提出日時 | 2017-01-01 22:29:54 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 865 bytes |
コンパイル時間 | 970 ms |
コンパイル使用メモリ | 90,596 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-16 05:25:47 |
合計ジャッジ時間 | 1,376 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
#include <cstdio> #include <cstring> #include <string> #include <cmath> #include <cassert> #include <iostream> #include <algorithm> #include <stack> #include <queue> #include <vector> #include <set> #include <map> #include <bitset> #include <functional> #include <numeric> using namespace std; #define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define rep(i,n) repl(i,0,n) #define mp(a,b) make_pair((a),(b)) #define pb(a) push_back((a)) #define all(x) (x).begin(),(x).end() #define dbg(x) cout<<#x"="<<((x))<<endl #define fi first #define se second #define INF 2147483600 #define long long long bool check(long n){ if(n%3==0) return true; else { while(n>0){ if(n%10==3) return true; n/=10; } return false; } } int main(){ long a,b; cin>>a>>b; for(long i=a; i<=b; i++){ if(check(i)) cout<<i<<endl; } return 0; }