标签:
Time Limit: 1000MS | Memory Limit: 10000K | |
Total Submissions: 17778 | Accepted: 10871 |
2
1 2 3 4
1 2 4 8
1 2 3 4 5
1 2 4 8 16
CODE:
#include <iostream> #include <cstdio> #include <cstring> #define REP(i, s, n) for(int i = s; i <= n; i ++) #define REP_(i, s, n) for(int i = n; i >= s; i --) using namespace std; int main(){ int T, a, b, c, d; scanf("%d", &T); while(T --){ scanf("%d%d%d%d", &a, &b, &c, &d); if(d - c == c - b) printf("%d %d %d %d %d\n", a, b, c, d, d + (d - c)); else if(d / c == c / b) printf("%d %d %d %d %d\n", a, b, c, d, d * (d / c)); } return 0; }
标签:
原文地址:http://www.cnblogs.com/ALXPCUN/p/4534949.html