import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args) { BigInteger[][] Big = new BigInteger[222][2]; String num1 = "1"; String num0 = "0"; Big[1][0] = new BigInteger(num1); Big[1][1] = new BigInteger(num0); Big[2][0] = new BigInteger(num1); Big[2][1] = new BigInteger(num1); for(int i = 3; i <= 200; i++){ Big[i][1] = Big[i-1][0]; Big[i][0] = Big[i-1][0].add(Big[i-1][1]); // System.out.println(Big[i][1]); // System.out.println(Big[i][0]); } Scanner input = new Scanner(System.in); while(input.hasNext()){ int n = input.nextInt(); // System.out.println(Big[n][0]); // System.out.println(Big[n][1]); System.out.println(Big[n][0].add(Big[n][1])); } input.close(); // System.out.println("加法操作:" + big1.add(big2)); // System.out.println("减法操作:" + big1.subtract(big2)); // System.out.println("乘法操作:" + big1.multiply(big2)); // BigInteger result[] = big1.divideAndRemainder(big2); // System.out.println("相除后的商是:" + result[0]); // System.out.println("相除后的余数是:" + result[1]); } }