結果

問題 No.41 貯金箱の溜息(EASY)
ユーザー cielciel
提出日時 2015-11-22 00:20:29
言語 C90
(gcc 11.4.0)
結果
AC  
実行時間 36 ms / 5,000 ms
コード長 210 bytes
コンパイル時間 129 ms
コンパイル使用メモリ 20,864 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-13 17:09:07
合計ジャッジ時間 633 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
6,812 KB
testcase_01 AC 36 ms
6,944 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:2:1: warning: data definition has no type or storage class
    2 | A[M+1]={1},i;main(z){
      | ^
main.c:2:1: warning: type defaults to ‘int’ in declaration of ‘A’ [-Wimplicit-int]
main.c:2:12: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int]
    2 | A[M+1]={1},i;main(z){
      |            ^
main.c:2:14: warning: return type defaults to ‘int’ [-Wimplicit-int]
    2 | A[M+1]={1},i;main(z){
      |              ^~~~
main.c: In function ‘main’:
main.c:2:14: warning: type of ‘z’ defaults to ‘int’ [-Wimplicit-int]
main.c:5:13: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
    5 |         for(scanf("%d",&m);~scanf("%lld",&m);)printf("%d\n",A[m/111111]);
      |             ^~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
  +++ |+#include <stdio.h>
    1 | #define M 1000000
main.c:5:13: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
    5 |         for(scanf("%d",&m);~scanf("%lld",&m);)printf("%d\n",A[m/111111]);
      |             ^~~~~
main.c:5:13: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
main.c:5:21: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘long long int *’ [-Wformat=]
    5 |         for(scanf("%d",&m);~scanf("%lld",&m);)printf("%d\n",A[m/111111]);
      |                    ~^  ~~
      |                     |  |
      |                     |  long long int *
      |                     int *
      |                    %lld
main.c:5:47: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
    5 |         for(scanf("%d",&m);~scanf("%lld",&m);)printf("%d\n",A[m/111111]);
      |                                               ^~~~~~
main.c:5:47: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
main.c:5:47: warning: incompatible impli

ソースコード

diff #

#define M 1000000
A[M+1]={1},i;main(z){
	for(z=10;z--;)for(i=0;i<=M-(z+!z);i++)A[i+z+!z]=(A[i+z+!z]+A[i])%1000000009;
	long long m;
	for(scanf("%d",&m);~scanf("%lld",&m);)printf("%d\n",A[m/111111]);
	exit(0);
}
0