結果

問題 No.207 世界のなんとか
ユーザー ゆーたろゆーたろ
提出日時 2016-11-19 13:09:08
言語 C90
(gcc 11.4.0)
結果
TLE  
実行時間 -
コード長 224 bytes
コンパイル時間 175 ms
コンパイル使用メモリ 20,608 KB
実行使用メモリ 6,528 KB
最終ジャッジ日時 2024-05-05 04:10:40
合計ジャッジ時間 13,018 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:17: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘long unsigned int *’ [-Wformat=]
    6 |         scanf("%d %d", &a, &b);
      |                ~^      ~~
      |                 |      |
      |                 int *  long unsigned int *
      |                %ld
main.c:6:20: warning: format ‘%d’ expects argument of type ‘int *’, but argument 3 has type ‘long unsigned int *’ [-Wformat=]
    6 |         scanf("%d %d", &a, &b);
      |                   ~^       ~~
      |                    |       |
      |                    int *   long unsigned int *
      |                   %ld
main.c:13:34: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
   13 |                 if(c==1)printf("%d\n", i);
      |                                 ~^     ~
      |                                  |     |
      |                                  int   long unsigned int
      |                                 %ld
main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    6 |         scanf("%d %d", &a, &b);
      |         ^~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(void) {
	unsigned long a, b, c, i, t;
	
	scanf("%d %d", &a, &b);
	
	for(i=a; i<=b; i++){
		if(i%3==0)c=1;
		for(t=i; t; t/10)
			if(t%10==3)
				c=1;
		if(c==1)printf("%d\n", i);
	}
	return 0;
}
0