結果
問題 | No.207 世界のなんとか |
ユーザー | 👑 testestest |
提出日時 | 2015-08-08 22:02:07 |
言語 | C90 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 485 bytes |
コンパイル時間 | 218 ms |
コンパイル使用メモリ | 21,120 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-09 10:27:46 |
合計ジャッジ時間 | 947 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
testcase_01 | AC | 1 ms
5,248 KB |
testcase_02 | AC | 0 ms
5,248 KB |
testcase_03 | AC | 1 ms
5,248 KB |
testcase_04 | AC | 1 ms
5,248 KB |
testcase_05 | AC | 1 ms
5,248 KB |
testcase_06 | AC | 0 ms
5,248 KB |
testcase_07 | AC | 0 ms
5,248 KB |
testcase_08 | AC | 1 ms
5,248 KB |
testcase_09 | AC | 1 ms
5,248 KB |
testcase_10 | AC | 1 ms
5,248 KB |
testcase_11 | AC | 1 ms
5,248 KB |
testcase_12 | AC | 1 ms
5,248 KB |
testcase_13 | AC | 1 ms
5,248 KB |
testcase_14 | AC | 1 ms
5,248 KB |
testcase_15 | AC | 1 ms
5,248 KB |
testcase_16 | AC | 1 ms
5,248 KB |
testcase_17 | AC | 1 ms
5,248 KB |
testcase_18 | AC | 1 ms
5,248 KB |
コンパイルメッセージ
main.c: In function ‘main’: main.c:3:1: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 3 | scanf("%d%d",&a,&b); | ^~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | int main(){ main.c:3:1: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch] 3 | scanf("%d%d",&a,&b); | ^~~~~ main.c:3:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:7:29: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] 7 | if(p)for(;a%100;a++)printf("%d\n",a); | ^~~~~~ main.c:7:29: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:7:29: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] main.c:7:29: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:8:60: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] 8 | else{for(;a%100;a++)if(a%10==3||a/10%10==3||a%3==0)printf("%d\n",a);} | ^~~~~~ main.c:8:60: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:9:28: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] 9 | if(q)for(;a<=b;a++)printf("%d\n",a); | ^~~~~~ main.c:9:28: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:10:59: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] 10 | else{for(;a<=b;a++)if(a%10==3||a/10%10==3||a%3==0)printf("%d\n",a);} | ^~~~~~ main.c:10
ソースコード
int main(){ int a,b,p,q; scanf("%d%d",&a,&b); p=a/10;while(p/=10)if(p%10==3)break; q=b/10;while(q/=10)if(q%10==3)break; if(b%100-a%100<0){ if(p)for(;a%100;a++)printf("%d\n",a); else{for(;a%100;a++)if(a%10==3||a/10%10==3||a%3==0)printf("%d\n",a);} if(q)for(;a<=b;a++)printf("%d\n",a); else{for(;a<=b;a++)if(a%10==3||a/10%10==3||a%3==0)printf("%d\n",a);} }else{ if(p)for(;a<=b;a++)printf("%d\n",a); else{for(;a<=b;a++)if(a%10==3||a/10%10==3||a%3==0)printf("%d\n",a);} } return 0; }