結果

問題 No.269 見栄っ張りの募金活動
ユーザー rpy3cpprpy3cpp
提出日時 2015-08-25 12:40:20
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 498 ms / 5,000 ms
コード長 169 bytes
コンパイル時間 422 ms
コンパイル使用メモリ 10,608 KB
実行使用メモリ 9,552 KB
最終ジャッジ日時 2023-09-23 01:11:47
合計ジャッジ時間 2,730 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,760 KB
testcase_01 AC 16 ms
7,840 KB
testcase_02 AC 15 ms
7,796 KB
testcase_03 AC 29 ms
7,764 KB
testcase_04 AC 177 ms
9,260 KB
testcase_05 AC 16 ms
7,792 KB
testcase_06 AC 15 ms
7,808 KB
testcase_07 AC 498 ms
9,552 KB
testcase_08 AC 16 ms
7,876 KB
testcase_09 AC 16 ms
7,796 KB
testcase_10 AC 16 ms
7,880 KB
testcase_11 AC 45 ms
8,912 KB
testcase_12 AC 15 ms
7,776 KB
testcase_13 AC 67 ms
8,516 KB
testcase_14 AC 16 ms
8,156 KB
testcase_15 AC 59 ms
8,676 KB
testcase_16 AC 16 ms
7,716 KB
testcase_17 AC 16 ms
7,816 KB
testcase_18 AC 179 ms
8,608 KB
testcase_19 AC 61 ms
8,184 KB
testcase_20 AC 22 ms
8,292 KB
testcase_21 AC 20 ms
8,680 KB
testcase_22 AC 44 ms
8,212 KB
testcase_23 AC 19 ms
7,928 KB
testcase_24 AC 26 ms
8,732 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,S,K=map(int,input().split())
S-=N*~-N*K//2-1
if S<1:print(0)
else:
 d=[1]*S
 for n in range(2,N):
  for s in range(n,S): d[s]+=d[s-n]
 print(sum(d[S-1::-N])%(10**9+7))
0