1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
int gradeCalc(int t1, int t2, int f, int a, int ct[])
{
int sum=0;
sort(ct, ct+3);
sum = ct[0]+ct[1];
return sum;
}
int main()
{
int n;
for(int i=1; ;i++)
{
int t1,t2,f,a,ct[3];
scanf("%d %d %d %d",&t1,&t2,&f,&a);
for(int i=0; i<3; i++)
scanf("%d",&ct[i]);
cout<<gradeCalc(t1,t1,t2,f,a,ct);
}
return 0;
}
|