Submission #17509478


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 TLE
Exec Time 2215 ms
Memory 342420 KB

Judge Result

Set Name All
Score / Max Score 0 / 8
Status
AC × 3
TLE × 4
Set Name Test Cases
All 00, 01, 02, 03, 04, 90, 91
Case Name Status Exec Time Memory
00 TLE 2214 ms 338580 KB
01 TLE 2215 ms 341456 KB
02 TLE 2214 ms 338332 KB
03 TLE 2214 ms 342420 KB
04 AC 20 ms 9112 KB
90 AC 20 ms 9036 KB
91 AC 23 ms 8888 KB