int n = 30;
int []arr = new int[n+1];
arr[0] = 3;
arr[1] = 2;
for(int i=2; i<=n;){
int flag = arr[i-1]*arr[i-2];
if(flag<10){
arr[i] = flag;
i++;
}else{
int a1 = (int) Math.floor(flag/10);
int a2 = flag -a1*10;
arr[i] = a1;
arr[i+1] = a2;
i=i+2;
}
}
for(int m=0; m
}
3 2 6 1 2 2 4 8 3 2 6 1 2 2 4 8 3 2 6 1 2 2 4 8 3 2 6 1 2 2 4
不知道对不对。。呵呵