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

需要数组吗?、、庆祝自己刷了130道水题、、几行解决、、

Posted by 734330469 at 2011-07-29 23:38:04 on Problem 1663
164K 16MS C 332B  AC的、、、、、、
贴个代码,仅做参考:
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
	int x,y,n,i;
	scanf("%d",&n);
	while (n--)
	{
		scanf("%d%d",&x,&y);
		if(x==y ||x==y+2)
		{if(x==y)
		i=2*x-x%2;
		else i=x+y-x%2;
		printf("%d\n",i);}
		else printf("No Number\n");
	}
	return 0;
}
向150进军了、、、、、、大家都加油、、、、、

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