博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
英文金曲大赛
阅读量:3946 次
发布时间:2019-05-24

本文共 1115 字,大约阅读时间需要 3 分钟。

英文金曲大赛

Time Limit: 1000 ms Memory Limit: 65536 KiB

Problem Description

我们在“渊子数”的题目中已经了解了渊子是个什么样的人了,他在大一的时候参加过工商学院的“英语聚乐部”。告诉你个秘密,这个俱乐部是个好地方,不但活动精彩而且有MM。

这不,英语俱乐部举办了一个叫做“英文金曲大赛”的节目。这个节目有好多人参加,这不,成绩出来了,渊子当是很勇敢,自告奋勇接下了算出大家的总得分的任务。
当时有7个评委,每个评委都要给选手打分,现在要求去掉一个最高分和去掉一个最低分,再算出平均分。结果精确到小数点后两位。

Input

测试数据包括多个实例。

每组数据包括7个实数,代表评委们对该选手的评分。紧接着是选手的名字,名字的长度不超过30个字符,且没有空格。
输入直到文件结束。

Output

算出每位选手名字和最终得分,结果保留两位小数。

Sample Input

10 10 10 10 10 10 9 xiaoyuanwang

0 0 0 0 0 0 0 beast

Sample Output

xiaoyuanwang 10.00

beast 0.00

代码如下

#include 
#include
#include
struct{ int a[7]; char name[31];} s;int main(){ int i,max,min,sum; double d; while(scanf("%d",&s.a[0])!=EOF) { for(i=1; i<=6; i++) { scanf("%d",&s.a[i]); } scanf("%s",s.name); max=s.a[0]; min=s.a[0]; sum=0; for(i=0; i<=6; i++) { if(max
s.a[i]) { min=s.a[i]; } sum+=s.a[i]; } sum=sum-max-min; d=sum/5.0; printf("%s %.2lf\n",s.name,d); } return 0;}

转载地址:http://swhwi.baihongyu.com/

你可能感兴趣的文章
用数字来看某知名B2C网站的发展内幕和隐私
查看>>
vs2010一些设置
查看>>
生活感悟语录
查看>>
用python中htmlParser实现的spider(python spider)
查看>>
在线测速网址
查看>>
mysql中GROUP_CONCAT的应用
查看>>
研发人员的绩效考核
查看>>
Python 3 之多线程研究
查看>>
Python 3中的多线程文件下载类
查看>>
Python库之MySQLdb介绍
查看>>
Python3中利用Urllib进行表单数据提交(Get,Post)
查看>>
Python开发之扩展库的安装指南及Suds(Webservice)的使用简介
查看>>
软件项目管理一点分享
查看>>
iphone程序打包ipa格式
查看>>
Ios开发之Apns功能介绍(应用程序通知)及PHP/Python代码
查看>>
iphone开发的几个Apple官方中文教程地址
查看>>
Algorithms: Kruskal's algorithm and Prim's algorithm for Minimum-spanning-tree
查看>>
Algorithm : Dijkstra's algorithm and Bellmon-Ford Paths algorithm
查看>>
Algorithm: k-nearest neighbors and decison boundary(Cross Validation)
查看>>
Algorithm: Principle Component Analysis for High Dimension Reduction Data
查看>>