Advertisement
ahmad_zizo

UVA_4

Jan 30th, 2014
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. int n,i,s,d;
  6. scanf("%d",&n);
  7. for(i=1; i<=n; i++)
  8. {
  9. scanf("%d %d",&s,&d);
  10. if(s>d)
  11. printf("%d %d\n",(s+d)/2,(s-d)/2);
  12. else
  13. printf("impossible\n");
  14. }
  15. return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement