#include<iostream>
#include<stdio.h>
#include<iomanip>
#define MAXN 100000
using namespace std; double a[MAXN];
double x1 = ;
double x2 = ;
double x3 = ;
void give_list(int x,int y,int z);
double min(double a,double b,double c);
int main()
{
//freopen("acm.acm","r",stdin);
double x;
double y;
double z;
int num;
cin>>x>>y>>z>>num;
give_list(x,y,z);
cout<<setiosflags(ios::fixed)<<setprecision()<<a[num]<<endl;
} ///////////////////////////////////////////////////////
//由2,3,5,7的乘积组成的数列,由小到大!第一个数默认是1!
///////////////////////////////////////////////////////
void give_list(int x,int y,int z)
{
a[]=;
int len;
double m;
len=;
while(len <= MAXN)//核心的代码,产生器!
{
m=min(a[int(x1)]*x,a[int(x2)]*y,a[int(x3)]*z);
if(m==a[int(x1)]*x)x1++;
if(m==a[int(x2)]*y)x2++;
if(m==a[int(x3)]*z)x3++;
a[len++]=m;
}
} double min(double a,double b,double c)//四个数中最小的;
{
a=a<b?a:b;
a=a<c?a:c;
return a;
}

POJ 2545的更多相关文章

  1. POJ 2545+2591+2247+1338简单水题

    [题意简述]:就是有这种一个序列.就拿当p1 = 2,p2 = 3, p3 = 5,来举例.由这三个数为基准组成的序列是: 2,3,4,5,6,8,9,10,12--如今给你这个序列数组的下标,让你求 ...

  2. POJ 2591 1338 2545 2247(数列递归衍生问题,思路挺妙)

    四道题的难度: 2591<1338<2545<2247 POJ 2591 Set Definition: 这是从discuss里看来的,写的挺好,直接copy,根据我的代码稍有改动( ...

  3. POJ 1741 Tree (树分治入门)

    Tree Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 8554   Accepted: 2545 Description ...

  4. POJ 3370. Halloween treats 抽屉原理 / 鸽巢原理

    Halloween treats Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 7644   Accepted: 2798 ...

  5. POJ 2356. Find a multiple 抽屉原理 / 鸽巢原理

    Find a multiple Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7192   Accepted: 3138   ...

  6. POJ 2965. The Pilots Brothers' refrigerator 枚举or爆搜or分治

    The Pilots Brothers' refrigerator Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 22286 ...

  7. POJ 1753. Flip Game 枚举or爆搜+位压缩,或者高斯消元法

    Flip Game Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 37427   Accepted: 16288 Descr ...

  8. POJ 3254. Corn Fields 状态压缩DP (入门级)

    Corn Fields Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 9806   Accepted: 5185 Descr ...

  9. POJ 2739. Sum of Consecutive Prime Numbers

    Sum of Consecutive Prime Numbers Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 20050 ...

随机推荐

  1. Pappus一阶矩公式

  2. OSI七层模型和TCP/IP四层模型

    1)网络层负责点到点的传输(这里的“点”指主机或路由器),而传输层负责端到端的传输(这里的“端”指应用进程) 2)ARP协议介于数据链路层和网络层之间(IPv4专有,IPv6的地址映射功能在ICMPv ...

  3. jquery删除onclick属性和设置onclick属性--获取验证码

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  4. ZOJ 3156 Taxi (二分 + 二分匹配)

    题意:给定 n 个人坐标, m 辆车的坐标,还有人的速度,要求每个人要进一辆不同的车,问你所有都进车的最短时间是多少. 析:首先二分时间 mid,很明显就是最后那个人进车的时间,然后如果把第 i 个人 ...

  5. Django开发环境搭建

    最近笔者使用了Django框架作为项目model层的数据对象处理. 关于Django的开发环境,需要安装以下内容: 1.安装python 2.安装VCForPython27.msi 3.安装pycha ...

  6. TCP、UDP之三次握手四次挥手

    1. http协议的简介 HTTP,HyperText Transfer Protocol.超文本传输协议,是互联网上应用最为广泛的一种网络协议.基于TCP的协议,HTTP是一个客户端和服务器端请求和 ...

  7. kepware http接口 c语言(libcrul)开发

    列出所有变量 CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); ...

  8. codeforces 879c

    C. Short Program time limit per test 2 seconds memory limit per test 256 megabytes input standard in ...

  9. python处理excel之读:xlrd模块

    # -*- coding:utf-8 -*- import xlrd path = r'D:/工作簿1(已自动还原).xlsx' # 打开excel文件读取数据 data = xlrd.open_wo ...

  10. shell 命令 bc linux下的计算器

    bc命令 在linux环境下的计算器.