| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 138701 | 李明秦 | 火车上的人数 | C++ | Wrong Answer | 0 MS | 272 KB | 427 | 2025-11-29 14:48:57 |
#include<bits/stdc++.h> using namespace std; int main() { int a,n,m,b,d[16]= {0},x[16]= {0},s[16]= {0}; cin>>a>>n>>m>>b; d[1]=d[2]=a; s[1]=a; for (int i=0; i<m; i++) { x[2]=s[2]=i; for (int j=3; j<=n-1; j++) { s[j]=s[j-1]+s[j-2]; x[j]=s[j-1]; d[j]=d[j-1]+s[j]-x[j]; } if (d[n-1]==m) { cout<<d[b]; return 0; } } cout<<"Noanswer"; return 0; }
------Input------
1 8 75 6
------Answer-----
No answer.
------Your output-----
Noanswer