semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
float pnt(float scr);

int main()
{
	int n,i;
	float gpa=0,sum=0,score[10],credit[10];

	scanf("%d",&n);

	for(i=0;i<n;i++)
	{
		scanf("%f",&credit[i]);
	}
	for(i=0;i<n;i++)
	{
		scanf("%f",&score[i]);
		gpa+=pnt(score[i])*credit[i];
		sum+=credit[i];
	}

	gpa/=sum;

	printf("%.2f",gpa);

	return 0;
}

float pnt(float scr)
{
	if(scr>89)
		return 4.0;
	else if(scr>84)
		return 3.7;
	else if(scr>81)
		return 3.3;
	else if(scr>77)
		return 3.0;
	else if(scr>74)
		return 2.7;
	else if(scr>71)
		return 2.3;
	else if(scr>67)
		return 2.0;
	else if(scr>63)
		return 1.5;
	else if(scr>59)
		return 1.0;
	else
		return 0;
}
main()
{
	int a[10],b[10],i,m;float t,s=0,j,k=0;
	scanf("%d",&m);
	for(i=0;i<m;i++)
		scanf("%d",&a[i]);
	for(i=0;i<m;i++)
		scanf("%d",&b[i]);
	for(i=0;i<m;i++)
	{
		if(b[i]>=90)
			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;
			j=a[i]*t;
			s=j+s;
	}
	for(i=0;i<m;i++)
	 k=a[i]+k;
	printf("%.2f\n",s/k);
}
int main(){
	int x[100],y[100];
	int i,n,a=0;
	double g=0,G;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&(x[i]));
		a+=x[i];
	}
    for(i=0;i<n;i++){
		scanf("%d",&(y[i]));
	}
	for(i=0;i<n;i++){
		if(y[i]>=90&&y[i]<=100){
			g+=4.0*x[i];
		}else if(y[i]>=85&&y[i]<=89){
			g+=3.7*x[i];
		}else if(y[i]>=82&&y[i]<=84){
			g+=3.3*x[i];
		}else if(y[i]>=78&&y[i]<=81){
			g+=3.0*x[i];
		}else if(y[i]>=75&&y[i]<=77){
			g+=2.7*x[i];
        }else if(y[i]>=72){
			g+=2.3*x[i];
		}else if(y[i]>=68){
			g+=2.0*x[i];
		}else if(y[i]>=64){
			g+=1.5*x[i];
		}else if(y[i]>=60){
			g+=1.0*x[i];
		}
	}
    G=g/a;
    printf("%.2f",G);


	return 0;
}
void main()
{
	int n,i;
	float a[10],b[10],s[10],jd,xfjd,gpa,sum1=0,sum2=0;
	float jidian(float f);
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%f",&a[i]);
	}
	for(i=0;i<n;i++)
	{
		scanf("%f",&s[i]);
	}
	for(i=0;i<n;i++)
	{
		jd=jidian(s[i]);
		xfjd=a[i]*jd;
		b[i]=xfjd;
	}
	for(i=0;i<n;i++)
	{
		sum1+=b[i];
	}
	for(i=0;i<n;i++)
	{
		sum2+=a[i];
	}
	gpa=sum1/sum2;
	printf("%.2f\n",gpa);
}
float jidian(float f)
{
	float j;
	if(f<=100&&f>=90) j=4;
	else if(f<=89&&f>=85) j=3.7;
	else if(f<=84&&f>=82) j=3.3;
	else if(f<=81&&f>=78) j=3.0;
	else if(f<=77&&f>=75) j=2.7;
	else if(f<=74&&f>=72) j=2.3;
	else if(f<=71&&f>=68) j=2.0;
	else if(f<=67&&f>=64) j=1.5;
	else if(f<=62&&f>=60) j=1.0;
	else if(f<60) j=0;
	return j;
}
void main()
{
	int n,i=0,j=0,a[10000],f=0;
	float GPA,b[10000],c,d=0;
	scanf("%d",&n);
	while(i<n)
	{
		scanf("%d",&a[i]);
		f=f+a[i];
		i++;
	}
	while(j<n)
	{
		scanf("%f",&b[j]);
		if(b[j]>=90)
			b[j]=4.0;
		else if(b[j]>=85)
			b[j]=3.7;
		else if(b[j]>=82)
			b[j]=3.3;
		else if(b[j]>=78)
			b[j]=3.0;
		else if(b[j]>=75)
			b[j]=2.7;
		else if(b[j]>=72)
			b[j]=2.3;
		else if(b[j]>=68)
			b[j]=2.0;
		else if(b[j]>=64)
			b[j]=1.5;
		else if(b[j]>=60)
			b[j]=1.0;
		else 
			b[j]=0;
		j++;
	}
	while(i>0)
	{
		i--;
		j--;
		c=a[i]*b[j];
		d=d+c;
	}
	GPA=d/(float)f;
	printf("%.2f",GPA);
}
int main ()
{
	int n, i;
	int c[10];    //???????
	int s[10];    //???????
	float g[10];   //?????????
	float ss;    //???????
	float G = 0.0, C = 0.0, GPA;
	scanf ("%d", &n);
	for (i = 0; i < n; i++)
	{
		scanf ("%d", &c[i]);
		C = C + c[i];
	}
	for (i = 0; i < n; i++)
	{
		scanf ("%d", &s[i]);
		if (s[i] >= 90)
		{
			ss = 4.0;
		}
		else if (s[i] >= 85)
		{
			ss = 3.7;
		}
		else if (s[i] >= 82)
		{
			ss = 3.3;
		}
		else if (s[i] >= 78)
		{
			ss = 3.0;
		}
		else if (s[i] >= 75)
		{
			ss = 2.7;
		}
		else if (s[i] >= 72)
		{
			ss = 2.3;
		}
		else if (s[i] >= 68)
		{
			ss = 2.0;
		}
		else if (s[i] >= 64)
		{
			ss = 1.5;
		}
		else if (s[i] >= 60)
		{
			ss = 1.0;
		}
		else 
		{
			ss = 0.0;
		}
		g[i] = ss * c[i];
		G = G + g[i];
	}
    GPA = G / C;
	printf ("%.2f\n", GPA);
	return 0;
}
int main()
{
	int n,i,a[10],b[10],sum;
	double GPA,c,d;
	GPA=0,sum=0,c=0.0,d=0.0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		sum+=a[i];
	}
	for(i=0;i<n;i++)
	{
		scanf("%d",&b[i]);
		if(b[i]<=100&&b[i]>=90)
		{
			c=4.0;
		}
		else if(b[i]<=89&&b[i]>=85)
		{
			c=3.7;
		}
		else if(b[i]<=84&&b[i]>=82)
		{
			c=3.3;
		}
		else if(b[i]<=81&&b[i]>=78)
		{
			c=3.0;
		}
		else if(b[i]<=77&&b[i]>=75)
		{
			c=2.7;
		}
		else if(b[i]<=74&&b[i]>=72)
		{
			c=2.3;
		}
		else if(b[i]<=71&&b[i]>=68)
		{
			c=2.0;
		}
		else if(b[i]<=67&&b[i]>=64)
		{
			c=1.5;
		}
		else if(b[i]<=63&&b[i]>=60)
		{
			c=1.0;
		}
		else
		{
			c=0.0;
		}
		d+=c*(a[i]*1.0);
	}
	GPA+=d/(sum*1.0);
	printf("%.2lf",GPA);
	return 0;
}
int main(){
    int n;
	scanf("%d",&n);
	int xf[10];
	int cj[10];
	int i;
	int sum=0;
	for(i=0;i<=n-1;i++){
		scanf("%d",&xf[i]);
		sum+=xf[i];
	}
	for(i=0;i<=n-1;i++){
		scanf("%d",&cj[i]);
	}
	double gpa=0;
    for(i=0;i<=n-1;i++){
        if(cj[i]>=90&&cj[i]<=100){
			gpa+=4.0*xf[i];
		}else if(cj[i]>=85&&cj[i]<=89){
			gpa+=3.7*xf[i];
		}else if(cj[i]>=82&&cj[i]<=84){
			gpa+=3.3*xf[i];
		}else if(cj[i]>=78&&cj[i]<=81){
			gpa+=3.0*xf[i];
		}else if(cj[i]>=75&&cj[i]<=77){
			gpa+=2.7*xf[i];
		}else if(cj[i]>=72&&cj[i]<=74){
			gpa+=2.3*xf[i];
		}else if(cj[i]>=68&&cj[i]<=71){
			gpa+=2.0*xf[i];
		}else if(cj[i]>=64&&cj[i]<=67){
			gpa+=1.5*xf[i];
		}else if(cj[i]>=60&&cj[i]<=63){
			gpa+=1.0*xf[i];
		}
	}
	printf("%.2lf",gpa/sum);
	return 0;
}
void main()
{
	int n,i,credit[10],score[10],credit1=0;
	float point[10],gpa,sum=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{scanf("%d",&credit[i]);
	credit1=credit1+credit[i];
	}
	for(i=0;i<n;i++)
		scanf("%d",&score[i]);
	for(i=0;i<n;i++)
	{if (score[i]>=90&&score[i]<=100)point[i]=4.0;
	 else if (score[i]>=85)point[i]=3.7;
	 else if (score[i]>=82)point[i]=3.3;
	  else if (score[i]>=78)point[i]=3.0;
	   else if (score[i]>=75)point[i]=2.7;
	    else if (score[i]>=72)point[i]=2.3;
		 else if (score[i]>=68)point[i]=2.0;
		  else if (score[i]>=64)point[i]=1.5;
		   else if (score[i]>=60)point[i]=1.0;
		   else point[i]=0;
		   point[i]=point[i]*credit[i];
		   sum=sum+point[i];
	}
	gpa=sum/credit1;
	printf("%.2f",gpa);
}
int main()
{
	double GPA;
	double xf[100];
	double cj[100];
	double jd[100];
	double s[100];
	double p=0;
	double sumxf=0,sumjd=0;
	int i=0,j=0;
	int n;
	double t;
	double a[100];
	scanf("%d",&n);

	for(i=0;i<n;i++)
	{
	scanf("%lf",&xf[i]);
	sumxf=sumxf+xf[i];
	
	}
	
	for(i=0;i<n;i++)
	{
	scanf("%lf",&cj[i]);
	t=cj[i];
	if(t>=90)
		jd[i]=4.0;
	else
		{if(t>=85)
			jd[i]=3.7;
		else
			{if(t>=82)
				jd[i]=3.3;
			else
			{if(t>=78)
				jd[i]=3.0;
			else
				{if(t>=75)
					jd[i]=2.7;
				else
					{if(t>=72)
						jd[i]=2.3;
					else
						{if(t>=68)
							jd[i]=2.0;
						else
						{if(t>=64)
							jd[i]=1.5;
						else
							{if(t>=60)
								jd[i]=1;
							else
								jd[i]=0;}}}}}}}}


	}

	for(i=0;i<n;i++)
	{
	s[i]=xf[i]*jd[i];
	p=p+s[i];
	}
	GPA=p/sumxf;

	printf("%.2lf",GPA);

	

return 0;

}
int main() {
	int n;
	cin >> n;
	int xuefen[10] = {0};  // input part
	for(int i = 0; i < n; i++)
		cin >> xuefen[i];
	int score[10] = {0};
	double jidian[10] = {0};
	for(int i = 0; i < n; i++) {
		cin >> score[i];
		if(score[i] >= 90 && score[i] <= 100) jidian[i] = 4.0;     // calculate the jidian of this course
		if(score[i] >= 85 && score[i] <= 89) jidian[i] = 3.7;
		if(score[i] >= 82 && score[i] <= 84) jidian[i] = 3.3;
		if(score[i] >= 78 && score[i] <= 81) jidian[i] = 3.0;
		if(score[i] >= 75 && score[i] <= 77) jidian[i] = 2.7;
		if(score[i] >= 72 && score[i] <= 74) jidian[i] = 2.3;
		if(score[i] >= 68 && score[i] <= 71) jidian[i] = 2.0;
		if(score[i] >= 64 && score[i] <= 67) jidian[i] = 1.5;
		if(score[i] >= 60 && score[i] <= 63) jidian[i] = 1.0;
		if(score[i] <= 59) jidian[i] = 0;
	}
	double sum1 = 0, sum2 = 0;
	for(int i = 0; i < n; i++) {
		sum1 += xuefen[i] * jidian[i]; // ????????
		sum2 += xuefen[i];        // ???????? 
	}
	double GPA = sum1 / sum2;
	printf("%.2f",GPA);
	getchar();
	getchar();
	return 0;
}
void main(){
	int n;
	double zxf=0,xfj=0,gpa;
	int i;
	struct lesson{
		int point;
		int score;
		double jd;
	}sub[10];
	scanf("%d",&n);	
	for(i=0;i<n;i++){
		scanf("%d",&sub[i].point);
	}
	for(i=0;i<n;i++){
		scanf("%d",&sub[i].score);
	}
	for(i=0;i<n;i++){
		switch(sub[i].score){
		case 100:
		case 99:
		case 98:
		case 97:
		case 96:
		case 95:
		case 94:
		case 93:
		case 92:
		case 91:
		case 90:
			sub[i].jd=4.0;
			break;
		case 89:
		case 88:
		case 87:
		case 86:
		case 85:
			sub[i].jd=3.7;
			break;
		case 84:
		case 83:
		case 82:
			sub[i].jd=3.3;
			break;
		case 81:
		case 80:
		case 79:
		case 78:
			sub[i].jd=3.0;
			break;
		case 77:
		case 76:
		case 75:
			sub[i].jd=2.7;
			break;
		case 74:
		case 73:
		case 72:
			sub[i].jd=2.3;
			break;
		case 71:
		case 70:
		case 69:
		case 68:
			sub[i].jd=2.0;
			break;
		case 67:
		case 66:
		case 65:
		case 64:
			sub[i].jd=1.5;
			break;
		case 63:
		case 62:
		case 61:
		case 60:
			sub[i].jd=1.0;
			break;
		default:
			sub[i].jd=0;
			break;
			
		}
	}
	for(i=0;i<n;i++){
		xfj+=sub[i].point*sub[i].jd;
		zxf+=sub[i].point;
	}
	gpa=xfj/zxf;
	printf("%.2lf\n",gpa);
}
int main()
{
	int n,i;
	float a[10],b[10],s,t,GPA;
	s=0.0;
	t=0.0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%f",&a[i]);
	}
	for(i=0;i<n;i++)
	{
		scanf("%f",&b[i]);
	}
	for(i=0;i<n;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;i++)
	{
		s=s+a[i]*b[i];
		t=t+a[i];
	}
	GPA=s/t;
	printf("%.2f",GPA);
	return 0;
}
int main()
{
     int s1[10],s2[10];
     float gpa[10],k,sum=0,sum2=0;
     int i,n;
     scanf("%d",&n);
     for(i=1;i<=n;i++)
     {
             scanf("%d",&s1[i]);
             sum=sum+s1[i];
     }   
     for(i=1;i<=n;i++)
     {
             scanf("%d",&s2[i]);
             if(s2[i]>=90) gpa[i]=4.0;
             else if(s2[i]>=85&&s2[i]<=89) gpa[i]=3.7;
             else if(s2[i]>=82&&s2[i]<=84) gpa[i]=3.3;
             else if(s2[i]>=78&&s2[i]<=81) gpa[i]=3.0;
             else if(s2[i]>=75&&s2[i]<=77) gpa[i]=2.7;
             else if(s2[i]>=72&&s2[i]<=74) gpa[i]=2.3;
             else if(s2[i]>=68&&s2[i]<=71) gpa[i]=2.0;
             else if(s2[i]>=64&&s2[i]<=67) gpa[i]=1.5;
             else if(s2[i]>=60&&s2[i]<=63) gpa[i]=1.0;
             else gpa[i]=0;
             sum2=sum2+s1[i]*gpa[i];
     }
     k=sum2/sum;          
     printf("%.2f",k);
     return 0;
}
int main()
{
	int n,i,s=0;
	int a[11],b[11];
	float x=0,GPA,c[11];
	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++)
	{
		s=s+a[i];
		if(b[i]>=90)
			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
										c[i]=0;
								}}}}}}}}
		x=x+(c[i]*a[i]);
	}
	GPA=x/s;
	printf("%.2f",GPA);
	return 0;
}
//#include<iostream>
//using namespace std;

int main()
{
	int n,i;
	int xuefen[15],chengji[15];
	int sum;
	float jidian[15];
	float sum2;
	float tmp;
	scanf("%d",&n);
	getchar();
	sum=0;
	sum2=0;
	for(i=1;i<=n;i++)
	{
		scanf("%d",&xuefen[i]);
		sum = sum + xuefen[i];
	}
	getchar();
	for(i=1;i<=n;i++)
	{
		scanf("%d",&chengji[i]);
		if(chengji[i]>=90 && chengji[i]<=100)
			jidian[i]=4.0;
		else if(chengji[i]>=85 && chengji[i]<=89)
			jidian[i]=3.7;
		else if(chengji[i]>=82 && chengji[i]<=84)
			jidian[i]=3.3;
		else if(chengji[i]>=78 && chengji[i]<=81)
			jidian[i]=3.0;
		else if(chengji[i]>=75 && chengji[i]<=77)
			jidian[i]=2.7;
		else if(chengji[i]>=72 && chengji[i]<=74)
			jidian[i]=2.3;
		else if(chengji[i]>=68 && chengji[i]<=71)
			jidian[i]=2.0;
		else if(chengji[i]>=64 && chengji[i]<=67)
			jidian[i]=1.5;
		else if(chengji[i]>=60 && chengji[i]<=63)
			jidian[i]=1.0;
		else
			jidian[i]=0;
	}
	sum2;
	for(i=1;i<=n;i++)
	{
		sum2=sum2+jidian[i]*xuefen[i];
	}
	tmp=sum2/sum;
	printf("%.2f",tmp);
	return 0;
}
int main()
{
	int a[10],n,i,sum=0;
	double b[10],num=0,c[10];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		cin>>a[i];
	}
	for(i=0;i<n;i++){
	cin>>b[i];
	}
	for(i=0;i<n;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]>=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;}
	}
	
    for(i=0;i<n;i++){
		sum+=a[i];
	}

	for(i=0;i<10;i++){
		num+=c[i]*a[i];
	}
   
	printf("%0.2f\n",num/sum);
	
	return 0;
}
void main()
{
    float gpa(int point);
    int point[11],mark[11];
    float gpax[11];
    int i,k,sum;
    float summ;
    scanf("%d",&k);
    sum=0;summ=0;
    for(i=1;i<=k;i++)
    {
    	scanf("%d",&mark[i]);
    	sum=sum+mark[i];
    }
    for(i=1;i<=k;i++)
    {
    	scanf("%d",&point[i]);
    	gpax[i]=gpa(point[i]);
    	summ=summ+((float)mark[i])*(gpax[i]);
    }
    printf("%.2f\n",summ/sum);
}

float gpa(int point)
{
	float gpa;
	if(point<60) gpa=0;
	else if(point<64) gpa=1.0;
	else if(point<68) gpa=1.5;
	else if(point<72) gpa=2.0;
	else if(point<75) gpa=2.3;
	else if(point<78) gpa=2.7;
	else if(point<82) gpa=3.0;
	else if(point<85) gpa=3.3;
	else if(point<90) gpa=3.7;
	else gpa=4.0;
	return(gpa);
}
int main()
{
	int n,i,j,k;
	float s=0,m=0,gpa;
	float a[10];
	int b[10];
	float c[10];
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>a[i];
	}
	for(i=0;i<n;i++)
	{
		cin>>b[i];
	}
	for(j=0;j<n;j++)
	{
		if(b[j]<=100&&b[j]>=90)
			c[j]=4.0;
		if(b[j]>=85&&b[j]<=89)
			c[j]=3.7;
		if(b[j]>=82&&b[j]<=84)
			c[j]=3.3;
		if(b[j]>=78&&b[j]<=81)
			c[j]=3.0;
		if(b[j]>=75&&b[j]<=77)
			c[j]=2.7;
		if(b[j]>=72&&b[j]<=74)
			c[j]=2.3;
		if(b[j]>=68&&b[j]<=71)
			c[j]=2.0;
		if(b[j]>=64&&b[j]<=67)
			c[j]=1.5;
		if(b[j]>=60&&b[j]<=63)
			c[j]=1.0;
		if(b[j]<60)
			c[j]=0;
	}
	for(k=0;k<n;k++)
	{
		s=s+a[k]*c[k];
	}
	for(k=0;k<n;k++)
	{
		m=m+a[k];
	}
	gpa=s/m;
	printf("%.2f",gpa);
	return 0;
}
int main(){
int n,i,s=0;
double m,q=0;
int sz1[10];
double sz2[10];
scanf("%d\n",&n);
	for(i=0;i<n;i++){
      scanf("%d",&(sz1[i]));
		}
	for(i=0;i<n;i++){
	  scanf("%lf",&(sz2[i]));
		}
    for(i=0;i<n;i++){
	  s=s+sz1[i];
		}
	for(i=0;i<n;i++){
		if(sz2[i]<=100&&sz2[i]>=90){
		sz2[i]=4.0*(sz1[i]);
		}else if(sz2[i]<=89&&sz2[i]>=85){
		sz2[i]=3.7*sz1[i];
		}else if(sz2[i]<=84&&sz2[i]>=82){
		sz2[i]=3.3*sz1[i];
		}else if(sz2[i]<=81&&sz2[i]>=78){
		sz2[i]=3.0*sz1[i];
		}else if(sz2[i]<=77&&sz2[i]>=75){
		sz2[i]=2.7*sz1[i];
		}else if(sz2[i]<=74&&sz2[i]>=72){
		sz2[i]=2.3*sz1[i];
		}else if(sz2[i]<=71&&sz2[i]>=68){
		sz2[i]=2.0*sz1[i];
		}else if(sz2[i]<=67&&sz2[i]>=64){
		sz2[i]=1.5*sz1[i];
		}else if(sz2[i]<=63&&sz2[i]>=60){
		sz2[i]=1.0*sz1[i];
		}else{
		sz2[i]=0.0*sz1[i];
		}
	}
	for(i=0;i<n;i++){
	  q=q+sz2[i];
		}
	m=q/s;
	printf("%.2lf",m);
	return 0;
}
//
//  main.c
//  ???
//
//  Created by zhaoze on 13-11-7.
//  Copyright (c) 2013? zhaoze. All rights reserved.
//


void main()
{
    int n,sum=0,i=0;
    int a[10]={0};
    float GPA[10]={0.0},h=0.0;
    float tran(float n);
    scanf("%d",&n);
    for (i=0; i<n; i++)
    {
        scanf("%d",&a[i]);
        sum+=a[i];
    }
    for (i=0; i<n; i++)
    {
        scanf("%f",&GPA[i]);
        GPA[i]=tran(GPA[i]);
        //printf("%.5f",GPA[i]);
    }
    for (i=0; i<n; i++)
    {
        h+=GPA[i]*a[i];
    }
    printf("%.2f",h/sum);

}

//
 float tran(float n)
{
    float h=0.0;
    if (n>=90&&n<=100) h=4.0;
    else if (n>=85&&n<=89) h=3.7;
    else if (n>=82&&n<=84) h=3.3;
    else if (n>=78&&n<=81) h=3.0;
    else if (n>=75&&n<=77) h=2.7;
    else if (n>=72&&n<=74) h=2.3;
    else if (n>=68&&n<=71) h=2.0;
    else if (n>=64&&n<=67) h=1.5;
    else if (n>=60&&n<=63) h=1.0;
    else h=0.0;
    return h;
}
void main()
{
  int n,i,s2=0;float s1=0,GPA;
  int a[9],b[9]; float c[9];
  scanf("%d",&n);
  for(i=0;i<=n-1;i++)
     scanf("%d",&a[i]);
  for(i=n;i<=9;i++)a[i]=0;
  for(i=0;i<=n-1;i++) 
     scanf("%d",&b[i]);
  for(i=n;i<=9;i++)a[i]=0;
  for(i=0;i<=n-1;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.0;
     s1=s1+c[i]*a[i];s2=s2+a[i];
     }
  GPA=s1/s2;
	  printf("%.2f",GPA);
}
int main()
{
	int s[10],c[10],i,j,n,k;
	float sum,g[10],ave;
	i=0;
	j=0;
	k=0;
	sum=0;
	scanf("%d",&n);
	while(i<n)
	{
		scanf("%d",&c[i]);
		i++;
	}
    while(j<n)
	{
		scanf("%d",&s[j]);
        j++;
	}
	i=0;
	while(i<n)
	{
		k+=c[i];
		i++;
	}
	j=0;
	while(j<n)
	{
		if(s[j]>=90)
			g[j]=4.0;
		if(s[j]>=85&&s[j]<=89)
			g[j]=3.7;
		if(s[j]>=82&&s[j]<=84)
            g[j]=3.3;
		if(s[j]>=78&&s[j]<=81)
			g[j]=3.0;
		if(s[j]>=75&&s[j]<=77)
			g[j]=2.7;
		if(s[j]>=72&&s[j]<=74)
            g[j]=2.3;
		if(s[j]>=68&&s[j]<=71)
			g[j]=2.0;
		if(s[j]>=64&&s[j]<=67)
			g[j]=1.5;
		if(s[j]>=60&&s[j]<=63)
			g[j]=1.0;
		if(s[j]<=60)
            g[j]=0;
		j++;
	}
	j=0;
	i=0;
	while(j<n)
	{
        sum+=g[j]*c[i];
		i++;
		j++;
	}
	ave=sum/k;
	printf("%.2f",ave);
    return 0;
}
void main()
{
	int n,a[2][10],j,he=0;
	float sum=0,jidian[10],gpa;
	scanf("%d",&n);
	for(j=0;j<=n-1;j++)
	{
		scanf("%d",&a[0][j]);
	}
	for(j=0;j<=n-1;j++)
	{
		scanf("%d",&a[1][j]);
	}
    for(j=0;j<=n-1;j++)
	{
		if(a[1][j]>=90)
			jidian[j]=4;
		else if(a[1][j]>=85&&a[1][j]<=89)
			jidian[j]=3.7;
		else if(a[1][j]>=82&&a[1][j]<=84)
			jidian[j]=3.3;
		else if(a[1][j]>=78&&a[1][j]<=81)
			jidian[j]=3.0;
		else if(a[1][j]>=75&&a[1][j]<=77)
			jidian[j]=2.7;
		else if(a[1][j]>=72&&a[1][j]<=74)
			jidian[j]=2.3;
		else if(a[1][j]>=68&&a[1][j]<=71)
			jidian[j]=2.0;
		else if(a[1][j]>=64&&a[1][j]<=67)
			jidian[j]=1.5;
		else if(a[1][j]>=60&&a[1][j]<=63)
			jidian[j]=1.0;
		else jidian[j]=0;
		sum=sum+jidian[j]*a[0][j];
		he=he+a[0][j];
	}
    gpa=sum/(float)he;
	printf("%.2f\n",gpa);
}
int main()
{
	int n,i,j,k=0,fs[N],xf[N];
	double GPA,s;
	scanf("%d",&n);
	for(j=0;j<n;j++)
	{
		scanf("%d",&(xf[j]));
	}
	for(i=0;i<n;i++)
	{
		scanf("%d",&(fs[i]));
	}
	for(j=0;j<n;j++)
	{
		k=k+xf[j];
	}
	j=0;
	s=0;
	for(i=0;i<n;i++)
	{
        if(fs[i]>=90&&fs[i]<=100)
		{
            s=s+4.0*xf[j];
		}
		else if(fs[i]>=85&&fs[i]<=89)
		{
			s=s+3.7*xf[j];
		}
		else if(fs[i]>=82&&fs[i]<=84)
		{
			s=s+3.3*xf[j];
		}
		else if(fs[i]>=78&&fs[i]<=81)
		{
			s=s+3.0*xf[j];
		}
		else if(fs[i]>=75&&fs[i]<=77)
		{
			s=s+2.7*xf[j];
		}
        else if(fs[i]>=72&&fs[i]<=74)
		{
			s=s+2.3*xf[j];
		}
        else if(fs[i]>=68&&fs[i]<=71)
		{
			s=s+2.0*xf[j];
		}
        else if(fs[i]>=64&&fs[i]<=67)
		{
			s=s+1.5*xf[j];
		}
        else if(fs[i]>=60&&fs[i]<=63)
		{
			s=s+1.0*xf[j];
		} 
        else if(fs[i]<60)
		{
			s=s+0;
		}
		j=j+1;
	}
	GPA=s/k;
	printf("%.2lf",GPA);
	return 0;
}
double function(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 if(x<60)
	{
		return 0;
	}
}
int main()
{
	int n,j,sum1=0;
	double sum2=0;
	int a[10],b[10];
	double c[10];
	cin>>n;
	for(j=0;j<n;j++)
	{
		cin>>a[j];
		sum1+=a[j];
	}
	for(j=0;j<n;j++)
	{
		cin>>b[j];
		c[j]=function(b[j]);
		sum2+=c[j]*a[j];
	}
	printf("%.2f\n",sum2/sum1);
	return 0;
}
int main() {
int n, i;
scanf("%d",&n);
int sz1[n];
int sz2[n];
for(i=0; i<n; i++) {
  scanf("%d",&sz1[i]);
  }
for(i=0; i<n; i++) {
  scanf("%d",&sz2[i]);
  }
float score1[n];
for(i=0; i<n; i++) {
  if (sz2[i]>=90 && sz2[i]<=100) {
    score1[i]=4.00; }
  else if (sz2[i]>=85 && sz2[i]<=89) {
    score1[i]=3.70; }
  else if (sz2[i]>=82 && sz2[i]<=84) {
    score1[i]=3.30; }
  else if (sz2[i]>=78 && sz2[i]<=81) {
    score1[i]=3.00; }
  else if (sz2[i]>=75 && sz2[i]<=77) {
    score1[i]=2.70; }
  else if (sz2[i]>=72 && sz2[i]<=74) {
    score1[i]=2.30; }
  else if (sz2[i]>=68 && sz2[i]<=71) {
    score1[i]=2.00; }
  else if (sz2[i]>=64 && sz2[i]<=67) {
    score1[i]=1.50; }
  else if (sz2[i]>=60 && sz2[i]<=63) {
    score1[i]=1.00; }
  else if (sz2[i]<=60) {
    score1[i]=0.00; }
  }
float score2[n];
for(i=0; i<n; i++) {
  score2[i]=score1[i]*sz1[i];
  }
float sum1=0.00;
float sum2=0.00;
for(i=0; i<n; i++) {
  sum1=sum1+score2[i];
  }
for(i=0; i<n; i++) {
  sum2=sum2+sz1[i];
  }
float GPA;
GPA = sum1/sum2;
printf("%.2f",GPA);
return 0;
}
int main(){
    int i=0,core[10],j[10],k;
    char o[10];
    int all=0,alle=0;
    scanf("%d",&k);
    for(i=0;i<=k-1;i++){
        scanf("%d ",&j[i]);}

    for(i=0;i<=k-1;i++){
        scanf("%d",&core[i]);}

    for(i=0;i<=k-1;i++){
        if(core[i]<=100&&core[i]>=90)
            {core[i]=40;continue;}
        if(core[i]<=89&&core[i]>=85)
            {core[i]=37;continue;}
        if(core[i]<=84&&core[i]>=82)
           { core[i]=33;continue;}      
        if(core[i]<=81&&core[i]>=78)
           {core[i]=30; continue;}    
        if(core[i]<=77&&core[i]>=75)
           { core[i]=27;continue;}   
        if(core[i]<=74&&core[i]>=72)
           { core[i]=23;continue;}  
        if(core[i]<=71&&core[i]>=68)
           { core[i]=20;continue;}   
        if(core[i]<=67&&core[i]>=64)
           { core[i]=15;continue;}
        if(core[i]<=63&&core[i]>=60)
           { core[i]=10;continue;}
        if(core[i]<=59&&core[i]>=0)
            {core[i]=0; continue;}   
    }

    for(i=0;i<=k-1;i++)
        alle=alle+core[i]*j[i];

    for(i=0;i<=k-1;i++)
        {all=all+j[i];}

        printf("%.2lf",1.0*alle/10/all);
        
        
return 0;
}
void main()
{
	int n,i,f,z=0;
	scanf("%d",&n);
	int g[11];
	double p[11];double GPA;
	for(i=1;i<=n;i++)
	{
		scanf("%d",&g[i-1]);
		z+=g[i-1];
	}
	for(i=1;i<=n;i++)
	{
		scanf("%d",&f);
		if(f<60)
			p[i-1]=0;
		else if(f>=60&&f<=63)
			p[i-1]=1.0;
		else if(f>=64&&f<=67)
			p[i-1]=1.5;
		else if(f>=68&&f<=71)
			p[i-1]=2.0;
		else if(f>=72&&f<=74)
			p[i-1]=2.3;
		else if(f>=75&&f<=77)
			p[i-1]=2.7;
		else if(f>=78&&f<=81)
			p[i-1]=3.0;
		else if(f>=82&&f<=84)
			p[i-1]=3.3;
		else if(f>=85&&f<=89)
			p[i-1]=3.7;
		else if(f>=90&&f<=100)
			p[i-1]=4.0;
	}
	for(i=1;i<=n;i++)
		GPA+=p[i-1]*g[i-1];
	GPA=GPA/z;
	printf("%.2f",GPA);
}
int main()
{
  int n,i,j;
  float a[3][11];
  scanf("%d",&n);
  for(i=0;i<2;i++)
  {
	  for(j=0;j<n;j++)
	  {
		  scanf("%f",&a[i][j]);
	  }
  }
  float s1=0.0;
 for(int k=0;k<n;k++)
 {
	 if(a[1][k]>=90){
		 a[1][k]=4.0*a[0][k];}
	 else if(a[1][k]>=85&&a[1][k]<=89){
		 a[1][k]=3.7*a[0][k];}
	 else if(a[1][k]>=82&&a[1][k]<=84){
		 a[1][k]=3.3*a[0][k];}
	 else if(a[1][k]>=78&&a[1][k]<=81){
		 a[1][k]=3.0*a[0][k];}
	 else if(a[1][k]>=75&&a[1][k]<=77){
		 a[1][k]=2.7*a[0][k];}
	 else if(a[1][k]>=72&&a[1][k]<=74){
		 a[1][k]=2.3*a[0][k];}
	 else if(a[1][k]>=68&&a[1][k]<=71){
		 a[1][k]=2.0*a[0][k];}
	 else if(a[1][k]>=64&&a[1][k]<=67){
		 a[1][k]=1.5*a[0][k];}
	 else if(a[1][k]>=60&&a[1][k]<=63){
		 a[1][k]=1.0*a[0][k];}
	 else {
		 a[1][k]=0;}
	 s1+=a[1][k];
 }
int s2=0;
for(int p=0;p<n;p++)
{
   s2+=a[0][p];
}
  float GPA;
  GPA=s1/s2;
  printf("%.2f",GPA);
  return 0;
}