結果
問題 | No.260 世界のなんとか3 |
ユーザー | ts4mr |
提出日時 | 2016-06-29 14:19:02 |
言語 | C90 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 314 bytes |
コンパイル時間 | 367 ms |
コンパイル使用メモリ | 20,480 KB |
実行使用メモリ | 10,496 KB |
最終ジャッジ日時 | 2024-10-11 22:59:04 |
合計ジャッジ時間 | 4,383 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
10,496 KB |
testcase_01 | AC | 1 ms
5,248 KB |
testcase_02 | AC | 7 ms
5,248 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | TLE | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
コンパイルメッセージ
main.c:1:19: warning: return type defaults to ‘int’ [-Wimplicit-int] 1 | long long int A,B;main(i){ | ^~~~ main.c: In function ‘main’: main.c:1:19: warning: type of ‘i’ defaults to ‘int’ [-Wimplicit-int] main.c:2:9: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 2 | scanf("%d%d",&A,&B); // input | ^~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | long long int A,B;main(i){ main.c:2:9: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch] 2 | scanf("%d%d",&A,&B); // input | ^~~~~ main.c:2:9: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:2:17: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘long long int *’ [-Wformat=] 2 | scanf("%d%d",&A,&B); // input | ~^ ~~ | | | | | long long int * | int * | %lld main.c:2:19: warning: format ‘%d’ expects argument of type ‘int *’, but argument 3 has type ‘long long int *’ [-Wformat=] 2 | scanf("%d%d",&A,&B); // input | ~^ ~~ | | | | int * long long int * | %lld main.c:16:9: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] 16 | printf("%d\n",sum); | ^~~~~~ main.c:16:9: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:16:9: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] main.c:16:9: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
ソースコード
long long int A,B;main(i){ scanf("%d%d",&A,&B); // input int sum=0,aho; for(i=A;i<=B;i++){ int t=i,s; aho=0; for(s=0;t!=0;t/=10){ int num=t%10; if(num==3){aho++;break;} s+=t%10; } if(s%3==0)aho++; if(!aho)continue; // 3 の倍数ではない. if(i%1000%8)sum++; } printf("%d\n",sum); }