标签:
5 1 2 3 4 5
1 1 2 3 5
import java.math.BigInteger; import java.util.Scanner; class Main{ public static void main(String args[]){ BigInteger[] p=new BigInteger[1005]; p[0]=new BigInteger("1"); p[1]=new BigInteger("1"); for(int i=2;i<1005;i++){ p[i]=p[i-1].add(p[i-2]); } Scanner sc=new Scanner(System.in); int n=sc.nextInt(); while(n-->0){ int pi=sc.nextInt(); System.out.println(p[pi-1]); } } }
标签:
原文地址:http://blog.csdn.net/u011479875/article/details/45221299