結果
問題 |
No.42 貯金箱の溜息
|
ユーザー |
|
提出日時 | 2023-08-16 17:09:08 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 385 bytes |
コンパイル時間 | 1,782 ms |
コンパイル使用メモリ | 192,764 KB |
最終ジャッジ日時 | 2025-02-16 08:46:55 |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 RE * 2 |
ソースコード
#include<bits/stdc++.h> using namespace std; const int N=1e4+9,mod=1e9+9; int dp[N]; int main(){ #ifdef memset0 freopen("1.in","r",stdin); #endif ios::sync_with_stdio(0),cin.tie(0); int n=1e4; dp[0]=1; for(int x:{1,5,10,50,100,500}){ for(int i=0;i+x<=n;i++){ (dp[i+x]+=dp[i])%=mod; } } int T; cin>>T; while(T--){ cin>>n; cout<<dp[n]<<endl; } }