#include<stdio.h>
int main()
{
int head,foot;
int x,y,N;
scanf("%d",&N);
while(N--){
scanf("%d%d",&head,&foot);
x=(4*head-foot)/2;
y=(foot-2*head)/2;
if(x<0||y<0){
x=0;y=0;}
if((2*x==4*head-foot)||(2*y==foot-2*head))
printf("%d %d\n",x,y);
else
printf("No answer\n");
}
return 0;
}
这是一个简单的程序,话也不多说了
南阳oj鸡兔同笼
最新推荐文章于 2024-07-08 20:44:01 发布