delete pics to save space
This commit is contained in:
19
history_source/信息学奥赛一本通/2.6.7.cpp
Normal file
19
history_source/信息学奥赛一本通/2.6.7.cpp
Normal file
@ -0,0 +1,19 @@
|
||||
#include<cstdio>
|
||||
int main()
|
||||
{
|
||||
double max=0,sum=0,t;
|
||||
int n,i;
|
||||
while(scanf("%d",&n)==1)
|
||||
{
|
||||
max=sum=0;
|
||||
for(i=0;i<n;i++)
|
||||
{
|
||||
scanf("%lf",&t);
|
||||
sum+=t;
|
||||
if(t>max) max=t;
|
||||
}
|
||||
if(sum-max<max) printf("%.1lf\n",sum-max);
|
||||
else printf("%.1lf\n",sum/2.0);
|
||||
}
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user