Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
161020 李沐阳 PELL数列 C++ Compile Error 0 MS 0 KB 249 2026-09-27 10:41:12

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:9:4: error: 'a' was not declared in this scope
    a[j]=(2*a[j-1]+a[j-2])%32767;
    ^