結果
問題 | No.269 見栄っ張りの募金活動 |
ユーザー |
|
提出日時 | 2018-02-11 11:38:33 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 395 ms / 5,000 ms |
コード長 | 223 bytes |
コンパイル時間 | 353 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 8,192 KB |
最終ジャッジ日時 | 2024-07-16 02:01:13 |
合計ジャッジ時間 | 2,156 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
#yuki269 import sys n,s,k=map(int,raw_input().split()) s-=k*n*(n-1)/2 if s<0: print 0 sys.exit() dp=[1 for i in xrange(s+1)] for i in xrange(2,n): for j in xrange(i,s+1): dp[j]+=dp[j-i] print sum(dp[s::-n])%(10**9+7)