poj 1658 Eva's Problem
2012-06-07 10:27
274 查看
#include <iostream> using namespace std; int main() { int tc, num[5], tmp[3]; cin >> tc; while (tc--) { cin >> num[0] >> num[1] >> num[2] >> num[3]; tmp[0] = num[1] - num[0]; tmp[1] = num[2] - num[1]; tmp[2] = num[3] - num[2]; if (tmp[0] == tmp[1] && tmp[1] == tmp[2]) { num[4] = num[3] + tmp[0]; for (int i = 0; i < 5; i++) { if (i) cout << " "; cout << num[i]; } cout << endl; } else { num[4] = (num[3] * num[3])/num[2]; for (int i = 0; i < 5; i++) { if (i) cout << " "; cout << num[i]; } cout << endl; } } system("pause"); }
相关文章推荐
- poj 1658 Eva's Problem
- POJ 1658 Eva's Problem
- POJ 1658 Eva's Problem
- POJ 1658 Eva's Problem(水~)
- POJ 1658 Eva's Problem(我的水题之路——等差or等比)
- poj 1681 Painter's Problem (高斯消元)
- POJ 2480 Longge's problem(积性函数之欧拉函数与gcd)
- poj 1681 Painter's Problem(高斯消元)
- POJ 1681- Painter's Problem
- poj 1681 Painter's Problem(高斯消元)
- poj1702——Eva's Balance
- poj 1681 Painter's Problem(高斯消元 开关问题 )
- Eva's Problem - 1658
- poj 1681 Painter's Problem (高斯消元)
- POJ 1702 Eva's Balance
- POJ 1702 Eva's Balance 三进制
- POJ 1777 Vivian's Problem(梅森素数)
- POJ 1681 Painter's Problem(高斯消元)
- POJ 2048 Longge's problem (欧拉函数 积性函数)
- POJ 2480 Longge's problem 欧拉函数