Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
83120 sh25_shengmy Pell数列-递归 C++ 通过 0 MS 252 KB 276 2026-01-22 20:58:37

Tests(1/1):


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


测评信息: