Run ID:3796
提交时间:2024-07-06 11:23:31
# include<iostream> using namespace std; int pell(int n){ if(n<=2)return n; return 2*pell(n-1)+pell(n-2); } int main(){ int x, test[1000]; cin>>x; for(int i = 0; i < x; i++)cin>>test[i]; for(int i = 0; i < x; i++)cout<<pell(test[i])<<endl; return 0; }