結果
| 問題 | 
                            No.269 見栄っ張りの募金活動
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2025-10-14 13:51:22 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                TLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 282 bytes | 
| コンパイル時間 | 320 ms | 
| コンパイル使用メモリ | 82,548 KB | 
| 実行使用メモリ | 89,452 KB | 
| 最終ジャッジ日時 | 2025-10-14 13:51:29 | 
| 合計ジャッジ時間 | 7,287 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 1 TLE * 1 -- * 20 | 
ソースコード
n,s,k=map(int,input().split());mod=10**9+7 for i in range(n): s-=k*i if s<0: print(0) else: dp=[[0]*(s+1) for i in range(n+1)] dp[0][0]=1 for i in range(n): c=n-i for j in range(s+1): for l in range(j,s+1,c): dp[i+1][l]+=dp[i][j] dp[i+1][l]%=mod print(dp[n][s])