here is the link. And here is the code I’ve written:
#include
#define ll long long
using namespace std;
int main() {
ll t;
cin>>t;
while(t–)
{
ll n;
cin>>n;
ll sum=0;
string origin;
cin>>origin;
while(n–)
{
string s;
cin>>s;
if(s==“CONTEST_WON”)
{
int rank;
cin>>rank;
if(rank<=20)
sum+=320-x;
}
else if(s==“TOP_CONTRIBUTOR”)
{
sum+=300;
}
else if(s==“BUG_FOUND”)
{
int severity;
cin>>severity;
sum+=severity;
}
else if(s==“CONTEST_HOSTED”)
{
sum+=50;
}
}
if(origin==“INDIAN”)
cout<<sum/200<<endl;
else
cout<<sum/400<<endl;
}
}
What is wrong with this?
Only one Test case is passing after submission