#include
int fei(int index) //数组实现
{
if(index<1)
{
return -1;
}
if(index<3)
{
return 1;
}
int *a=new int[index];
a[0]=a[1]=1;
for(int i=2; i a[i]=a[i-1]+a[i-2]; int m=a[index-1]; delete a; //释放内存空间 return m; } int tou(int i) //取第一位 { while(i>9) i/=10; return i; } int main() { int n,a[100]; scanf("%d",&n); for(int i=0; i scanf("%d",&a[i]); for(int i=0; i { if(fei(a[i])>9) printf("%d %d\n",tou(fei(a[i])),fei(a[i])%10); else printf("%d\n",fei(a[i])); } }