/*
problem name:uva 10137-The Trip
author:iqbal morshed
status:accepted
runtime:012sec
algorithm:adhoc
hints:1.find the avarage value and round it to two digit after decimal(i.e.if avagrage=9.005 then round to 9.01)
2.find difference from upper value to avarage and accumulate it
3.do the same for lower value to avarage
4.print the minimum
*/
#include
#include
using namespace std;
int tc,i;
double num[10001],sum,avg,change,bigChange,smallChange;
double twoPrecision(double a);
int main()
{
//freopen("input.txt","r",stdin);
while(scanf("%d",&tc)!=EOF)
{
sum=0,change=0,bigChange=0,smallChange=0;
if(tc==0)
break;
for(i=0;i
{
bigChange=bigChange+(num[i]-avg);
}
else
smallChange=smallChange+(avg-num[i]);
}
if(bigChange
temp=temp+10;
temp=temp/10;
avg =(double)temp/100;
return avg;
}