Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
161016 李沐阳 PELL数列 C++ Runtime Error 0 MS 276 KB 443 2026-09-27 10:32:22

Tests(0/10):


Code:

#include<bits/stdc++.h> /*1+1=1*1+1*1=1*(1+1)=1/(1/2)=1/0.5=(2/1)=(1+1/1)=1+1 无解 !!!!!!! */ using namespace std; int main(){ int n,k[1001]={},pell[1001]={0,1,2}; for(int i=3;i<1000;i++){ pell[i]=2*pell[i-1]+pell[i-2]; } cin>>n; for(int i=0;i<n;i++){ cin>>k[i]; } for(int i=0;i<n;i++){ cout<<pell[k[i]]%32767<<endl; } return 0; } /* 1+1=1*1+1*1=1*(1+1)=1/(1/2)=1/0.5=(2/1)=(1+1/1)=1+1 无解 ! */


Run Info:

Runtime Error:Segmentation fault