結果

問題 No.207 世界のなんとか
ユーザー Yamyuki
提出日時 2016-12-26 02:09:37
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 233 bytes
コンパイル時間 464 ms
コンパイル使用メモリ 21,120 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-14 19:10:19
合計ジャッジ時間 759 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:11:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   11 |         scanf("%ld %ld",&a,&b);
      |         ^~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include<stdio.h>

int check(long a){
	if(a%10==3) return 1;
	if(a==0) return 0;
	return check(a/10);
}

int main(){
	long a,b;
	scanf("%ld %ld",&a,&b);
	while(a<=b){
		if(a%3==0 || check(a)) printf("%ld\n",a);
		a++;
	}
	return 0;
}
0