結果

問題 No.207 世界のなんとか
ユーザー ElkElk
提出日時 2018-05-26 00:26:05
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 439 bytes
コンパイル時間 252 ms
コンパイル使用メモリ 26,136 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-11 03:33:54
合計ジャッジ時間 1,185 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 WA -
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 WA -
testcase_11 AC 1 ms
4,376 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 2 ms
4,376 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <string.h>

int exit_3(int a){
    char str[256];
    int i, len, flag = 0;
    sprintf(str, "%d", a);
    len = strlen(str);
    for(i = 0; i < len; i++){
        if(str[i] == '3')   flag = 1;
    }
    return flag;
}

int main(){
    int A, B, i;

    scanf("%d %d", &A, &B);

    for(i = A; i < B; i++){
        if(i%3 == 0 || exit_3(i) == 1){
            printf("%d\n", i);
        }
    }

    return 0;
}
0