semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
double judge(int a)
{
	if(a<=100&&a>=90)
		return 4.0;
	else if(a<=89&&a>=85)
		return 3.7;
	else if(a<=84&&a>=82)
		return 3.3;
	else if(a<=81&&a>=78)
		return 3.0;
	else if(a<=77&&a>=75)
		return 2.7;
	else if(a<=74&&a>=72)
		return 2.3;
	else if(a<=71&&a>=68)
		return 2.0;
	else if(a<=67&&a>=64)
		return 1.5;
	else if(a<=63&&a>=60)
		return 1.0;
	else
		return 0.0;
}
int main()
{
	int n,i,*pp[2],sumPOINT=0;
	double sumGPA=0.0;
	scanf("%d",&n);
	pp[0]=(int*)malloc(sizeof(int)*n);
	pp[1]=(int*)malloc(sizeof(int)*n);
	for(i=0;i<n;i++)
	{
		scanf("%d",pp[0]+i);
		sumPOINT+=*(pp[0]+i);
	}
	for(i=0;i<n;i++)
	{
		scanf("%d",pp[1]+i);
		sumGPA+=judge(*(pp[1]+i))**(pp[0]+i);
	}
	free(pp[0]);
	free(pp[1]);
	printf("%.2f\n",sumGPA/sumPOINT);
	return 0;
}
int main(){
	int n,i,y,a[10],b[10];
	double t,s,x,c[10];
	s=0.00;
	y=0;
	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&&b[i]<=100){
			t=4.0;
		}else if(b[i]>=85){
			t=3.7;
		}else if(b[i]>=82){
			t=3.3;
		}else if(b[i]>=78){
			t=3.0;
		}else if(b[i]>=75){
			t=2.7;
		}else if(b[i]>=72){
			t=2.3;
		}else if(b[i]>=68){
			t=2.0;
		}else if(b[i]>=64){
			t=1.5;
		}else if(b[i]>=60){
			t=1.0;
		}else{
			t=0.0;
		}
		c[i]=t*a[i];
		s+=c[i];
		y+=a[i];
	}
	x=s/y;
	printf("%.2lf",x);
	return 0;
}
int main(int argc, char* argv[])
{   int n,i;
double c[10],sum1=0,sum2=0,b[10],a[10],GPA;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{scanf("%lf",&a[i]);
	sum2+=a[i];}
    for(i=0;i<n;i++)
	{scanf("%lf",&b[i]);
	if(b[i]>=90&&b[i]<=100)
		c[i]=4.0*a[i];
	else if(b[i]>=85&&b[i]<=89)
		c[i]=3.7*a[i];
	else if(b[i]>=82&&b[i]<=84)
		c[i]=3.3*a[i];
	else if(b[i]>=78&&b[i]<=81)
		c[i]=3.0*a[i];
	else if(b[i]>=75&&b[i]<=77)
		c[i]=2.7*a[i];
	else if(b[i]>=72&&b[i]<=74)
		c[i]=2.3*a[i];
	else if(b[i]>=68&&b[i]<=71)
		c[i]=2.0*a[i];
	else if(b[i]>=64&&b[i]<=67)
		c[i]=1.5*a[i];
	else if(b[i]>=60&&b[i]<=63)
		c[i]=1.0*a[i];
	else if(b[i]<60)
		c[i]=0;
	sum1+=c[i];}
	GPA=sum1/sum2;
	printf("%.2lf",GPA);
	return 0;
}
int N,course[15][2],credit;
float GPA;
int main(){
    int i;
    scanf("%d",&N);
    credit = 0;
    for (i = 0; i < N; i++){
        scanf("%d",&course[i][0]);
        credit += course[i][0];
    }
    for (i = 0; i < N; i++) scanf("%d",&course[i][1]);
    
    for (i = 0; i < N; i++){
        float point;
        if (course[i][1] >= 90) point = 4;
        else if (course[i][1] >= 85) point = 3.7;
        else if (course[i][1] >= 82) point = 3.3;
        else if (course[i][1] >= 78) point = 3.0;
        else if (course[i][1] >= 75) point = 2.7;
        else if (course[i][1] >= 72) point = 2.3;
        else if (course[i][1] >= 68) point = 2.0;
        else if (course[i][1] >= 64) point = 1.5;
        else if (course[i][1] >= 60) point = 1.0;
        else point = 0;
        GPA += course[i][0]*point;
    }
    GPA /= credit;
    printf("%.2f\n",GPA);

    return 0;
}
int main(){
	int n,i,sum1=0;
	float sum=0;
	scanf("%d",&n);
	int a[n],b[n];
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
		sum1+=a[i];
	}
	for(i=0;i<n;i++){
		scanf("%d",&b[i]);
		if(b[i]<60)
			sum+=0;
		if(b[i]>=60&&b[i]<=63)
			sum+=a[i]*1.0;
		if(b[i]>=64&&b[i]<=67)
			sum+=a[i]*1.5;
		if(b[i]>=68&&b[i]<=71)
			sum+=a[i]*2.0;
		if(b[i]>=72&&b[i]<=74)
			sum+=a[i]*2.3;
		if(b[i]>=75&&b[i]<=77)
			sum+=a[i]*2.7;
		if(b[i]>=78&&b[i]<=81)
			sum+=a[i]*3.0;
		if(b[i]>=82&&b[i]<=84)
			sum+=a[i]*3.3;
		if(b[i]>=85&&b[i]<=89)
			sum+=a[i]*3.7;
		if(b[i]>=90&&b[i]<=100)
			sum+=a[i]*4.0;
	}
	printf("%.2f",sum/sum1);
	return 0;
}
float mgpa(int y)
{
	int gpa;
	if(y>=90 && y<=100) return 4.0;
	else if(y>=85 && y<=89) return 3.7;
	else if(y>=82 && y<=84) return 3.3;
	else if(y>=78 && y<=81) return 3.0;
	else if(y>=75 && y<=77) return 2.7;
	else if(y>=72 && y<=74) return 2.3;
	else if(y>=68 && y<=71) return 2.0;
	else if(y>=64 && y<=67) return 1.5;
	else if(y>=60 && y<=63) return 1.0;
	else return 0.0;
}
int main()
{
	int n, i, score[50], weight[50];
	float g[50], a=0.0, b=0.0;
	scanf("%d", &n);
	for(i=1; i<=n; i++)
	{
		scanf("%d", &weight[i]);
		b += weight[i];
	}
	for(i=1; i<=n; i++)
	{
		scanf("%d", &score[i]);
		g[i] = mgpa(score[i]) * weight[i];
		a += g[i];
	}
	printf("%.2f", a/b);
	return 0;
}
int main(){
	int n,i;
	double a,b;
	int df[100];
	double GPA;
	int xf[100];
	double jd[100];
	scanf("%d\n",&n);
	for(i=0;i<=n-2;i++){
		scanf("%d",&xf[i]);
	}
	scanf("%d\n",&xf[n-1]);
	for(i=0;i<=n-1;i++){
		scanf("%d",&df[i]);
	}
    for(i=0;i<=n-1;i++){
		if(df[i]<60){
			jd[i]=0*xf[i];
		}else if(df[i]>=60&&df[i]<=63){
				jd[i]=1.0*xf[i];
			}else if(df[i]>=64&&df[i]<=67){
				jd[i]=1.5*xf[i];
				}else if(df[i]>=68&&df[i]<=71){
					jd[i]=2.0*xf[i];
				}else if(df[i]>=72&&df[i]<=74){
					jd[i]=2.3*xf[i];
				}else if(df[i]>=75&&df[i]<=77){
					jd[i]=2.7*xf[i];
				}else if(df[i]>=78&&df[i]<=81){
					jd[i]=3.0*xf[i];
				}else if(df[i]>=82&&df[i]<=84){
					jd[i]=3.3*xf[i];
				}else if(df[i]>=85&&df[i]<=89){
					jd[i]=3.7*xf[i];
				}else if(df[i]>=90&&df[i]<=100){
					jd[i]=4.0*xf[i];
				}
				}
	for(i=0,a=0,b=0;i<=n-1;i++){
        a+=xf[i];
		b+=jd[i];
	}
	GPA=b/a;
	printf("%.2lf",GPA);
	return 0;
}
void main()
{
	float a[2][10],sum,d;sum=0;d=0;
	int i,k,n;
	scanf("%d",&n);
	printf("\n");
	for(i=0;i<n;i++)
	{
		scanf("%f",&a[0][i]);
	}printf("\n");
	for(i=0;i<n;i++)
	{
		scanf("%f",&a[1][i]);
	}printf("\n");
	for(i=0;i<n;i++)
	{
		if(a[1][i]>=90)
			a[1][i]=4.0;
		else if(a[1][i]>=85)
			a[1][i]=3.7;
		else if(a[1][i]>=82)
			a[1][i]=3.3;
		else if(a[1][i]>=78)
			a[1][i]=3.0;
		else if(a[1][i]>=75)
			a[1][i]=2.7;
		else if(a[1][i]>=72)
			a[1][i]=2.3;
		else if(a[1][i]>=68)
		    a[1][i]=2.0;
		else if(a[1][i]>=64)
		    a[1][i]=1.5;
		else if(a[1][i]>=60)
			a[1][i]=1.0;
		else a[1][i]=0;
	}
	for(i=0;i<n;i++)
	{
		sum=sum+a[0][i]*a[1][i];
		d=d+a[0][i];
	}
	printf("%.2f",sum/d);
}
void main()
{
	int i,j,n;
	double s[11],t[11],q[11],r[11],k=0,m=0;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%lf''",&s[i]);
		k+=s[i];
	}
	printf("\n");
	for(i=1;i<=n;i++)
	{
		scanf("%lf",&t[i]);
			if('d'>=t[i]&&t[i]>='Z')
				q[i]=4;
			else if('Y'>=t[i]&&t[i]>='U')
				q[i]=3.7;
			else if('T'>=t[i]&&t[i]>='R')
				q[i]=3.3;
			else if('Q'>=t[i]&&t[i]>='N')
				q[i]=3.0;
			else if('M'>=t[i]&&t[i]>='K')
				q[i]=2.7;
			else if('J'>=t[i]&&t[i]>='H')
				q[i]=2.3;
			else if('G'>=t[i]&&t[i]>='D')
				q[i]=2.0;
			else if('C'>=t[i]&&t[i]>='@')
				q[i]=1.5;
			else if('?'>=t[i]&&t[i]>='<')
				q[i]=1.0;
			else if(t[i]<'<')
				q[i]=0;
			
	}
       printf("\n");
for(i=1;i<=n;i++)
{
	r[i]=s[i]*q[i];
    m+=r[i];
}
printf("%.2lf",m/k);
}
int main(){
	int n,i;
	scanf("%d",&n);
	double a[MAX],b[MAX],sum=0,num=0;
	double c[MAX],GPA;
	for(i=0;i<n;i++){
    scanf("%lf",&a[i]);
	}
    for(i=0;i<n;i++){
     scanf("%lf",&b[i]);
	}
	for(i=0;i<n;i++){
       if(b[i]<60){
		   c[i]=0;}
	   else if(b[i]<=63){
		   c[i]=1.0;}
	   else if(b[i]<=67){
		   c[i]=1.5;}
	   else if(b[i]<=71){
		   c[i]=2.0;}
	   else if(b[i]<=74){
		   c[i]=2.3f;}
	   else if(b[i]<=77){
		   c[i]=2.7f;}
       else if(b[i]<=81){
		   c[i]=3.0;}
       else if(b[i]<=84){
		   c[i]=3.3f;}
       else if(b[i]<=89){
		   c[i]=3.7f;}
       else if(b[i]<=100){
		   c[i]=4.0;}
	   }
	for(i=0;i<n;i++){
		   sum+=a[i]*c[i];
		   num+=a[i];
	}
	GPA=sum/num;
	printf("%.2f",GPA);
    return 0;
}
float GPAlize(int n)
{
	if (n >= 90)return 4.0;
	else if (n >= 85&&n<=89)return 3.7;
	else if (n >= 82 && n <= 84)return 3.3;
	else if (n >= 78 && n <= 81)return 3.0;
	else if (n >= 75 && n <= 77)return 2.7;
	else if (n >= 72 && n <= 74)return 2.3;
	else if (n >= 68 && n <= 71)return 2.0;
	else if (n >= 64 && n <= 67)return 1.5;
	else if (n >= 60 && n <= 63)return 1.0;
	else return 0;
}
int main()
{
	int n,m[10],g[10],i;
	float sum2 = 0;
	scanf("%d", &n);
	for (i = 0; i < n; i++)
	{
		scanf("%d", &m[i]);
		sum2 += m[i];
	}
	for (i = 0; i < n; i++)
	{
		scanf("%d", &g[i]);
	}
	float c[10],sum1=0;
	for (i = 0; i < n; i++)
	{
		c[i] = GPAlize(g[i])*m[i];
		sum1 += c[i];
	}
	printf("%.2f\n", sum1 / sum2);
}
int main(){
	int n,i,defen[10],xuefen[10],xuefenhe;
	double jidian[10],GPA,jidianhe;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&xuefen[i]);
	}
	for(i=0;i<n;i++){
		scanf("%d",&defen[i]);
	}
	for(i=0;i<n;i++){
		if(defen[i]<60){
			jidian[i]=0;
		}else if(defen[i]<=63){
			jidian[i]=1.0;
		}else if(defen[i]<=67){
			jidian[i]=1.5;
		}else if(defen[i]<=71){
			jidian[i]=2.0;
		}else if(defen[i]<=74){
			jidian[i]=2.3;
		}else if(defen[i]<=77){
			jidian[i]=2.7;
		}else if(defen[i]<=81){
			jidian[i]=3.0;
		}else if(defen[i]<=84){
			jidian[i]=3.3;
		}else if(defen[i]<=89){
			jidian[i]=3.7;
		}else{jidian[i]=4.0;}
	}
	jidianhe=0;
	xuefenhe=0;
	for(i=0;i<n;i++){
		jidianhe=jidianhe+jidian[i]*xuefen[i];
		xuefenhe=xuefenhe+xuefen[i];
	}
	GPA=jidianhe/xuefenhe;
	printf("%.2lf",GPA);
	return 0;
}
void main()
{
	float xuefen(int);
	int n;
	float GPA=0;
	int total_grade=0;
	int mark[10]={0},grade[10]={0};
	float mark_gra[10]={0};
	int i;

	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&grade[i]);
		total_grade=total_grade+grade[i];
	}
	for(i=0;i<n;i++)
	{
		scanf("%d",&mark[i]);
		mark_gra[i]=xuefen(mark[i]);
	}


	for(i=0;i<n;i++)
		GPA=GPA+mark_gra[i]*grade[i];

	GPA=GPA/total_grade;
	printf("%.2f\n",GPA);
}


float xuefen(int x)
{
	float f_x=0;
	if(x>=90)
		f_x=4.0;
	if(x>=85&&x<=89)
		f_x=3.7;
	if(x>=82&&x<=84)
		f_x=3.3;
	if(x>=78&&x<=81)
		f_x=3.0;
	if(x>=75&&x<=77)
		f_x=2.7;
	if(x>=72&&x<=74)
		f_x=2.3;
	if(x>=68&&x<=71)
		f_x=2.0;
	if(x>=64&&x<=67)
		f_x=1.5;
	if(x>=60&&x<=63)
		f_x=1.0;
	if(x<60)
		f_x=0;
	return f_x;
}
int main()
{
	int n,a[10],b[10],i,k;
	float c,gpa;
	gpa=0;k=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++)
	{
		if(b[i]>=90)
		{c=4.0;}
		else if(b[i]>=85)
		{c=3.7;}
		else if(b[i]>=82)
		{c=3.3;}
		else if(b[i]>=78)
		{c=3.0;}
		else if(b[i]>=75)
		{c=2.7;}
		else if(b[i]>=72)
		{c=2.3;}
		else if(b[i]>=68)
		{c=2.0;}
		else if(b[i]>=64)
		{c=1.5;}
		else if(b[i]>=60)
		{c=1.0;}
		else
		{c=0;}
		gpa=gpa+c*a[i];
	}
	for(i=1;i<=n;i++)
	{k=k+a[i];}
	gpa=gpa/k;
	printf("%.2f",gpa);
	return 0;
}
int main(){
	int n,i,a[10],b[10];
	float c[10],d[10];
	int p=0;
	float gpa,q=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
		p+=a[i];
	}
	for(i=0;i<n;i++){
		scanf("%d",&b[i]);
		if(b[i]>=90){
			c[i]=4.0;
		}else if(b[i]>=85){
			c[i]=3.7;
		}else if(b[i]>=82){
			c[i]=3.3;
		}else if(b[i]>=78){
			c[i]=3.0;
		}else if(b[i]>=75){
			c[i]=2.7;
		}else if(b[i]>=72){
			c[i]=2.3;
		}else if(b[i]>=68){
			c[i]=2.0;
		}else if(b[i]>=64){
			c[i]=1.5;
		}else if(b[i]>=60){
			c[i]=1.0;
		}else{
			c[i]=0;
		}
	}
	for(i=0;i<n;i++){
		d[i]=a[i]*c[i];
		q+=d[i];
	}
	gpa=q/p;
	printf("%.2f",gpa);
	return 0;
}
int main()
{ 
		int course,i;
		cin>>course;
		double sum2=0;
		double sum1=0;
		int pa[100000],g[100000];//??
		for(i=0;i<course;i++)
		{
			cin>>pa[i];
			sum2=sum2+pa[i];
		}
	    for(i=0;i<course;i++)
		{
			cin>>g[i];
			double m;								
			 if(g[i]>=90&&g[i]<=100)
				m=4.0;
			else if( g[i]>=85&&g[i]<=89)//??fenshu
				m=3.7;
			else if( g[i]>=82&&g[i]<=84)
				m=3.3;
			else if (g[i]>=78&&g[i]<=81)
				m=3.0;
			else if( g[i]>=75&&g[i]<=77)
				m=2.7;
			else if( g[i]>=72&&g[i]<=74)
				m=2.3;
			else if( g[i]>=68&&g[i]<=71)
				m=2.0;
			else if( g[i]>=64&&g[i]<=67)
				m=1.5;		
			else if(g[i]>=60&&g[i]<=63)
				m=1.0;
			else if(g[i]<60)
				m=0;
			sum1=sum1+m*pa[i];
		}	

	 double gpa;
	gpa=sum1/sum2;
	printf("%.2lf",gpa);
	return 0;
}
int main()
{
	int n;
	scanf("%d", &n);
	int numble[10];
	int i,a;
    int s=0;
    double b;
    double sum=0;
    float GPA;
	for(i=0; i < n; i++){
		scanf("%d", &numble[i]);
        s = s + numble[i];
	}
		for(i=0; i < n; i++){
			scanf("%d", &a);
			if(a <= 100 && a >= 90){
               b = 4.0;
			}
			   else if(a <= 89 && a >=85){
				   b = 3.7;
			   }
				   else if(a <= 84 && a >= 82){
					   b = 3.3;
				   }
					   else if(a <= 81 && a >=78){
						   b = 3.0;
					   }
						   else if(a <= 77 && a >=75){
							   b = 2.7;
						   }
							   else if(a <= 74 && a >= 72){
								   b = 2.3;
							   }
								   else if(a <= 71 && a >= 68){
									   b = 2.0;
								   }
									   else if(a <= 67 && a >= 64){
									       b = 1.5;
									   }
									      else if(a <= 63 && a >= 60){
										   b = 1.0;
										  }
										     else if(a < 60){
											   b = 0;
											 }
										  
			sum = sum + numble[i] * b;
		}
	GPA =(float)( sum / s);
	printf("%.2f",GPA);
	return 0;
}
void main()
{
	int n,xuefen[10],score[10],i;
	double gpa[10],sum=0,sumxf=0;
	scanf("%d",&n);
	for (i=0;i<n;i++)
		scanf("%d",&xuefen[i]);
	for (i=0;i<n;i++)
    	scanf("%d",&score[i]);
	for (i=0;i<n;i++)
	{
		if (score[i]>=90) gpa[i]=4.0;
		else if (score[i]<=89&&score[i]>=85) gpa[i]=3.7;
		else if (score[i]<=84&&score[i]>=82) gpa[i]=3.3;
		else if (score[i]<=81&&score[i]>=78) gpa[i]=3.0;
		else if (score[i]<=77&&score[i]>=75) gpa[i]=2.7;
		else if (score[i]<=74&&score[i]>=72) gpa[i]=2.3;
		else if (score[i]<=71&&score[i]>=68) gpa[i]=2.0;
		else if (score[i]<=67&&score[i]>=64) gpa[i]=1.5;
		else if (score[i]<=63&&score[i]>=60) gpa[i]=1.0;
		else if (score[i]<60) gpa[i]=0;
		sum+=gpa[i]*xuefen[i];
		sumxf+=xuefen[i];
	}
	printf("%.2lf\n",sum/sumxf);
}
float GPA(int a)
{
	if(a>=90) return 4;
		else if (a>=85) return 3.7;
		else if (a>=82) return 3.3;
		else if (a>=78) return 3;
		else if (a>=75) return 2.7;
		else if (a>=72) return 2.3;
		else if (a>=68) return 2;
		else if (a>=64) return 1.5;
		else if (a>=60) return 1;
		else return 0;
}
void main()
{
	int n,i,s,a[100]={0};
	float SumGPA=0,Points=0,AveGPA=0;
	scanf("%d",&n);
	SumGPA=0;
	for(i=1;i<=n;i++)
	{
		scanf("%d",&s);
		Points+=s;
        a[i]=s;	
	}
	for(i=1;i<=n;i++) 
	{
		scanf("%d",&s);
		SumGPA+=GPA(s)*a[i];
	}
	AveGPA=SumGPA/Points;
	printf("%.2f\n",AveGPA);
}
int main()
{
    float j(int y);
	float gpa=0,xf=0,g[10],x[10],jd[10];
	int n,i;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%f",&x[i]);
	}
	for(i=0;i<n;i++)
	{
		scanf("%f",&g[i]);
		jd[i]=j(g[i]);
	}
	for(i=0;i<n;i++)
	{
		gpa=gpa+jd[i]*x[i];
		xf=xf+x[i];
	}
	gpa=gpa/xf;
	printf("%.2f\n",gpa);
	return 0;
}

float j(int y)
{
	float z;
	if(y>89) z=4.0;
	else if(y>84) z=3.7;
	else if(y>81) z=3.3;
	else if(y>77) z=3.0;
	else if(y>74) z=2.7;
	else if(y>71) z=2.3;
	else if(y>67) z=2.0;
	else if(y>63) z=1.5;
	else if(y>59) z=1.0;
	else z=0;
	return(z);
}
main()
{
    int n,i,sum2=0;
    float sum1=0,gpa;
    struct {int xf,fs;
    	float jd;
    }a[100];
    scanf("%d",&n);
    for(i=0;i<n;i++)
    scanf("%d",&a[i].xf);
    for(i=0;i<n;i++)
    scanf("%d",&a[i].fs);
     for(i=0;i<n;i++)
     {
     	
     	if(a[i].fs>=90&&a[i].fs<=100)
     	a[i].jd=4.0;
     	if(a[i].fs>=85&&a[i].fs<=89)
     	a[i].jd=3.7;
     	if(a[i].fs>=82&&a[i].fs<=84)
     	a[i].jd=3.3;
     	if(a[i].fs>=78&&a[i].fs<=81)
     	a[i].jd=3.0;
     	if(a[i].fs>=75&&a[i].fs<=77)
     	a[i].jd=2.7;
     	if(a[i].fs>=72&&a[i].fs<=74)
     	a[i].jd=2.3;
     	if(a[i].fs>=68&&a[i].fs<=71)
     	a[i].jd=2.0;
     	if(a[i].fs>=64&&a[i].fs<=67)
     	a[i].jd=1.5;
     	if(a[i].fs>=60&&a[i].fs<=63)
     	a[i].jd=1.0;
     	if(a[i].fs>=0&&a[i].fs<=59)
     	a[i].jd=0.0;
     }
      for(i=0;i<n;i++)
      {
      	sum1+=a[i].jd*a[i].xf;
      	sum2+=a[i].xf;
      }
      gpa=sum1/sum2;
      printf("%.2f",gpa);
      return 0;
    
}
int main(){
double g;
int i,h,p;
p=0;
int a[10];
int b[10];
double c[10];
scanf ("%d",&h);
for (i=0;i<h;i++){
scanf ("%d",&(a[i]));}
for (i=0;i<h;i++){
scanf ("%d",&(b[i]));}
for (i=0;i<h;i++){
if (b[i]>=90) c[i]=4.0;
if ((b[i]>=85)&&(b[i]<90)) c[i]=3.7;
if ((b[i]>=82)&&(b[i]<85)) c[i]=3.3;
if ((b[i]>=78)&&(b[i]<82)) c[i]=3.0;
if ((b[i]>=75)&&(b[i]<78)) c[i]=2.7;
if ((b[i]>=72)&&(b[i]<75)) c[i]=2.3;
if ((b[i]>=68)&&(b[i]<72)) c[i]=2.0;
if ((b[i]>=64)&&(b[i]<68)) c[i]=1.5;
if ((b[i]>=60)&&(b[i]<64)) c[i]=1.0;
if (b[i]<60) c[i]=0;



}

for (i=0;i<h;i++){
	g=g+a[i]*c[i];
}
for (i=0;i<h;i++){
	p+=a[i];
}
g=g/p;
printf ("%.2lf",g);
return 0;
}
float fGPA(int x){
	if (x>=90&&x<=100) return (4.0);
	else if (x>=85&&x<=89) return (3.7);
    else if (x>=82&&x<=84) return (3.3);
	else if (x>=78&&x<=81) return (3.0);
	else if (x>=75&&x<=77) return (2.7);
	else if (x>=72&&x<=74) return (2.3);
	else if (x>=68&&x<=71) return (2.0);
	else if (x>=64&&x<=67) return (1.5);
	else if (x>=60&&x<=63) return (1,0);
	else return (0);
}

void main()
{
	int n;
	scanf("%d",&n);
     
	int a[10];
	int i,sum=0;
	for (i=0;i<n;i++){
		scanf("%d",&a[i]);
		sum=sum+a[i];
	}

	int b[10];
	int j;
	for (j=0;j<n;j++){
		scanf("%d",&b[j]);
	}

	float GPA,g=0;
	int k;
	for (k=0;k<n;k++){
		g=g+a[k]*(fGPA(b[k]));
		}
	GPA=g/sum;
	printf("%.2f",GPA);
	
}
int main()
{
int n,a[10],b[10],i;
float GPA,c[10],g[10],sum1=0;
float 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&&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]<=81)
		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]<=71)
		c[i]=1.5;
	else if(b[i]>=60&&b[i]<=63)
		c[i]=1.0;
	else c[i]=0;
}
for(i=0;i<n;i++)
{
	sum1=sum1+a[i];
	g[i]=a[i]*c[i];
	sum2=sum2+g[i];
}
GPA=sum2/sum1;
printf("%.2f",GPA);
return 0;
}
int main()
{
	int a[10];//????
	int point;//??????
	float b[10];//?????
	int n;//????
	float GPA;
	float total=0;
	int i=0;
	float sum=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
	}
	for(i=0;i<n;i++)
	{
		scanf("%d",&point);
		if(point>=90&&point<=100)
		{
			b[i]=4.0;
		}
		if(point>=85&&point<=89)
		{
			b[i]=3.7;
		}
		if(point>=82&&point<=84)
		{
			b[i]=3.3;
		}
		if(point>=78&&point<=81)
		{
			b[i]=3.0;
		}
		if(point>=75&&point<=77)
		{
			b[i]=2.7;
		}
		if(point>=72&&point<=74)\
		{
			b[i]=2.3;
		}
		if(point>=68&&point<=71)
		{
			b[i]=2.0;
		}
		if(point>=64&&point<=67)
		{
			b[i]=1.5;
		}
		if(point>=60&&point<=63)
		{
			b[i]=1.0;
		}
		if(point<60)
		{
			b[i]=0;
		}
	}
	for(i=0;i<n;i++)
	{
		sum=sum+a[i]*b[i];

	}
	for(i=0;i<n;i++)
	{
		total=total+a[i];
	}
	GPA=sum/total;
	printf("%.2f",GPA);
	return 0;
}
int main(){
int n,i;
double GPA;
double a=0;
double b=0;
scanf("%d",&n);
double x[10],cj[MAX],jd[MAX],zjd[MAX];
for(i=0;i<n;i++){
    scanf("%lf",&x[i]);
  }
for(i=0;i<n;i++){
  a+=x[i];
}
for(i=0;i<n;i++){
scanf("%lf",&cj[i]);
   if((cj[i]>=90)&&(cj[i]<=100)){
      jd[i]=4.0;
      zjd[i]=jd[i]*x[i];
 } else if((cj[i]<90)&&(cj[i]>=85)){
      jd[i]=3.7;
      zjd[i]=jd[i]*x[i];
 } else if((cj[i]<=84)&&(cj[i]>=82)){
      jd[i]=3.3;
      zjd[i]=jd[i]*x[i];
 } else if((cj[i]<=81)&&(cj[i]>=78)){
      jd[i]=3.0;
      zjd[i]=jd[i]*x[i];
 } else if((cj[i]<-77)&&(cj[i]>=75)){
      jd[i]=2.7;
      zjd[i]=jd[i]*x[i];
 } else if((cj[i]<=74)&&(cj[i]>=72)){
      jd[i]=2.3;
      zjd[i]=jd[i]*x[i];
 } else if((cj[i]<=71)&&(cj[i]>=68)){
      jd[i]=2.0;
      zjd[i]=jd[i]*x[i];
 } else if((cj[i]<=67)&&(cj[i]>=64)){
      jd[i]=1.5;
      zjd[i]=jd[i]*x[i];
 } else if((cj[i]<=63)&&(cj[i]>=60)){
      jd[i]=1.0;
      zjd[i]=jd[i]*x[i];
 } else{
      zjd[i]=0;
  }
  }
for(i=0;i<n;i++){
   b+=zjd[i];  
}
     GPA=1.0*b/a;
     printf("%.2lf",GPA);
     return 0;
}
void main()
{
	int i,n,s=0,a[10],b[10];
	double c[10],g=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
		s+=a[i];
	}
	for(i=0;i<n;i++){
		scanf("%d",&b[i]);
		if(b[i]>=90&&b[i]<=100){
			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]>=77&&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]>=0&&b[i]<=59){
			c[i]=0;
		}
	}
	for(i=0;i<n;i++){
		g+=c[i]*a[i];
	}
	printf("%.2lf\n",g/s);
}
int main(){
    int n,i,x=0;
    scanf("%d",&n);
    int xuefen[n];
    int defen[n];
    double jidian[n];
    double GPA,y=0;
    for(i=0;i<n;i++){
        scanf("%d",&(xuefen[i]));
    }
    for(i=0;i<n;i++){
        scanf("%d",&(defen[i]));
    }
    for(i=0;i<n;i++){
        if(defen[i]>=90){
            jidian[i]=4.0;
        }else if((defen[i]>=85)&&(defen[i]<=89)){
            jidian[i]=3.7;
        }else if((defen[i]>=82)&&(defen[i]<=84)){
            jidian[i]=3.3;
        }else if((defen[i]>=78)&&(defen[i]<=81)){
            jidian[i]=3.0;
        }else if((defen[i]>=75)&&(defen[i]<=77)){
            jidian[i]=2.7;
        }else if((defen[i]>=72)&&(defen[i]<=74)){
            jidian[i]=2.3;
        }else if((defen[i]>=68)&&(defen[i]<=71)){
            jidian[i]=2.0;
        }else if((defen[i]>=64)&&(defen[i]<=67)){
            jidian[i]=1.5;
        }else if((defen[i]>=60)&&(defen[i]<=63)){
            jidian[i]=1.0;
        }else if(defen[i]<60){
            jidian[i]=0.0;
        }
    }
    for(i=0;i<n;i++){
        y+=xuefen[i]*jidian[i];
    }
    for(i=0;i<n;i++){
        x+=xuefen[i];
    }
    GPA=y/x;
    printf("%.2lf",GPA);
    return 0;    
}
double fun(int x);
int main()
{
  int n,i;
  int course[10];
  int grade[10];
  int mark[10];
  double jdsum=0;
  int csum=0;
  double jd[10];
  double  GPA;
    scanf("%d",&n); 
	for(i=0;i<n;i++)
	 {scanf("%d",&course[i]);
	csum+=course[i];
	 }
	for(i=0;i<n;i++)
	{scanf("%d",&mark[i]);
	 jd[i] = fun(mark[i]);
	 jdsum+=course[i]*jd[i];
	}
	 GPA=1.0*jdsum/csum;
	 printf("%.2lf",GPA);

	
	return 0;
}
double fun(int x)
{

	if(x>=90)return 4.0;
	if(x>=85)return 3.7;
	if(x>=82)return 3.3;
	if(x>=78)return 3.0;
	if(x>=75)return 2.7;
	if(x>=72)return 2.3;
	if(x>=68)return 2.0;
	if(x>=64)return 1.5;
	if(x>=60)return 1.0;
	return 0;
}
int main()
{
int n, i, u[100], a, b=0,g[100];
float  sum=0;
scanf("%d", &n);
for(i=0;i<n;i++){
	scanf("%d",&u[i]);
	b=b+u[i];
}
for(i=0;i<n;i++){
	scanf("%d",&g[i]);
	if(g[i]<=100&&g[i]>=90){
		sum=u[i]*4.0+sum;
	}
	else 	if(g[i]<=84&&g[i]>=82){
		sum=u[i]*3.3+sum;
	}
	else   if(g[i]<=89&&g[i]>=85){
		sum=u[i]*3.7+sum;
	}
else 	if(g[i]<=81&&g[i]>=78){
		sum=u[i]*3.0+sum;
	}
else 	if(g[i]<=77&&g[i]>=75){
		sum=u[i]*2.7+sum;
	}
else 	if(g[i]<=74&&g[i]>=72){
		sum=u[i]*2.3+sum;
	}
else 	if(g[i]<=71&&g[i]>=68){
		sum=u[i]*2.0+sum;
	}
else 	if(g[i]<=67&&g[i]>=64){
		sum=u[i]*1.5+sum;
	}
else 	if(g[i]<=63&&g[i]>=60){
		sum=u[i]*1.0+sum;
	}
else 	if(g[i]<=59&&g[i]>=0){
		sum=u[i]*0.0+sum;
	}
}

printf("%.2f", sum/b);
			return 0;
	}
main()
{
	struct jifen
	{
		int xue;
		int score;
		float ji;
	}ke[10];
	int n,i,k,l;
	float j;
	scanf("%d",&n);
	for(i=0;i<=n-1;i++)
		scanf("%d",&ke[i].xue);
	for(i=0,j=0,l=0;i<=n-1;i++)
	{
		scanf("%d",&ke[i].score);
		k=ke[i].score;
		if(k>=90&&k<=100)
			ke[i].ji=4;
		else
			if(k>=85&&k<=89)
				ke[i].ji=3.7;
			else
				if(k>=82&&k<=84)
					ke[i].ji=3.3;
				else
					if(k>=78&&k<=81)
						ke[i].ji=3.0;
					else
						if(k>=75&&k<=77)
							ke[i].ji=2.7;
						else
							if(k>=72&&k<=74)
								ke[i].ji=2.3;
							else
								if(k>=68&&k<=71)
									ke[i].ji=2.0;
								else
									if(k>=64&&k<=67)
										ke[i].ji=1.5;
									else 
										if(k>=60&&k<=63)
											ke[i].ji=1.0;
										else
											if(k<60)
												ke[i].ji=0;
         j=j+ke[i].ji*ke[i].xue;
		 l=l+ke[i].xue;
	}
  printf("%.2f",j/l);
	return 0;
}
void main()
{
	int n,i;
	float GPA,fen[10],jh=0,xd[10],xh=0,xf[10],score[10];
	scanf("%d",&n);
	for(i=0;i<=n-1;i++)
	{
		scanf("%f",&xf[i]);
		xh=xh+xf[i];
	}
	for(i=0;i<=n-1;i++)
	{
	scanf("%f",&score[i]);
	if(score[i]>=90)
    	fen[i]=4.0;
	else if(score[i]>=85)
		fen[i]=3.7;
	else if(score[i]>=82)
		fen[i]=3.3;
	else if(score[i]>=78)
	    fen[i]=3.0;
	else if(score[i]>=75)
    	fen[i]=2.7;
	else if(score[i]>=72)
		fen[i]=2.3;
	else if(score[i]>=68)
		fen[i]=2.0;
	else if(score[i]>=64)
		fen[i]=1.5;
	else if(score[i]>=60)
    	fen[i]=1.0;
    else
        fen[i]=0;
	xd[i]=fen[i]*xf[i];
	jh=jh+xd[i];
	}
	GPA=jh/xh;
	printf("%.2f",GPA);
}