B28 - Fibonacci Easy (mod 1000000007)
提出
WA
code: python
n = int(input())
stack = []
stack.append(1)
stack.append(1)
count = 0
mod = 1000000007
while count <= n - 3:
stack.append(stack-1 % mod + stack-2 % mod) count += 1
解答
code: python
n = int(input())
stack = []
stack.append(1)
stack.append(1)
count = 0
mod = 1000000007
while count <= n - 3:
stack.append((stack-1 + stack-2) % mod) count += 1