結果
| 問題 | No.41 貯金箱の溜息(EASY) | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2015-11-22 00:13:45 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 35 ms / 5,000 ms | 
| コード長 | 306 bytes | 
| コンパイル時間 | 150 ms | 
| コンパイル使用メモリ | 23,552 KB | 
| 実行使用メモリ | 6,816 KB | 
| 最終ジャッジ日時 | 2024-09-13 17:08:55 | 
| 合計ジャッジ時間 | 814 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 2 | 
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:9:18: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    9 |         for(scanf("%d",&T);T--;){
      |             ~~~~~^~~~~~~~~
main.cpp:11:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   11 |                 scanf("%lld",&m);
      |                 ~~~~~^~~~~~~~~~~
            
            ソースコード
#include <stdio.h>
#define M 1000000
int A[M+1];
int main(){
	A[0]=1;
	for(int z=1;z<=9;z++)for(int i=0;i<=M-z;i++)A[i+z]=(A[i+z]+A[i])%1000000009;
	for(int i=0;i<M;i++)A[i+1]=(A[i+1]+A[i])%1000000009;
	int T;
	for(scanf("%d",&T);T--;){
		long long m;
		scanf("%lld",&m);
		printf("%d\n",A[m/111111]);
	}
}
            
            
            
        