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.
|
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
|
|
//思路:倒推,逆向思维
|
|
int main() {
|
|
int a = 8, b = 8, c = 8;
|
|
int sum = a + b + c;
|
|
|
|
a /= 2;
|
|
b /= 2;
|
|
c = sum - a - b;
|
|
|
|
a /= 2;
|
|
c /= 2;
|
|
b = sum - a - c;
|
|
|
|
b /= 2;
|
|
c /= 2;
|
|
a = sum - b - c;
|
|
|
|
cout << a << " " << b << " " << c << "";
|
|
return 0;
|
|
}
|