POJ 1658
来源:互联网 发布:股票交易助手小软件 编辑:程序博客网 时间:2024/04/26 03:47
题意
没啥好说的。。。
解题思路
学过等比等差的都知道规则,然后按规则弄就成
代码
//POJ1658#include <iostream>#include <cmath>using namespace std;int main(){ int n,num[5],i; cin>>n; while(n--){ for(i=0;i<4;i++){ cin>>num[i]; } if(num[1]*num[1]==num[0]*num[2] && num[2]*num[2]==num[1]*num[3]){ float temp; temp = num[0]*pow((float)(num[1]/num[0]),4); for(i=0;i<4;i++) cout<<num[i]<<" "; cout<<temp<<endl; } else{ float temp; temp = num[0]+4*(num[1]-num[0]); for(i=0;i<4;i++) cout<<num[i]<<" "; cout<<temp<<endl; } } return 0;}
0 0
- poj 1658
- poj 1658
- POJ-1658
- POJ 1658
- POJ 1658 Frogs' Neighborhood
- POJ 1658 解题报告
- POJ
- poj
- POJ
- POJ
- poj
- poj
- POJ
- POJ
- poj
- POJ
- POJ
- POJ
- 京东2015在线笔试----编程题--分苹果
- 阅读Face Alignment by Explicit Shape Regression
- IOS- 如何集成支付宝
- AI3D立体字
- 【SCOI 2009】生日快乐 DFS
- POJ 1658
- 我的第一篇博文
- 整合大量開源庫溫習基礎項目(一)
- 在servlet中使用spring注解
- css2和css3中长度单位px和em,rem的定义与区别
- 学习算法第三篇:查找算法
- VS2012 从字符串转换日期和/或时间时,转换失败
- PHP学习笔记之命名空间//待完善V1.0
- 发送邮件