[蓝桥杯] Fibonacci数列 入门
import java.util.Scanner;//导入Scanner类
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int[] arr = new int[1000010];
int n = sc.nextInt();
arr[0]=arr[1]=1;
for (int i = 2; i < n; i++) {
arr[i]=(arr[i-1]+arr[i-2])%10007;
}
sc.close();
System.out.print(arr[n-1]);
}
}