Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- ofstream fout("bac.out");
- int main() {
- int p1, p2;
- cin >> p1 >> p2;
- for (int i = 1; i < 10; i++) {
- if (p1 % i == 0 && p1 / i < 10) {
- for (int j = 1; j < 10; j++) {
- if (p2 % j == 0 && p2 / i < 10) {
- for (int k = 0; k < 10; k++) {
- fout << i << p1 / i << k << k << k << j << p2 / j << endl;
- }
- }
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement