Submission #17509464


Source Code Expand

Copy
K, N = map(int, input().split())
dp = [1 if i < k else 0 for i in range(n)]
a = k
mod = 10**9+7
for i in range(k, n):
    dp[i] = a%mod
    a += dp[i]-dp[i-k]
print(dp[-1])

Submission Info

Submission Time
Task T - フィボナッチ
User puredore
Language Python (3.8.2)
Score 0
Code Size 181 Byte
Status
Exec Time 20 ms
Memory 9108 KB

Judge Result

Set Name All
Score / Max Score 0 / 8
Status
× 7
Set Name Test Cases
All 00, 01, 02, 03, 04, 90, 91
Case Name Status Exec Time Memory
00 18 ms 9108 KB
01 17 ms 9100 KB
02 19 ms 8876 KB
03 20 ms 9048 KB
04 17 ms 8988 KB
90 16 ms 8980 KB
91 19 ms 8988 KB