#include <iostream>
using namespace std;
int main()
{
setlocale(LC_ALL, "Rus");
int dedka, babka, repka;
long int skazka;
for (int d = 0; d < 10; d++) {
for (int e = 0; e < 10; e++) {
for (int k = 0; k < 10; k++) {
for (int a = 0; a < 10; a++) {
for (int b = 0; b < 10; b++) {
for (int r = 0; r < 10; r++) {
for (int p = 0; p < 10; p++) {
for (int s = 0; s < 10; s++) {
for (int k = 0; k < 10; k++) {
for (int z = 0; z < 10; z++) {
dedka = d * 10000 + e * 1000 + d * 100 + k * 10 + a;
babka = b * 10000 + a * 1000 + b * 100 + k * 10 + a;
repka = r * 10000 + e * 1000 + p * 100 + k * 10 + a;
skazka = s * 100000 + k * 10000 + a * 1000 + z * 100 + k * 10 + a;
if ((dedka + babka + repka == skazka) && (dedka > babka > repka)) {
cout << dedka << " + " << babka << " + " << repka << " = " << skazka << endl;
}
}
}
}
}
}
}
}
}
}
}
return 0;
}
for (int k = 0; k < 10; k++) {
for (int a = 0; a < 10; a++) {
for (int b = 0; b < 10; b++) {
for (int r = 0; r < 10; r++) {
for (int p = 0; p < 10; p++) {
for (int s = 0; s < 10; s++) {
for (int k = 0; k < 10; k++) {
int a = 0;
int k = 5;
for (int e = 4; e <= 9; e += 5) {
for (int s = 1; s <= 2; s += 1) {
for (int d = 3; d <= 9; d += 1) {
for (int b = max(2, 10 - d); b <= min(d - 1, 18 - d); b += 1) {
for (int r = max(1, 13 - d - b); r <= min(b - 1, 24 - d - b); r += 1) {
for (int p = 19 - d - b; p <= 9; p += 1) {