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.
25 lines
370 B
25 lines
370 B
2 years ago
|
#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;
|
||
|
}
|