#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
vector<int> jg;
while(1)
{
int NUM1;
int NUM2;
cin>>NUM1>>NUM2;
if((NUM1==0)&&(NUM2==0))
{
break;
}
int js=0;
for(int i=0;i<NUM1;i++)
{
string s;
int t;
cin>>s>>t;
js=js+t;
}
jg.push_back(NUM2*3-js);
}
for(int i=0;i<jg.size();i++)
{
cout<<jg[i]<<endl;
}
return 0;
}
POJ 3117 World Cup G++
最新推荐文章于 2020-09-16 16:11:14 发布