結果
問題 | No.207 世界のなんとか |
ユーザー | 👑 testestest |
提出日時 | 2015-08-08 22:01:12 |
言語 | C90 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 485 bytes |
コンパイル時間 | 238 ms |
コンパイル使用メモリ | 21,504 KB |
実行使用メモリ | 6,940 KB |
最終ジャッジ日時 | 2024-07-18 06:06:07 |
合計ジャッジ時間 | 848 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
testcase_01 | AC | 0 ms
5,376 KB |
testcase_02 | AC | 1 ms
5,376 KB |
testcase_03 | AC | 0 ms
5,376 KB |
testcase_04 | AC | 1 ms
5,376 KB |
testcase_05 | AC | 1 ms
5,376 KB |
testcase_06 | AC | 0 ms
5,376 KB |
testcase_07 | AC | 1 ms
5,376 KB |
testcase_08 | AC | 0 ms
5,376 KB |
testcase_09 | AC | 0 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 | 0 ms
5,376 KB |
testcase_15 | AC | 1 ms
5,376 KB |
testcase_16 | AC | 1 ms
5,376 KB |
testcase_17 | WA | - |
testcase_18 | WA | - |
コンパイルメッセージ
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:28: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] 7 | if(p)for(;a<=b;a++)printf("%d\n",a); | ^~~~~~ main.c:7:28: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:7:28: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] main.c:7:28: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:8:59: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] 8 | else{for(;a<=b;a++)if(a%10==3||a/10%10==3||a%3==0)printf("%d\n",a);} | ^~~~~~ main.c:8:59: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:10:29: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] 10 | if(p)for(;a%100;a++)printf("%d\n",a); | ^~~~~~ main.c:10:29: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:11:60: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] 11 | else{for(;a%100;a++)if(a%10==3||a/10%10==3||a%3==0)printf("%d\n",a);} | ^~~~~~ main.c:
ソースコード
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<=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%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);} } return 0; }