Advertisement
STANAANDREY

bacT15 sIII 3

May 28th, 2021
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. using namespace std;
  4. ofstream fout("bac.out");
  5.  
  6. int main() {
  7. int p1, p2;
  8. cin >> p1 >> p2;
  9. for (int i = 1; i < 10; i++) {
  10. if (p1 % i == 0 && p1 / i < 10) {
  11. for (int j = 1; j < 10; j++) {
  12. if (p2 % j == 0 && p2 / i < 10) {
  13. for (int k = 0; k < 10; k++) {
  14. fout << i << p1 / i << k << k << k << j << p2 / j << endl;
  15. }
  16. }
  17. }
  18. }
  19. }
  20. return 0;
  21. }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement