poj 3117 World Cup

#include<iostream>        //比赛场数乘3减去分数之和
#include<string>
using namespace std;
int main()
{
int t,n,a,s;
string str;
while(cin>>t>>n,t)
{
s
=0;
while(t--)
{
cin
>>str>>a;
s
+=a;
}
cout
<<3*n-s<<endl;
}
return 0;
}

  

posted on 2011-07-22 16:43  sysu_mjc  阅读(77)  评论(0编辑  收藏  举报

导航