#include <stdio.h>
int main()
{
int m,n,x,y;
while (scanf("%d%d",&n,&m)!=EOF)
{ x=(m/2)-n; y=n-x;
if(x<0||y<0)
printf("no answer\n");
else
printf("%d %d\n",y,x);
}
return 0;
}
时间:2021-04-19 17:08:28
#include <stdio.h>
int main()
{
int m,n,x,y;
while (scanf("%d%d",&n,&m)!=EOF)
{ x=(m/2)-n; y=n-x;
if(x<0||y<0)
printf("no answer\n");
else
printf("%d %d\n",y,x);
}
return 0;
}