Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:需要数组吗?、、庆祝自己刷了130道水题、、几行解决、、In Reply To:需要数组吗?、、庆祝自己刷了130道水题、、几行解决、、 Posted by:734330469 at 2011-07-29 23:38:04 > 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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator