Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
82600 sh25_wanghy Pell数列 C++ 通过 0 MS 248 KB 265 2026-01-16 14:46:05

Tests(1/1):


#include<iostream> using namespace std; int pell(int k){ if(k<=2) return k; else return 2*pell(k-1)+pell(k-2); } int main(){ int n,m; cin>>n; for(int i=1;i<=n;++i){ cin>>m; cout<<pell(m)<<endl; } return 0; }


测评信息: