結果
問題 | No.41 貯金箱の溜息(EASY) |
ユーザー |
|
提出日時 | 2014-10-17 00:39:30 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 28 ms / 5,000 ms |
コード長 | 514 bytes |
コンパイル時間 | 662 ms |
コンパイル使用メモリ | 54,616 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-30 09:25:25 |
合計ジャッジ時間 | 1,288 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 |
ソースコード
#include <iostream>#include <cstring>using namespace std;typedef long long ll;#define REP(i, n) for(int(i)=0;(i)<(n);++(i))int MOD = 1000000009;int dp[100000];int main(){int T;cin >> T;REP(i,100000) dp[i] = 1;for(int i = 1; i < 10; i++){for(int j = i; j < 100000; j++){dp[j] = (dp[j] + dp[j-i]) % MOD;}}REP(i,T){ll N;cin >> N;cout << dp[N/111111] << endl;}return 0;}