結果
| 問題 | 
                            No.207 世界のなんとか
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2018-07-19 21:11:08 | 
| 言語 | C  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 546 bytes | 
| コンパイル時間 | 332 ms | 
| コンパイル使用メモリ | 29,056 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-12-24 21:20:23 | 
| 合計ジャッジ時間 | 1,286 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 19 | 
ソースコード
#include    <stdio.h>
static void solve(long a, long b);
static long judge(long x);
int main(void)
{
    long    a, b;
    scanf("%ld%ld", &a, &b);
    solve(a, b);
    return 0;
}
static void solve(long a, long b)
{
    for (; a <= b; a++) {
        if (judge(a)) {
            printf("%ld\n", a);
        }
    }
    return;
}
static long judge(long x)
{
    long    d;
    if ((x % 3) == 0) {
        return x;
    }
    for (d = x; d != 0; d /= 10) {
        if ((d % 10) == 3) {
            return x;
        }
    }
    return 0;
}