Start: Jun, 05, 2019 15:00:00
2019春ACM通识课考试(第二场)
End: Jun, 05, 2019 18:00:00
Time elapsed:
Time remaining:

Problem_ID: E
Result: Accepted
Time: 6ms
Memory: 1128kB
Author: 2018212212041
In contest: 1271

#include<stdio.h>
#include<string.h>
#include<algorithm>
using namespace std;
int a[10004];
int main() {
	int n,m;
	scanf("%d %d",&n,&m);
	int x,y;
	int flag=1;
	for(int i=0; i<100; i++) {
		for(int j=0; j<100; j++) {
			if(i+j==n&&i*2+j*4==m) {
				x=i;
				y=j;
				flag=0;
			}
			if(flag==0)break;
		}
		if(flag==0)break;
	}
	if(flag==1)printf("No answer\n");
	else printf("%d %d\n",x,y);
}