codeforces div1 B / codeforces div2 D
B. Blackboard Fibonacci
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
Fibonacci numbers are the sequence of integers: f0 = 0, f1 = 1, f2 = 1, f3 = 2, f4 = 3, f5 = 5, ..., fn = fn - 2 + fn - 1.
So every next number is the sum of the previous two.
Bajtek has developed a nice way to compute Fibonacci numbers on a blackboard. First, he writes a 0. Then, below it, he writes a 1.......
阅读全文