hey guys, i tried doing the problem QUALITY
#include<iostream>
using namespace std;
main()
{
long long int a,b,c,x,y,z,prob,times,i=0;
while(cin>>a>>b>>c>>x>>y>>z)
{
prob=0,times=0;
if(a!=0)
{
prob++;
times+=a;
if(x!=1)
{
times+= 1200*x;
}
}
if(b!=0)
{
prob++;
times+=b;
if(y!=1)
{
times+= 1200*y;
}
}
if(c!=0)
{
prob++;
times+=c;
if(z!=1)
{
times+= 1200*z;
}
}
cout<<"team "<<(i+1)<<": "<<prob<<", "<<times<<endl;
i++;
}
}
Hoping for replies 