b01d9fbda0
删除了一些不明所以的 Cplus 项目
38 lines
852 B
C++
38 lines
852 B
C++
/*
|
|
* Function: 算法 实验 三
|
|
* Date: 2024 06 01
|
|
* Code by JRNitre
|
|
* */
|
|
|
|
#include <iostream>
|
|
using namespace std;
|
|
|
|
int main() {
|
|
|
|
int A = 0;
|
|
int B = 0;
|
|
int C = 0;
|
|
int D = 0;
|
|
int E = 0;
|
|
|
|
int sum_1;
|
|
int sum_2;
|
|
|
|
for (A = 1; A <= 9; A++){
|
|
for (B = 1; B <= 9; B++){
|
|
for (C = 1; C <= 9; C++){
|
|
for (D = 1; D <= 9; D++){
|
|
for (E = 1; E <= 9; E++){
|
|
sum_1 = A * 1000 + B * 100 + C * 10 + D;
|
|
sum_2 = D * 1000 + C * 100 + B * 10 + A;
|
|
if (sum_1 * E == sum_2) {
|
|
cout << "A: " << A << " - B: " << B << " - C: " << C << " - D: " << D << " - E: " << E << endl;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return 0;
|
|
}
|