1011 World Cup Betting (20point(s)) Easy only once

基本思想:

简单对比,弱智题

 

关键点:

 

#include<iostream>
#include<stdlib.h>
#include<stdio.h>
#include<vector> 
#include<string>
#include<math.h>
#include<algorithm>
using namespace std;
using std::vector;

vector<double>rate;
vector<char>sign;

int main() {
	double a,b,c;
	for (int i = 0; i < 3; i++) {
		scanf("%lf %lf %lf", &a, &b, &c);
		double r = max(a, b);
		r = max(r, c);
		if (r == a) {
			sign.push_back('W');
		}
		else if (r == b) {
			sign.push_back('T');
		}
		else {
			sign.push_back('L');
		}
		rate.push_back(r);
	}
	for (int i = 0; i < 3; i++) {
		printf("%c ", sign[i]);
	}
	printf("%.2lf", (rate[0] * rate[1] * rate[2] * 0.65 - 1) * 2);
	system("pause");
	return 0;
}

  

上一篇:VScode---visual stdio code配置中文环境及下载插件


下一篇:STM32常用数据类型总结!!!!!!!!!!