結果

問題 No.207 世界のなんとか
ユーザー suppy193suppy193
提出日時 2015-05-27 10:37:29
言語 C90
(gcc 11.4.0)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 442 bytes
コンパイル時間 520 ms
コンパイル使用メモリ 20,480 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-17 16:12:51
合計ジャッジ時間 2,302 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 1 ms
5,376 KB
testcase_02 RE -
testcase_03 AC 0 ms
5,376 KB
testcase_04 RE -
testcase_05 AC 1 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 0 ms
5,376 KB
testcase_08 AC 1 ms
5,376 KB
testcase_09 AC 1 ms
5,376 KB
testcase_10 AC 1 ms
5,376 KB
testcase_11 AC 0 ms
5,376 KB
testcase_12 AC 1 ms
5,376 KB
testcase_13 AC 0 ms
5,376 KB
testcase_14 RE -
testcase_15 RE -
testcase_16 AC 1 ms
5,376 KB
testcase_17 AC 1 ms
5,376 KB
testcase_18 AC 0 ms
5,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:8:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |     scanf("%d%d", &s, &e);
      |     ^~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(void)
{
    int s, e;
    int i, j;
    char str[10];
    scanf("%d%d", &s, &e);
    for(i = s;i <= e;i++){
        if(i % 3 == 0){
            printf("%d\n", i);
        }
        else{
        	sprintf(str, "%d", i);
        	j = 0;
        	while(str[j] != '\0'){
        		if(str[j] == '3'){
        			printf("%d\n", i);
        			break;
        		}
        		j++;
        	}
        }
    }
    return 0;
}
0