結果

問題 No.207 世界のなんとか
ユーザー chiyodachiyoda
提出日時 2016-06-28 10:57:23
言語 C++11
(gcc 11.4.0)
結果
CE  
(最新)
AC  
(最初)
実行時間 -
コード長 505 bytes
コンパイル時間 368 ms
コンパイル使用メモリ 59,432 KB
最終ジャッジ日時 2024-04-27 02:21:16
合計ジャッジ時間 827 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:16:9: error: ‘i’ was not declared in this scope
   16 |     if (i%3==0) {
      |         ^

ソースコード

diff #

#include <algorithm>
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
#include <map>
#define rep(i,n) for (int i =0; i<n; ++i)
#define pb(x) push_back(x)
#define ll long long
using namespace std;

int main () {
  int a,b;
  cin>>a>>b;
  rep(a,b+1) {
    if (i%3==0) {
      cout << i <<endl;
    } else {
      int tmp = i;
      while(tmp>0) {
         if(tmp % 10==3) {
            cout <<i<<endl;
            break;
         }
        tmp /=10;
       }
    }
  }
  return 0;
}
0