Offer10I.斐波那契数列/Solution.java
<reponame>codeSu97/SwordToOffer<gh_stars>0class Solution {
    public int fib(int n) {
        int a = 0, b = 1, sum;
        for(int i = 0; i < n; i++){
            sum = (a + b) % 1000000007;
            a = b;
            b = sum;
        }
        return a;
    }
}