help!只有测试点6是错的TAT
查看原帖
help!只有测试点6是错的TAT
1169141
fenrir_chen楼主2023/10/26 21:09
#include <iostream>
#include <iomanip>
#include <math.h>
using namespace std;
double a, b, c, d, e, f, g, x1,x2,x3;
double min(double x, double y, double z)
{
	if(y>x)
		swap(x, y);
	if (z > y)
		swap(z, y);
	if (y > x)
		swap(x, y);
	return z;


}

int main()
{
	cin >> a >> b >> c >> d >> e >> f >> g;
	x1 = ceil(a / b) * c;
	x2 = ceil(a / d) * e;
	x3 = ceil(a / f) * g;
	cout << min(x1, x2, x3) << endl;
	return 0;
}	
2023/10/26 21:09
加载中...