結果

問題 No.269 見栄っ張りの募金活動
ユーザー NatsubiSoganNatsubiSogan
提出日時 2020-09-27 17:24:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 163 bytes
コンパイル時間 590 ms
コンパイル使用メモリ 10,720 KB
実行使用メモリ 8,368 KB
最終ジャッジ日時 2023-09-13 02:06:33
合計ジャッジ時間 3,117 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,208 KB
testcase_01 WA -
testcase_02 AC 15 ms
8,240 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 15 ms
8,084 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 15 ms
8,220 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 15 ms
8,132 KB
testcase_17 AC 15 ms
8,136 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

M=10**9+7
n,s,k=map(int,input().split())
s-=n*(n-1)//2*k+1
if s<1:exit(print(0))
dp=[1]*s
for i in range(2,n+1):
 for j in range(i,s):dp[j]=dp[j-i]%M
print(dp[-1])
0