結果
問題 |
No.1011 Infinite Stairs
|
ユーザー |
![]() |
提出日時 | 2020-03-22 18:45:33 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 531 ms / 2,000 ms |
コード長 | 359 bytes |
コンパイル時間 | 169 ms |
コンパイル使用メモリ | 81,984 KB |
実行使用メモリ | 249,292 KB |
最終ジャッジ日時 | 2024-07-17 12:01:25 |
合計ジャッジ時間 | 5,576 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
import sys input=lambda: sys.stdin.readline().rstrip() n,d,k=map(int,input().split()) mod=10**9+7 A=[0]*(n*d+1) A[0]=1 for _ in range(n): B=[0]*(n*d+1) for i in range(n*d+1): if not A[i]: continue else: B[i+1]+=A[i] if i+d+1<=n*d: B[i+d+1]-=A[i] A[0]=0 for i in range(1,n*d+1): A[i]=(A[i-1]+B[i])%mod print(A[k])