Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

整体看就简单了!!!原来水题有时也不是那么容易看出来的~~~

Posted by 12619 at 2009-07-23 20:07:55 on Problem 3117 and last updated at 2009-07-23 20:24:54
#include<stdio.h>
void main()
{
	int a,b,temp;
	long sum=0;
	while(scanf("%d%d",&a,&b),a!=0){
		sum=0;
		while(a--){
		    scanf("%*s%d",&temp);
		    sum+=temp;	
		}
		printf("%ld\n",b*3-sum);
	}
}




Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator