結果
問題 |
No.260 世界のなんとか3
|
ユーザー |
![]() |
提出日時 | 2016-06-29 14:19:02 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 314 bytes |
コンパイル時間 | 367 ms |
コンパイル使用メモリ | 20,480 KB |
実行使用メモリ | 10,496 KB |
最終ジャッジ日時 | 2024-10-11 22:59:04 |
合計ジャッジ時間 | 4,383 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | WA * 22 TLE * 1 -- * 4 |
コンパイルメッセージ
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); }