Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
138618 谭思宸 PELL数列 C++ Compile Error 0 MS 0 KB 327 2025-11-29 11:02:29

Tests(0/0):


Code:

# include<iostream> # include<cstring> using namespace std; int main(){ long long i=0,j,num=0,sum=0; long long arr[100001]={0,1,2}; cin>>n; for (i=1;i<=n;i++){ cin>>k; for (j=3;j<=k;j++){ a[j]=2*a[j-1]%32767+a[j-2]%32767; } cout<<a[k]<<endl; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:9: error: 'n' was not declared in this scope
    cin>>n;
         ^
Main.cc:9:13: error: 'k' was not declared in this scope
        cin>>k;
             ^
Main.cc:11:12: error: 'a' was not declared in this scope
            a[j]=2*a[j-1]%32767+a[j-2]%32767;
            ^
Main.cc:13:14: error: 'a' was not declared in this scope
        cout<