結果

問題 No.207 世界のなんとか
ユーザー ut0s
提出日時 2019-09-04 21:49:01
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 511 bytes
コンパイル時間 2,127 ms
コンパイル使用メモリ 166,916 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-29 19:07:29
合計ジャッジ時間 2,655 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

/**
  @file 207.cpp
  @title  No.207 世界のなんとか - yukicoder
  @url https://yukicoder.me/problems/no/207
**/

#include <bits/stdc++.h>
using namespace std;

typedef long long LL;
#define ALL(obj) (obj).begin(), (obj).end()
#define REP(i, N) for (int i = 0; i < (N); ++i)

int main() {
  LL A, B;
  cin >> A >> B;

  for (int i = A; i <= B; i++) {
    if (i % 3 == 0) {
      cout << i << endl;
    } else if (to_string(i).find("3") != string::npos) {
      cout << i << endl;
    }
  }

  return 0;
}
0