1011. World Cup Betting

// 1011. World Cup Betting.cpp: 主項目文件。

#include "stdafx.h"
#include <cstdio>

char getKey(int pos){
	if(pos==0) return 'W';
	else if(pos==1) return 'T';
	else return 'L';
}

int main()
{
	double res=1.0;
    for(int i=0;i<3;i++){
		double max=-1;
		int maxf=-1;
		for(int j=0;j<3;j++){
			double temp;
			scanf("%lf",&temp);
			if(temp>max)
				max=temp,maxf=j;
		}
		printf("%c ",getKey(maxf));
		res*=max;
	}
	printf("%.2lf\n",(res*0.65-1.0)*2);
    return 0;
}

發佈了145 篇原創文章 · 獲贊 3 · 訪問量 8萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章