結果

問題 No.207 世界のなんとか
ユーザー A63295A63295
提出日時 2015-12-19 15:32:54
言語 C90
(gcc 11.4.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 275 bytes
コンパイル時間 261 ms
コンパイル使用メモリ 20,992 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-17 16:32:18
合計ジャッジ時間 1,040 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 0 ms
5,376 KB
testcase_05 AC 0 ms
5,376 KB
testcase_06 AC 0 ms
5,376 KB
testcase_07 AC 1 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 1 ms
5,376 KB
testcase_12 AC 1 ms
5,376 KB
testcase_13 AC 1 ms
5,376 KB
testcase_14 AC 1 ms
5,376 KB
testcase_15 AC 1 ms
5,376 KB
testcase_16 AC 0 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:4:9: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘long int *’ [-Wformat=]
    4 | scanf("%d%d",&A,&B);
      |        ~^    ~~
      |         |    |
      |         |    long int *
      |         int *
      |        %ld
main.c:4:11: warning: format ‘%d’ expects argument of type ‘int *’, but argument 3 has type ‘long int *’ [-Wformat=]
    4 | scanf("%d%d",&A,&B);
      |          ~^     ~~
      |           |     |
      |           int * long int *
      |          %ld
main.c:8:34: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=]
    8 |                         printf("%d\n",i);
      |                                 ~^    ~
      |                                  |    |
      |                                  int  long int
      |                                 %ld
main.c:13:50: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=]
   13 |                                         printf("%d\n",i);
      |                                                 ~^    ~
      |                                                  |    |
      |                                                  int  long int
      |                                                 %ld
main.c:4:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    4 | scanf("%d%d",&A,&B);
      | ^~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include<stdio.h>
int main(void){
long A, B, i, j;
scanf("%d%d",&A,&B);

	for ( i = A; i <= B; i++){
		if( 0 == i % 3){
			printf("%d\n",i);
		}
		else{
			for( j = i; j > 1; j = j / 10){
				if ( 3 ==j % 10){
					printf("%d\n",i);
					break;
				}
			}
		}
	}
	return 0;
}
0