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 |
help#include <stdio.h> #include <math.h> void main(){ int n,a,b,x,y,i; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d %d",&a,&b); if(a>b && (a+b)%2==0){ printf("%d %d\n",(a+b)/2,(a-b)/2); } else printf("impossible\n"); } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator