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.

18 lines
413 B

#include <bits/stdc++.h>
using namespace std;
int main() {
for (int i = 1; i <= 9; ++i) {
for (int j = 0; j <= 9; ++j) {
for (int k = 0; k <= 9; ++k) {
if (k > i && i > j && i + j + k == i * j * k) {
cout << i << " " << j << " " << k << endl;
break;
}
}
}
}
return 0;
}