結果

問題 No.269 見栄っ張りの募金活動
ユーザー googol_S0googol_S0
提出日時 2020-05-11 11:38:29
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 260 bytes
コンパイル時間 1,157 ms
コンパイル使用メモリ 86,848 KB
実行使用メモリ 81,728 KB
最終ジャッジ日時 2023-09-25 09:12:30
合計ジャッジ時間 14,007 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 70 ms
71,124 KB
testcase_02 RE -
testcase_03 AC 102 ms
75,880 KB
testcase_04 TLE -
testcase_05 AC 79 ms
75,816 KB
testcase_06 AC 71 ms
71,140 KB
testcase_07 TLE -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N,S,K=map(int,input().split())
S-=K*N*(N-1)//2-1
if S==0:
  print(1)
  exit()
m=10**9+7
r=range
D=[[0]*(S+1) for i in r(N+1)]
D[0][0]=1
for i in r(N):
  for j in r(S):
    k=j
    while k<=S:
      D[i+1][k]=D[i][j]+D[i+1][k]%m
      k+=i+1
print(D[-1][S-1]%m)
0