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.

27 lines
751 B

#include <bits/stdc++.h>
using namespace std;
/*
齐齐  淘淘  马克
a b c
a-3b-3c 4b 4c
4(a-3b-3c) 4b-3(a-3b-3c)-12c 16c
a+b+c=192
4b-3(a-3b-3c)-12c =16c
4b-3(a-3b-3c)-12c =4(a-3b-3c)
*/
int main() {
for (int a = 1; a <= 192; a++)
for (int b = 1; b <= 192; b++)
for (int c = 1; c <= 192; c++) {
int x = 4 * b - 3 * (a - 3 * b - 3 * c) - 12 * c;
if (a + b + c == 192 && x == 16 * c && x == 4 * (a - 3 * b - 3 * c)) {
cout << a << " " << b << " " << c << endl;
// exit(0);
}
}
return 0;
}