結果
| 問題 | 
                            No.207 世界のなんとか
                             | 
                    
| コンテスト | |
| ユーザー | 
                             kaito_tateyama
                         | 
                    
| 提出日時 | 2017-08-11 06:00:45 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 526 bytes | 
| コンパイル時間 | 875 ms | 
| コンパイル使用メモリ | 74,052 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-10-12 20:01:44 | 
| 合計ジャッジ時間 | 1,398 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 19 | 
コンパイルメッセージ
main.cpp: In function 'bool mcheck3(int)':
main.cpp:22:1: warning: control reaches end of non-void function [-Wreturn-type]
   22 | }
      | ^
            
            ソースコード
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
bool mcheck3(int a) {
  string b = to_string(a);
  int tmp = 0;
  int bb = b.size();
  for (int i = 0; i < bb; i++) {
    if (b[i] == '3') {
      tmp++;
      return false;
      break;
    }
  }
  if (tmp == 0) {
    return true;
  }
}
int main(){
  int A,B; cin >> A >> B;
  for (int i = A; i <= B; i++) {
    if (i % 3 != 0 && mcheck3(i)) {
    }else{
      cout << i << "\n";
    }
  }
  return 0;
}
            
            
            
        
            
kaito_tateyama