| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 65424 | 万正钰 | PELL数列 | C++ | Runtime Error | 2 MS | 268 KB | 382 | 2024-01-25 16:12:44 |
#include<algorithm> #include<iostream> #include<cstring> #include<cmath> #include<iomanip> using namespace std; int main(){ int a[1000],b[1000]={1,2},n,m,ans=0; cin>>m; for(int i=2;i<=1000;i++){ b[i]=2*b[i-1]+b[i-2]; b[i]=b[i]%32767; } for(int i=1;i<=m;i++) { cin>>n; cout<<b[n-1];} return 0; }
Runtime Error:Segmentation fault