結果
問題 | No.41 貯金箱の溜息(EASY) |
ユーザー | ciel |
提出日時 | 2015-11-22 00:23:25 |
言語 | C90 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 38 ms / 5,000 ms |
コード長 | 193 bytes |
コンパイル時間 | 174 ms |
コンパイル使用メモリ | 20,736 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-13 17:09:05 |
合計ジャッジ時間 | 686 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 38 ms
6,816 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,z;main(y){ | ^ 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,z;main(y){ | ^ main.c:2:14: warning: type defaults to ‘int’ in declaration of ‘z’ [-Wimplicit-int] 2 | A[M+1]={1},i,z;main(y){ | ^ main.c:2:16: warning: return type defaults to ‘int’ [-Wimplicit-int] 2 | A[M+1]={1},i,z;main(y){ | ^~~~ main.c: In function ‘main’: main.c:2:16: warning: type of ‘y’ defaults to ‘int’ [-Wimplicit-int] main.c:5:15: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 5 | for(;~scanf("%lld",&m);)--y&&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:15: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch] 5 | for(;~scanf("%lld",&m);)--y&&printf("%d\n",A[m/111111]); | ^~~~~ main.c:5:15: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:5:38: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] 5 | for(;~scanf("%lld",&m);)--y&&printf("%d\n",A[m/111111]); | ^~~~~~ main.c:5:38: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ main.c:5:38: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] main.c:5:38: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
ソースコード
#define M 1000000 A[M+1]={1},i,z;main(y){ 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("%lld",&m);)--y&&printf("%d\n",A[m/111111]); }