Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
57077 | 梅煦洋 | 找规律填数字 | C++ | 解答错误 | 0 | 0 MS | 260 KB | 755 | 2022-08-03 17:59:26 |
#include<bits/stdc++.h> using namespace std; const int N=10010; int ff[5001]={0}; int a,b,c,d,e; int main(){ while(1){ cin>>a>>b>>c>>d>>e; if(a==0&&b==0&&c==0&&d==0&&e==0) break; if(((b-a)==(c-b))&&((c-b)==(d-c))&&((d-c)==(e-d))){ cout<<(e+(b-a))<<" "<<(e+2*(b-a))<<" "<<(e+3*(b-a))<<" "<<(e+4*(b-a))<<" "<<(e+5*(b-a))<<endl; continue; } if(((b/a)==(c/b))&&((c/b)==(d/c))&&((d/c)==(e/d))){ cout<<(e*(b/a))<<" "<<(e*(b/a)*(b/a))<<" "<<(e*(b/a)*(b/a)*(b/a))<<" "<<(e*(b/a)*(b/a)*(b/a)*(b/a))<<" "<<(e*(b/a)*(b/a)*(b/a)*(b/a)*(b/a))<<endl; continue; } if(((b+a)==c)&&((c+b)==e)&&((d+c)==e)){ cout<<(d+e)<<" "<<(d+e*2)<<" "<<(d*2+e*3)<<" "<<(d*3+e*5)<<" "<<(d*5+e*8)<<endl; continue; } } return 0; }