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: 7ms
Memory: 1712kB
Author: 2018212212236
In contest: 1271

#include<iostream>
#include<iomanip>
#include<cmath>
#include<string>
#include<algorithm>
#include<vector>
#include<deque>
using namespace std;
vector<int> a;
int main() {
	int n, m, t;
	string s;
	int sum = 0;
	cin >> n >> m;
	int i , j;
	for(i = 0; i <= n; i++) {
		for(j = 0; j <= n; j++) {
			if(i + j > n)
				break;
			if(4 * i + 2 * j == m && i + j == n) {
				cout << j << " " << i;
				return 0;
			}
		}
	}
	cout << "No answer";
	return 0;

}