結果

問題 No.207 世界のなんとか
ユーザー sshckk
提出日時 2020-01-14 21:11:36
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 577 bytes
コンパイル時間 3,812 ms
コンパイル使用メモリ 165,156 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-26 10:16:42
合計ジャッジ時間 3,388 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main() {
    int start, end;
    int ans;
    int tmp;

    cin >> start >> end;
    for (int i = start; i <= end; i++){
        if (i % 3 == 0){
            cout << i <<"\n";
        }
        else {
            tmp = i;
            while (true) {
                if (tmp % 10 == 3) {
                    cout << i <<"\n";
                    break;
                }
                tmp = tmp / 10; 
                if (tmp == 0){
                    break;
                }
            }
        } 
    }

    return 0;
}
0