当前位置:网站首页>C193: scoring system
C193: scoring system
2022-07-27 20:01:00 【Qiangan】
Title Description :
Design a scoring system for singing competitions , The following rules :
share n Judges give points (0~100 branch , Integers ), Ask to remove one of the highest scores , Remove a minimum score , The average score of the remaining grades is the final score .
Enter a positive integer n(3≤n≤10), Express n Judges , Input n Achievements , Output the final score .
Input format :
Enter a positive integer in the first line n(3≤n≤10), On the second line, enter the score given by each judge , Separate... With spaces .
Output format :
Output the final score , Two decimal places are reserved for the result .
Example :
Input :5
70 75 80 85 90
Output :80.00
#include<stdio.h>
int main()
{
int p[10],n,i,min=100,max=0;
float z;
scanf("%d",&n);
for(i=0;i<n;i++) scanf("%d",&p[i]);
for(i=0;i<n;i++)
{
z+=p[i];
if(p[i]<min) min=p[i];
if(p[i]>max) max=p[i];
}
z=(z-min-max)/(n-2);
printf("%.2f",z);
return 0;
}
边栏推荐
- Common errors reported by pytorch
- 真实案例,大学生接单被骗,希望大家不要被骗了【惨痛教训】
- 11.2DHCP
- Qt的QTextToSpeech类实现语音播报功能
- Hacker introductory tutorial (very detailed) from zero basic introduction to proficiency, it is enough to read this one.
- 10.31 extended configuration of static route
- 深度主动学习综述2020
- ContentProvider of four components
- UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xff in position 0: invalid start byte
- Oracle 简单的高级查询
猜你喜欢

AutoCompleteTextView (input box pre match)

Sharepreference (storage)

How to encrypt the data in MySQL database? Mysql8.0 comes with new features

antdv: Each record in table should have a unique `key` prop,or set `rowKey` to an unique primary key

Datepicker and TimePicker

JS event listening mouse keyboard form page onclick onkeydown onchange
![[RCTF2015]EasySQL-1|SQL注入](/img/69/aa1fc60ecf9a0702d35d876e8c3dda.png)
[RCTF2015]EasySQL-1|SQL注入

Qt的QTextToSpeech类实现语音播报功能

Combinatorics -- permutation and combination

Fabric上搭建Hyperledger caliper进行性能测试
随机推荐
UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xff in position 0: invalid start byte
C#网络应用编程,实验2:IP地址转换和域名解析练习
Oracle XE版安装与用户操作
剑指 Offer 25. 合并两个排序的链表
Qt的QTextToSpeech类实现语音播报功能
Online Judge 输出超限
Sqlife (database)
pytorch lstm+attention
文件操作防护
Oracle 简单的高级查询
China business CDP white paper | love Analysis Report
PC博物馆(3) MITS Altair 8800
sqlite创建表联合主键的sql写法
Overview of deep active learning 2020
1.2、基于增量式生成遮挡与对抗抑制的行人再识别(代码理解与实验进度+报告)
Detailed introduction to common coordinate system of cesium
Fabric上搭建Hyperledger caliper进行性能测试
AutoCompleteTextView (input box pre match)
真实案例,大学生接单被骗,希望大家不要被骗了【惨痛教训】
内置模块10.18