Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
92398 | 李禹宸 | 22第n项的数 | C++ | Wrong Answer | 1 MS | 268 KB | 255 | 2024-10-03 16:24:40 |
#include<iostream> using namespace std; int main(){ int n,c,b; int a[100]; cin>>n; for(int i=0;i<n-1;i++){ cin>>a[i]; } c=a[1]-a[0]; b=a[1]/a[0]; if(a[2]-a[1] == c){ cout<<a[n-2]+c; } else{ cout<<a[n-2]*b; } return 0; }
------Input------
6 1 6 11 16
------Answer-----
26
------Your output-----
8046949