結果

問題 No.269 見栄っ張りの募金活動
ユーザー rpy3cpprpy3cpp
提出日時 2015-08-25 12:40:20
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 510 ms / 5,000 ms
コード長 169 bytes
コンパイル時間 84 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 12,160 KB
最終ジャッジ日時 2024-07-16 01:48:35
合計ジャッジ時間 2,757 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

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