結果
問題 | No.269 見栄っ張りの募金活動 |
ユーザー |
![]() |
提出日時 | 2020-05-11 22:03:24 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 644 ms / 5,000 ms |
コード長 | 253 bytes |
コンパイル時間 | 74 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 11,392 KB |
最終ジャッジ日時 | 2024-07-19 06:44:49 |
合計ジャッジ時間 | 2,902 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
import sysinput=lambda: sys.stdin.readline().rstrip()n,s,k=map(int,input().split())mod=10**9+7s-=n*(n-1)//2*kif s<0:print(0)else:DP=[1]*(s+1)for i in range(2,n+1):for j in range(i,s+1):DP[j]=(DP[j]+DP[j-i])%modprint(DP[s])