結果

問題 No.207 世界のなんとか
ユーザー mocobt
提出日時 2018-10-12 16:32:05
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 515 bytes
コンパイル時間 781 ms
コンパイル使用メモリ 68,352 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-12 17:47:59
合計ジャッジ時間 1,089 ms
ジャッジサーバーID
(参考情報)
judge5 / judge
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cmath>
using namespace std;

int main(){
    int A, B;
    cin >> A >> B;
    for(int i=A; i<=B; i++){
        if(i%3==0){
            cout << i << endl;
            continue;
        }
        
        int temp = i;
        int cnt = 1;
        while(temp > 1){
            int divide = (int) pow(10, cnt);
            if(temp%divide==3){
                cout << i << endl;
                break;
            }
            temp /= divide;
            cnt++;
        }
        
    }
}
0