You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
352 B

2 years ago
#include <bits/stdc++.h>
using namespace std;
int main() {
//小红a小明b
for (int a = 1; a <= 100; a++)
for (int b = 1; b <= 100; b++) {
if (2 * (b - (a - b)) == a && a + (a - b) == 2 * b - 9) {
cout << a << " " << b << endl;
break;
}
}
return 0;
}