結果
問題 | No.207 世界のなんとか |
ユーザー |
![]() |
提出日時 | 2017-10-29 14:21:58 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 626 bytes |
コンパイル時間 | 1,638 ms |
コンパイル使用メモリ | 166,924 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-22 05:11:45 |
合計ジャッジ時間 | 2,373 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
#include<bits/stdc++.h>#define REP(i,n) for(int i=0;i<n;i++)#define LOOP(i,x,n) for(int i=x;i<n;i++)#define ALL(v) (v).begin(),(v).end()#define PB push_back#define MP make_pair#define FIR first#define UB upper_bound#define LB lower_bound#define int long longusing namespace std;const int MOD=1000000007;const int INF=1000000009;signed main(){int a,b;cin>>a>>b;LOOP(i,a,b+1){if(i%3==0){cout<<i<<endl;continue;}else{string s=to_string(i);REP(j,s.size()){if(s[j]=='3'){cout<<i<<endl;break;}}}}return 0;}