semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
        int i,n,s1,x[10],f[10];
   
        double s2,G[10];
        float GPA;
        scanf("%d",&n);
        s1=0;
        s2=0;

        for(i=0;i<n;i++)
        {
                scanf("%d",&x[i]);
                s1+=x[i];
        }
        for(i=0;i<n;i++)
    {
                scanf("%d",&f[i]);
                if(f[i]>=90){G[i]=4.0;}
        else if(f[i]>=85){G[i]=3.7;}
        else if(f[i]>=82){G[i]=3.3;}
        else if(f[i]>=78){G[i]=3.0;}
    else if(f[i]>=75){G[i]=2.7;}
    else if(f[i]>=72){G[i]=2.3;}
    else if(f[i]>=68){G[i]=2.0;}
    else if(f[i]>=64){G[i]=1.5;}
    else if(f[i]>=60){G[i]=1.0;}
        else if(f[i]<60)G[i]=0.0;
                s2+=(G[i])*(x[i]);
    }



        GPA=1.0*s2/s1;

        printf("%.2f",GPA);
        return 0;
}
int main()
{
	int a,sum=0,i,j,k,m;
	double SUM;
	scanf("%d",&a);
	int credit[ECO];
	int point[ECO];
	double gpa[ECO];
	for(i=0;i<a;i++)
	{
		scanf("%d",&(credit[i]));
		sum=sum+credit[i];
		
	}
	for(j=0;j<a;j++)
	{
		scanf("%d",&(point[j]));
	}
	for(k=0;k<a;k++)
	{
		if(point[k]>=90)
			gpa[k]=4.0*credit[k];
		else if(point[k]>=85)
			gpa[k]=3.7*credit[k];
		else if(point[k]>=82)
			gpa[k]=3.3*credit[k];
		else if(point[k]>=78)
			gpa[k]=3.0*credit[k];
		else if(point[k]>=75)
			gpa[k]=2.7*credit[k];
		else if(point[k]>=72)
			gpa[k]=2.3*credit[k];
		else if(point[k]>=68)
			gpa[k]=2.0*credit[k];
		else if(point[k]>=64)
			gpa[k]=1.5*credit[k];
		else if(point[k]>=60)
			gpa[k]=1.0*credit[k];
		else
			gpa[k]=0*credit[k];
	}
	for(m=0,SUM=0;m<a;m++)
	{
		SUM=SUM+gpa[m];
	}
	printf("%.2lf",1.0*SUM/sum);
	return 0;
}
int main()
{
    int n,i,sum1=0,x[10];
	double sum2=0,m[10];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
        scanf("%d",&x[i]);
		sum1+=x[i];
	}
	for(i=0;i<n;i++)
	{
		scanf("%lf",&m[i]);
		if(m[i]>=90)m[i]=4;
		else if(m[i]>=85)m[i]=3.7;
        else if(m[i]>=82)m[i]=3.3;
        else if(m[i]>=78)m[i]=3.0;
        else if(m[i]>=75)m[i]=2.7;
        else if(m[i]>=72)m[i]=2.3;
        else if(m[i]>=68)m[i]=2.0;
        else if(m[i]>=64)m[i]=1.5;
        else if(m[i]>=60)m[i]=1;
		else m[i]=0;
	}
	for(i=0;i<n;i++)
	{
        sum2+=(x[i]*m[i]);
	}
	printf("%.2lf",sum2/sum1);
	return 0;
}
int main()
{
	int n,i;
	scanf("%d",&n);
	float course[10],jidian[10],sum=0,ave=0;
	int mark[10];
	for(i=1;i<=n;i++)
	{
		scanf("%f",&course[i]);
		
	}
	
	for(i=1;i<=n;i++)
	{
		sum+=course[i];
	}
	for(i=1;i<=n;i++)
	{
		scanf("%d",&mark[i]);
	}
	for(i=1;i<=n;i++)
	{
		
		if(mark[i]>=90&&mark[i]<=100)
			jidian[i]=4.0;
		else if(mark[i]>=85&&mark[i]<=89)
			jidian[i]=3.7;
	    else if(mark[i]>=82&&mark[i]<=84)
			jidian[i]=3.3;
		else if(mark[i]>=78&&mark[i]<=81)
			jidian[i]=3.0;
		else if(mark[i]>=75&&mark[i]<=77)
			jidian[i]=2.7;
		else if(mark[i]>=72&&mark[i]<=74)
			jidian[i]=2.3;
		else if(mark[i]>=68&&mark[i]<=71)
			jidian[i]=2.0;
		else if(mark[i]>=64&&mark[i]<=67)
			jidian[i]=1.5;
		else if(mark[i]>=60&&mark[i]<=63)
			jidian[i]=1.0;
		else 
			jidian[i]=0;

	}
	
	for(i=1;i<=n;i++)
	{
		ave+=course[i]*jidian[i]/sum;
	}
	printf("%.2f",ave);
	return 0;

			
		
	


}
float GPA(int n)
{
	int i;
	float result;
	float gpa[10];
	float gpa_1[10];
	float sumxf=0;
	float sumcj=0;
	int chengji[10],xuefen[10];
	for(i=0;i<n;i++)
		scanf("%d",&xuefen[i]);
	for(i=0;i<n;i++)
		scanf("%d",&chengji[i]);
	for(i=0;i<n;i++)
	{
		if(90<=chengji[i]&&chengji[i]<=100)gpa[i]=4.0;
		else if(85<=chengji[i]&&chengji[i]<=89)gpa[i]=3.7;
		else if(82<=chengji[i]&&chengji[i]<=84)gpa[i]=3.3;
		else if(78<=chengji[i]&&chengji[i]<=81)gpa[i]=3.0;
		else if(75<=chengji[i]&&chengji[i]<=77)gpa[i]=2.7;
		else if(72<=chengji[i]&&chengji[i]<=74)gpa[i]=2.3;
		else if(68<=chengji[i]&&chengji[i]<=71)gpa[i]=2.0;
		else if(64<=chengji[i]&&chengji[i]<=67)gpa[i]=1.5;
		else if(60<=chengji[i]&&chengji[i]<=63)gpa[i]=1.0;
		else gpa[i]=0;
	}
	for(i=0;i<n;i++)
	{
	gpa_1[i]=gpa[i]*xuefen[i];
	sumcj+=gpa_1[i];
	sumxf+=xuefen[i];
	}
	result=sumcj/sumxf;
	return result;
}
void main()
{
	int n;
	float gpa; 
	scanf("%d",&n);
	gpa=GPA(n);
	printf("%.2f",gpa);
}
int main(){
	int n,xf[100],df[100],xfzh=0;
	double jdzh=0.0,jd[100],xfjd[100],zpjd;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		scanf("%d",&xf[i]);
		xfzh+=xf[i];
	}
	for(int a=0;a<n;a++){
		scanf("%d",&df[a]);
	}
	for(int b=0;b<n;b++){
		if(df[b]>=90&&df[b]<=100){
			jd[b]=4.0;
		}else if(df[b]>=85&&df[b]<=89){
			jd[b]=3.7;
		}else if(df[b]>=82&&df[b]<=84){
			jd[b]=3.3;
		}else if(df[b]>=78&&df[b]<=81){
			jd[b]=3.0;
		}else if(df[b]>=75&&df[b]<=77){
			jd[b]=2.7;
		}else if(df[b]>=72&&df[b]<=74){
			jd[b]=2.3;
		}else if(df[b]>=68&&df[b]<=71){
			jd[b]=2.0;
		}else if(df[b]>=64&&df[b]<=67){
			jd[b]=1.5;
		}else if(df[b]>=60&&df[b]<=63){
			jd[b]=1.0;
		}else{
			jd[b]=0.0;
		}
		xfjd[b]=jd[b]*xf[b];
		jdzh+=xfjd[b];
	}
	zpjd=jdzh/xfzh;
	printf("%.2lf\n",zpjd);
	return 0;
}
int main(int argc, char* argv[])
{   int n, i, a[10], b[10];   
    double c[10], sum1 = 0, sum2 = 0;
	scanf("%d", &n);
     for(i=0;i<n;i++)
	   {
		   scanf("%d", &a[i]);
           
	 }
	   
	   
         for(i=0;i<n;i++)
	{
	        scanf("%d",&b[i]);
		 
	  
	    if(b[i]>=90)
		      c[i] = 4.0;
	   if(b[i]>=85 && b[i]<=89)
		   c[i] = 3.7;
	   if(b[i]>=82 && b[i]<=84)
		   c[i] = 3.3;
	   if(b[i]>=78 && b[i]<=81)
		   c[i] = 3.0;
	   if(b[i]>=75 && b[i]<=77)
		   c[i] = 2.7;
	   if(b[i]>=72 && b[i]<=74)
		   c[i] = 2.3;
	   if(b[i]>=68 && b[i]<=71)
		   c[i] = 2.0;
	   if(b[i]>=64 && b[i]<=67)
		   c[i] = 1.5;
	   if(b[i]>=60 && b[i]<=63)
		   c[i] = 1.0;
	   if(b[i]<60)
		   c[i] = 0;
	   
	   sum2 += a[i] * c[i];
	   sum1 += a[i];
	 }
	printf("%.2f", sum2 / sum1);
	return 0;
}
int main(int argc, char* argv[])
{
int n,a,c;
float m[100],s[100],j[100];
float GPA,sum=0,w=0;
scanf("%d\n",&n);
for(a=0;a<n;a++)
{
scanf("%f\n",&s[a]);
w+=s[a];
}
for(a=0;a<n;a++)
{
scanf("%f",&j[a]);
if(j[a]>=90&&j[a]<=100)
{
m[a]=4.0;
}
if(j[a]>=85&&j[a]<=89)
{
m[a]=3.7;
}
if(j[a]>=82&&j[a]<=84)
{
m[a]=3.3;
}
if(j[a]>=78&&j[a]<=81)
{
m[a]=3.0;
}
if(j[a]>=75&&j[a]<=77)
{
m[a]=2.7;
}
if(j[a]>=72&&j[a]<=74)
{
m[a]=2.3;
}
if(j[a]>=68&&j[a]<=71)
{
m[a]=2.0;
}
if(j[a]>=64&&j[a]<=67)
{
m[a]=1.5;
}
if(j[a]>=60&&j[a]<=63)
{
m[a]=1.0;
}
if(j[a]<60)
{
m[a]=0;
}
}
for(c=0;c<n;c++)
{
sum+=m[c]*s[c] ;
}
GPA=sum/w;
printf("%.2f",GPA);
return 0;	
}
int main(){
	double c=0;
	int n,i,b=0;
	int x[10];
	int f[10];
       scanf("%d", &n);
          for(i=0;i<n;i++){
	   scanf("%d", &(x[i]));
}
		   for(i=0;i<n;i++){
	   scanf("%d", &(f[i]));
}
for(i=0;i<n;i++){
b+=(x[i]);
}

for(i=0;i<n;i++){
      if(89<f[i]&&f[i]<101) 
	   c+=4.0*(x[i]);
	else if(84<f[i]&&f[i]<90) 
	   c+=3.7*(x[i]);
	else if(81<f[i]&&f[i]<85) 
	   c+=3.3*(x[i]);
	 else if(77<f[i]&&f[i]<82) 
	 c+=3.0*(x[i]);
	else if(74<f[i]&&f[i]<78) 
	   c+=2.7*(x[i]);
	else if(71<f[i]&&f[i]<75) 
	   c+=2.3*(x[i]);
	else if(67<f[i]&&f[i]<72) 
	   c+=2.0*(x[i]);
	else if(63<f[i]&&f[i]<68) 
	   c+=1.5*(x[i]);
		else if(59<f[i]&&f[i]<64) 
	   c+=1.0*(x[i]);
        else 
	   c+=0*(x[i]);

}
   printf("%.2f",c/b);
   return 0;
}
int main()
{
	int a,i,j;
	float r,rt=0,bt=0.00,GPA;
	int scores[100];
	float point[100];
	scanf("%d",&a);
	for(i=0;i<a;i++)
	{
		scanf("%d",&scores[i]);
		bt+=scores[i];
	}
		for(j=0;j<a;j++)
	{
		scanf("%f",&point[j]);
		if(90<=point[j]&&point[j]<=100){
			r=4.00*scores[j];
		}
		if(85<=point[j]&&point[j]<=89){
			r=3.70*scores[j];
		}
		if(82<=point[j]&&point[j]<=84){
			r=3.30*scores[j];
		}
		if(78<=point[j]&&point[j]<=81){
			r=3.00*scores[j];
		}
		if(75<=point[j]&&point[j]<=77){
			r=2.70*scores[j];
		}
		if(72<=point[j]&&point[j]<=74){
			r=2.30*scores[j];
		}
		if(68<=point[j]&&point[j]<=71){
			r=2.00*scores[j];
		}
		if(64<=point[j]&&point[j]<=67){
			r=1.50*scores[j];
		}
		if(60<=point[j]&&point[j]<=63){
			r=1.00*scores[j];
		}
		if(point[j]<60){
			r=0.00*scores[j];
		}
		rt=rt+r;
	}	
		GPA=1.00*rt/bt;
		printf("%.2f",GPA);
		return 0;
}
int main(){
	int n, a[110], b[110];
	scanf("%d", &n);
	int i;
	for(i=0;i<n;i++){
		scanf("%d", &(a[i]));
	}
	for(i=0;i<n;i++){
		scanf("%d", &(b[i]));
	}
	double gpa[110];
	for(i=0;i<n;i++){
		if(b[i]>=90&&b[i]<=100){
			gpa[i]=4.0;
		}else if(b[i]>=85&&b[i]<=89){
			gpa[i]=3.7;
		}else if(b[i]>=82&&b[i]<=84){
			gpa[i]=3.3;
		}else if(b[i]>=78&&b[i]<=81){
			gpa[i]=3.0;
		}else if(b[i]>=75&&b[i]<=77){
			gpa[i]=2.7;
		}else if(b[i]>=72&&b[i]<=74){
			gpa[i]=2.3;
		}else if(b[i]>=68&&b[i]<=71){
			gpa[i]=2.0;
		}else if(b[i]>=64&&b[i]<=67){
			gpa[i]=1.5;
		}else if(b[i]>=60&&b[i]<=63){
			gpa[i]=1.0;
		}else if(b[i]<=59){
			gpa[i]=0;
		}
	}
	int r;
    double xfjd[110];
	for(r=0;r<n;r++){
		xfjd[r]=gpa[r]*(1.0*a[r]);
	}
	int e;
	double x=0.0;
	for(e=0;e<n;e++){
		x=x+xfjd[e];
	}
	int m, xuefen=0;
	for(m=0;m<n;m++){
		xuefen=xuefen+a[m];
	}
	double result;
	result=x/(1.0*xuefen);
	printf("%.2f\n", result);
	return 0;
}
int main(){
    int n,i;
scanf("%d",&n);
	  double fen[10],g[10],sp,sum,gpa;
for(i=1;i<=n;i++){
scanf("%lf",&fen[i]);
}
for(i=1;i<=n;i++){
	scanf("%lf",&g[i]);
}
for(i=1;i<=n;i++){
	if(g[i]>=90){
		g[i]=4.0;
	}else if(g[i]>=85){
		g[i]=3.7;
	}else if(g[i]>=82){
		g[i]=3.3;
	}else if(g[i]>=78){
		g[i]=3.0;
	}else if(g[i]>=75){
		g[i]=2.7;	
	}else if(g[i]>=72){
		g[i]=2.3;
	}else if(g[i]>=68){
		g[i]=2.0;	
    }else if(g[i]>=64){
		g[i]=1.5;
    }else if(g[i]>=60){
		g[i]=1.0;
	}else{
		g[i]=0.0;
	}
}
for(i=1;i<=n;i++){
		sp+=fen[i]*g[i];
		sum+=fen[i];
	}
    gpa=sp/sum;
	printf("%.2lf",gpa);
	return 0;
}
int main(){
int sum=0;
int n,i,j;
scanf("%d\n",&n);
int a[10],b[10];
for(i=0;i<n;i++){
scanf("%d ",&a[i]);
}
for(i=0;i<n;i++){
sum+=a[i];
}
scanf("\n");
for(j=0;j<n;j++){
scanf("%d ",&b[j]);
}
double G,s=0;
for(j=0;j<n;j++){
if(b[j]<60){G=0;}
if(b[j]>=60&&b[j]<=63){G=1.0;}
if(b[j]>=64&&b[j]<=67){G=1.5;}
if(b[j]>=68&&b[j]<=71){G=2.0;}
if(b[j]>=72&&b[j]<=74){G=2.3;}
if(b[j]>=75&&b[j]<=77){G=2.7;}
if(b[j]>=78&&b[j]<=81){G=3.0;}
if(b[j]>=82&&b[j]<=84){G=3.3;}
if(b[j]>=85&&b[j]<=89){G=3.7;}
if(b[j]>=90&&b[j]<=100){G=4.0;}
G=G*a[j];
s+=G;
}
double GPA;
GPA=s/sum;
printf("%.2f",GPA);
return 0;
}
int main(){
	int xf[10]={0};
	float sz[10]={0};
	int i, e, n;
	float c=0;
	float GPA=0;
	e=0;
	
	scanf("%d",&n);
	for(i=0;i<=n-1;i++){
		scanf("%d",&xf[i]);
		e+=xf[i];
	}
	for(i=0;i<=n-1;i++){
		scanf("%f",&sz[i]);
		if(sz[i]>=90){
			sz[i]=4.0;
		}else if(sz[i]>=85){
			sz[i]=3.7;
		}else if(sz[i]>=82){
			sz[i]=3.3;
		}else if(sz[i]>=78){
			sz[i]=3.0;
		}else if(sz[i]>=75){
			sz[i]=2.7;
		}else if(sz[i]>=72){
			sz[i]=2.3;
		}else if(sz[i]>=68){
			sz[i]=2.0;
		}else if(sz[i]>=64){
			sz[i]=1.5;
		}else if(sz[i]>=60){
			sz[i]=1.0;
		}else{
			sz[i]=0;
		}
	}
		for(i=0;i<=n-1;i++){
			c+=sz[i]*xf[i];
		}
		GPA=c*1.0/e;
printf("%.2f",GPA);
return 0;
}
int main(){
    int n;
	double s,c[10],m=0,j=0;
	int a[10],b[10];
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		scanf("%d",&a[i]);
		j=j+a[i];
	}
	for(int t=0;t<n;t++){
		scanf("%d",&b[t]);
		if(b[t]>=90){
			c[t]=4.0*(a[t]);
		}else if(b[t]>=85){
			c[t]=3.7*(a[t]);
		}else if(b[t]>=82){
			c[t]=3.3*(a[t]);
		}else if(b[t]>=78){
			c[t]=3.0*(a[t]);
		}else if(b[t]>=75){
			c[t]=2.7*a[t];
		}else if(b[t]>=72){
			c[t]=2.3*a[t];
		}else if(b[t]>=68){
			c[t]=2.0*a[t];
		}else if(b[t]>=64){
			c[t]=1.5*a[t];
		}else if(b[t]>=60){
			c[t]=1.0*a[t];
		}else{
			c[t]=0;
		}
		m=m+c[t];

      
	}
	s=m/j;
	printf("%.2lf",s);

	return 0;   
}
int main()
{
  int i,n,y=0;
  double z,s,w=0;
  int a[10];
  int b[10];
  double c[10];
  scanf("%d",&n);
  for(i=0;i<n;i++)
  {
     scanf("%d",&a[i]);
   }
  for(i=0;i<n;i++)
  {
    scanf("%d",&b[i]);
  }
   for(i=0;i<n;i++)
  {

	
    if(b[i]>=90)
    {
       z=4.0;
    }
    else if(b[i]>=85)
    {
       z=3.7;
     }
   else if(b[i]>=82)
     {
       z=3.3;
      }
   else if(b[i]>=78)
      {
        z=3.0;
       }
    else if(b[i]>=75)
       {
          z=2.7;
        }
    else if(b[i]>=72)
       {
         z=2.3;
        }
      else if(b[i]>=68)
       {
         z=2.0;
        }
     else if(b[i]>=64)
       {
          z=1.5;
        }
     else if(b[i]>=60)
        {
          z=1.0;
         }
	 else if(b[i]<60)
          {
         z=0.0;
          }
       c[i]=z;
	   
     }
      for(i=0;i<n;i++)
          {
	  y+=a[i];
          }
    for(i=0;i<n;i++)
    {
      w+=a[i]*c[i];
     }
     s=w/y;
    printf("%.2lf",s);
    return 0;
}
int main(){
int n;
double a,b,c,d;
b=0;c=0;
scanf("%d",&n);
int sz[MAX],xf[MAX];
for(int m=0;m<n;m++){
scanf("%d",&xf[m]);
c=c+xf[m];
}
for(int i=0;i<n;i++){
scanf("%d",&sz[i]);
if(sz[i]<60){a=0;}
if(sz[i]>=60&&sz[i]<=63){a=1.0;}
if(sz[i]>=64&&sz[i]<=67){a=1.5;}
if(sz[i]>=68&&sz[i]<=71){a=2.0;}
if(sz[i]>=72&&sz[i]<=74){a=2.3;}
if(sz[i]>=75&&sz[i]<=77){a=2.7;}
if(sz[i]>=78&&sz[i]<=81){a=3.0;}
if(sz[i]>=82&&sz[i]<=84){a=3.3;}
if(sz[i]>=85&&sz[i]<=89){a=3.7;}
if(sz[i]>=90&&sz[i]<=100){a=4.0;}
b=b+a*xf[i];}
d=b/c;
printf("%.2lf",d);
return 0;
}
void main()
{
	int n,a[10],b[10],i,t,s=0;
	float c[10],jx=0.0;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
		scanf("%d",&a[i]);
	for(i=1;i<=n;i++)
		scanf("%d",&b[i]);
	for(i=1;i<=n;i++)
	{
		t=b[i];
		if(t<60)c[i]=0.0;
		else if(t<=63)c[i]=1.0;
		else if(t<=67)c[i]=1.5;
		else if(t<=71)c[i]=2.0;
		else if(t<=74)c[i]=2.3;
		else if(t<=77)c[i]=2.7;
		else if(t<=81)c[i]=3.0;
		else if(t<=84)c[i]=3.3;
		else if(t<=89)c[i]=3.7;
		else if(t<=100)c[i]=4,0;
		jx=jx+a[i]*c[i];
		s=s+a[i];
	}
	printf("%.2f\n",jx/s);
}
int main(){
	int a,i,b=0;
	double c;
	c=0;
	scanf("%d",&a);
	double sa[500];
	int sb[500];
	for(i=0;i<a;i++)
	{
		scanf("%d",&(sb[i]));
        b=b+sb[i];
	}
	for(i=0;i<a;i++)
	{
		scanf("%lf",&(sa[i]));
		if(sa[i]>=90){sa[i]=4.0;}
		else if(sa[i]>=85){sa[i]=3.7;}
		else if(sa[i]>=82){sa[i]=3.3;}
		else if(sa[i]>=78){sa[i]=3.0;}
		else if(sa[i]>=75){sa[i]=2.7;}
		else if(sa[i]>=72){sa[i]=2.3;}
		else if(sa[i]>=68){sa[i]=2.0;}
		else if(sa[i]>=64){sa[i]=1.5;}
		else if(sa[i]>=60){sa[i]=1.0;}
		else{sa[i]=0;}
		sa[i]=sa[i]*sb[i];
	}
	for(i=0;i<a;i++){
		c=c+sa[i];
	}
	c=c/b;
	printf("%.2lf",c);
	return 0;
}
int main(){
	int n,df;
	float jd,sum1=0,sum2=0,gpa;
	int xf[10];

	scanf("%d\n",&n);
	for(int i=0;i<=(n-1);i++){
		scanf("%d",&xf[i]);
	}
	
	for(int i=0;i<=(n-1);i++){
		scanf("%d",&df);
		if(df>=90)
			jd=4.0;
		if(df>=85&&df<=89)
			jd=3.7;
		if(df>=82&&df<=84)
			jd=3.3;
		if(df>=82&&df<=84)
			jd=3.3;
		if(df>=78&&df<=81)
			jd=3.0;
		if(df>=75&&df<=77)
			jd=2.7;
		if(df>=72&&df<=74)
			jd=2.3;
        if(df>=68&&df<=71)
			jd=2.0;
		if(df>=64&&df<=67)
			jd=1.5;
		if(df>=60&&df<=63)
			jd=1.0;
		if(df<60)
			jd=0;
		sum1=sum1+jd*xf[i];
	}
    for(int i=0;i<=(n-1);i++){
		sum2+=xf[i];
	}
	gpa=sum1/sum2;
	printf("%.2f",gpa);

	return 0;
}
int main()
{
    int n;
    double score[20];
    double mark[20];
    double ret=0.0;
    double sum1=0.0,sum2=0.0;
    
    scanf("%d",&n);
    for(int i=0;i<n;i++)
    {
        scanf("%lf",&score[i]);
        sum1+=score[i];
    }
    for(int i=0;i<n;i++)
    {
        scanf("%lf",&mark[i]);
        if(mark[i]>=90) {mark[i]=4.0;continue;}
        if(mark[i]>=85) {mark[i]=3.7;continue;}
        if(mark[i]>=82) {mark[i]=3.3;continue;}
        if(mark[i]>=78) {mark[i]=3.0;continue;}
        if(mark[i]>=75) {mark[i]=2.7;continue;}
        if(mark[i]>=72) {mark[i]=2.3;continue;}
        if(mark[i]>=68) {mark[i]=2.0;continue;}
        if(mark[i]>=64) {mark[i]=1.5;continue;}
        if(mark[i]>=60) {mark[i]=1.0;continue;}
        if(mark[i]<60) {mark[i]=0.0;continue;}
    }
    for(int i=0;i<n;i++)
    {
        sum2+=mark[i]*score[i];
    }
    ret=sum2/sum1;
    printf("%.2lf",ret);
    
    return 0;
}
int main(){
    int n,i;
    scanf("%d",&n);
    int point[n],score[n];
    double grade[n],gpa[n];
    double average,total,sum;
    total=0;
    sum=0;
    for(i=1;i<=n;i++){
        scanf("%d",&point[i]);
    }
    for(i=1;i<=n;i++){
        scanf("%d",&score[i]);
        
    }
    for(i=1;i<=n;i++){
        if(score[i]>=90){
            grade[i]=4.0;
        }else if(score[i]>=85){
            grade[i]=3.7;
        }else if(score[i]>=82){
            grade[i]=3.3;
        }else if(score[i]>=78){
            grade[i]=3.0;
        }else if(score[i]>=75){
            grade[i]=2.7;
        }else if(score[i]>=72){
            grade[i]=2.3;
        }else if(score[i]>=68){
            grade[i]=2.0;
        }else if(score[i]>=64){
            grade[i]=1.5;
        }else if(score[i]>=60){
            grade[i]=1.0;
        }else{
            grade[i]=0;
        }
        gpa[i]=grade[i]*point[i];
    }
    for(i=1;i<=n;i++){
        total+=gpa[i];
        sum+=point[i];
    }
    average=total/sum;
    printf("%.2lf",average);
    return 0;
}
int main(){
	int a[1000],b[1000],i,j,n,s1=0;
	double s=0,c[1000]={0},sum,s2=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
		c[i]=a[i];
		s2+=c[i];
	}for(i=0;i<n;i++){
		scanf("%d",&b[i]);
	}
	for(i=0;i<n;i++){
		if(b[i]>=90&&b[i]<=100){
			s+=4.0*c[i];
		}else if(b[i]>=85&&b[i]<=89){
			s+=3.7*c[i];
		}else if(b[i]>=82&&b[i]<=84){
			s+=3.3*c[i];
		}else if(b[i]>=78&&b[i]<=81){
			s+=3.0*c[i];
		}else if(b[i]>=75&&b[i]<=77){
			s+=2.7*c[i];
		}else if(b[i]>=72&&b[i]<=74){
			s+=2.3*c[i];
		}else if(b[i]>=68&&b[i]<=71){
			s+=2.0*c[i];
		}else if(b[i]>=64&&b[i]<=67){
			s+=1.5*c[i];
		}else if(b[i]>=60&&b[i]<=63){
			s+=1.0*c[i];
		}else if(b[i]<60){
			s+=0;
		}
	}
	sum=s/s2*1.00;
	printf("%.2lf",sum);
	return 0;
}
double b[10];
double Input(double a[],double n)
{
    int i=0;
	for(i=0;i<n;i++)
		scanf("%lf",&a[i]);
	return a[10];
}
double Sum(double a[],double n,double sum)
{
	int i=0;
	for(i=0;i<n;i++)
		sum=sum+a[i];
	//printf("%lf",sum);
	return sum;
}
double GPAI(double a[],double n)
{
	int i=0;
	for(i=0;i<n;i++)
	{
		if(a[i]>=90&&a[i]<=100)
			a[i]=4;
		else if(a[i]>=85&&a[i]<=89)
			a[i]=3.7;
		else if(a[i]>=82&&a[i]<=84)
			a[i]=3.3;
		else if(a[i]>=78&&a[i]<=81)
			a[i]=3.0;
		else if(a[i]>=75&&a[i]<=77)
			a[i]=2.7;
		else if(a[i]>=72&&a[i]<=74)
			a[i]=2.3;
		else if(a[i]>=68&&a[i]<=71)
			a[i]=2.0;
		else if(a[i]>=64&&a[i]<=67)
			a[i]=1.5;
		else if(a[i]>=60&&a[i]<=63)
			a[i]=1.0;
		else
			a[i]=0;
	}
	return a[10];
}
double GPAII(double a[],double b[],double n)
{
	int i=0;
	for(i=0;i<n;i++)
	{
		a[i]=a[i]*b[i];
	}
	return a[10];
}
void check(double a[10],double n)
{
	int i=0;
	for(i=0;i<n;i++)
		printf("%lf  ",a[i]);
}
int main()
{
	double n;
	scanf("%lf",&n);
	double x[10];
	double y[10];
	Input(x,n);
	Input(y,n);
	GPAI(y,n);
	GPAII(y,x,n);
	double p,q;
	double gpa;
	p=0;
	q=0;
	gpa=0;
	p=Sum(x,n,p);
	q=Sum(y,n,q);
	gpa=1.0*q/p;
	printf("%.2lf",gpa);
	return 0;
}
int main(int argc,char *argv[])
{
    int n,sum=0,i,a[10];
    float b[10],gpa=0;
    scanf("%d",&n);
    for(i=0;i<=n-1;i++)scanf("%d",&a[i]);
    for(i=0;i<=n-1;i++)scanf("%f",&b[i]);
    for(i=0;i<=n-1;i++)
    {
       if(b[i]>=90)b[i]=4.0;
          else if(b[i]>=85)b[i]=3.7;
               else if(b[i]>=82)b[i]=3.3;
                    else if(b[i]>=78)b[i]=3.0;
                         else if(b[i]>=75)b[i]=2.7;
                              else if(b[i]>=72)b[i]=2.3;
                                   else if(b[i]>=68)b[i]=2.0;
                                        else if(b[i]>=64)b[i]=1.5;
                                             else if(b[i]>=60)b[i]=1.0;
                                                  else b[i]=0.0;
                                                  }
    for(i=0;i<=n-1;i++)
    {
       sum+=a[i];
       b[i]*=a[i];
       gpa+=b[i];
       }
    gpa/=sum;
    printf("%.2f\n",gpa);
    return 0;
}
int  main( )
{
   int a[1000];
   int b[1000];
   double c[1000];
   double d[1000];
   int n,i,x=0;
   double y=0.00,z;
	   scanf ("%d",&n);
	   for(i=0;i<n;i=i+1){
		   scanf("%d",&a[i]);
       }
	   for(i=0;i<n;i=i+1){
		   scanf("%d",&b[i]);
	   }
	   for(i=0;i<n;i=i+1){
          if(b[i]>=90&&b[i]<=100)
			  c[i]=4.0;
          else if(b[i]>=85&&b[i]<=89)
			  c[i]=3.7;
          else if(b[i]>=82&&b[i]<=84)
			  c[i]=3.3;
		  else if(b[i]>=78&&b[i]<=81)
			  c[i]=3.0;
		  else if(b[i]>=75&&b[i]<=77)
			  c[i]=2.7;
		  else if(b[i]>=72&&b[i]<=74)
			  c[i]=2.3;
		  else if(b[i]>=68&&b[i]<=71)
			  c[i]=2.0;
          else if(b[i]>=64&&b[i]<=67)
			  c[i]=1.5;
		  else if(b[i]>=60&&b[i]<=63)
			  c[i]=1.0;
		  else if(b[i]<60)
			  c[i]=0.0;
	   }
	   for(i=0;i<n;i=i+1){
           d[i]=a[i]*c[i];
	   }
	   for(i=0;i<n;i=i+1){
           x=x+a[i];
		   y=y+d[i];
	   }
	   z=(y*1.00)/(x*1.00);
       printf("%.2lf",z);
return 0;
}
int main(){
 int n;
 scanf("%d",&n);
 int xf[10];
 int i; 
 for(i=0;i<n;i++){
  scanf("%d",&(xf[i]));
 }
 int sjdf[10];
 for(i=0;i<n;i++){
  scanf("%d",&(sjdf[i]));
 }
 float gpa;
 float g[10];
 float s=0;
 for(i=0;i<n;i++){
  if(sjdf[i]<=100&&sjdf[i]>=90){
   gpa=4.0;
  }
  else if(sjdf[i]<=89&&sjdf[i]>=85){
   gpa=3.7;
  }
  else if(sjdf[i]<=84&&sjdf[i]>=82){
   gpa=3.3;
  }
  else if(sjdf[i]<=81&&sjdf[i]>=78){
   gpa=3.0;
  }
  else if(sjdf[i]<=77&&sjdf[i]>=75){
   gpa=2.7;
  }
  else if(sjdf[i]<=74&&sjdf[i]>=72){
   gpa=2.3;
  }
  else if(sjdf[i]<=71&&sjdf[i]>=68){
   gpa=2.0;
  }
  else if(sjdf[i]<=67&&sjdf[i]>=64){
   gpa=1.5;
  }
  else if(sjdf[i]<=63&&sjdf[i]>=60){
   gpa=1.0;
  }
  else if(sjdf[i]<60){
   gpa=0.0;
  }
  g[i]=gpa*(xf[i]);
  s+=g[i];
 }
 int h=0;
 for(i=0;i<n;i++){
  h+=xf[i];
 }
 float GPA;
 GPA=s/h;
 printf("%.2f",GPA);
 return 0;
}
int main()
{
    int n;
    scanf("%d\n",&n);
    int i,a[n],c[n];
    double b[n],d[n],m,f,s;
    m=f=0;
    for(i=0;i<n;i++) scanf("%d",&c[i]);
    for(i=0;i<n;i++) scanf("%d",&a[i]);
    for(i=0;i<n;i++)
    {
        if(a[i]<=100&&a[i]>=90) b[i]=4.0;
        if(a[i]<=89&&a[i]>=85)  b[i]=3.7;
        if(a[i]<=84&&a[i]>=82)  b[i]=3.3;
        if(a[i]<=81&&a[i]>=78)  b[i]=3.0;
        if(a[i]<=77&&a[i]>=75)  b[i]=2.7;
        if(a[i]<=74&&a[i]>=72)  b[i]=2.3;
        if(a[i]<=71&&a[i]>=68)  b[i]=2.0;
        if(a[i]<=67&&a[i]>=64)  b[i]=1.5;
        if(a[i]<=63&&a[i]>=60)  b[i]=1;
        if(a[i]<=59)   b[i]=0;
    }
    for(i=0;i<n;i++) d[i]=b[i]*c[i];
    for(i=0;i<n;i++) {m=m+d[i]; f=f+c[i];}
    s=m/f;
    printf("%.2lf",s);
    return 0;
}
//
//  main.c
//  Track 43, ????
//
//  Created by Charles.thRay.Lee on 9/11/12.
//  Copyright (c) 2012 Peking University. All rights reserved.
/*??
 ?????????????????????GPA?????????????????????????????????
 ??????????
 ???? ??
 90-100 4.0
 85-89  3.7
 82-84  3.3
 78-81  3.0
 75-77  2.7
 72-74  2.3
 68-71  2.0
 64-67  1.5
 60-63  1.0
 60?? 0
 1??????????=????*????
 2?????=????????/????????
 ????????????A??????GPA??
 ????
 ??? ?????n?n<10??
 ??? ????????????????????
 ??? ??????????
 ??????????????
*/


int main()
{
    int n,n1;
    scanf("%d",&n);
    
    double a[2][11];
    double gpa=0,gpa1=0;
    
    
    for (n1=1; n1<=n; n1++) {
        scanf("%lf",&a[0][n1-1]);
    }
    
    for (n1=1; n1<=n; n1++) {
        scanf("%lf",&a[1][n1-1]);
        if (a[1][n1-1]>=90&&a[1][n1-1]<=100) {
            a[1][n1-1]=4.0*a[0][n1-1];
        }
        else
            if (a[1][n1-1]>=85) {
                a[1][n1-1]=3.7*a[0][n1-1];
            }
            else
                if (a[1][n1-1]>=82) {
                    a[1][n1-1]=3.3*a[0][n1-1];
                }
                else
                    if (a[1][n1-1]>=78) {
                        a[1][n1-1]=3.0*a[0][n1-1];
                    }
                    else
                        if (a[1][n1-1]>=75) {
                            a[1][n1-1]=2.7*a[0][n1-1];
                        }
                        else
                            if (a[1][n1-1]>=72) {
                                a[1][n1-1]=2.3*a[0][n1-1];
                            }
                            else
                                if (a[1][n1-1]>=68) {
                                    a[1][n1-1]=2.0*a[0][n1-1];
                                }
                                else
                                    if (a[1][n1-1]>=64) {
                                        a[1][n1-1]=1.5*a[0][n1-1];
                                    }
                                    else
                                        if (a[1][n1-1]>=60) {
                                            a[1][n1-1]=1.0*a[0][n1-1];
                                        }
                                        else
                                            a[1][n1-1]=0*a[0][n1-1];
        gpa=gpa+a[1][n1-1];
        gpa1=gpa1+a[0][n1-1];
    }
    gpa=gpa/gpa1;
    printf("%.2lf",gpa);
    return 0;
}