3 1 11 11111
1 2 8
import java.util.Scanner;
import java.math.BigInteger;
public class yugtg {
public static void main(String[] args) {
Scanner cin = new Scanner(System.in);
BigInteger s[] = new BigInteger[205];
s[1] = new BigInteger("1");
s[2] = new BigInteger("2");
for(int i=3;i<=200;i++)
s[i] = s[i-1].add(s[i-2]);
int n = cin.nextInt();
for(int i=0;i<n;i++)
{
String S = cin.next();
int l = S.length();
System.out.println(s[l]);
}
}
}HDUJ 1865 1sting,布布扣,bubuko.com
原文地址:http://blog.csdn.net/hyccfy/article/details/38235679