Advertisement
aimon1337

Untitled

May 25th, 2021
944
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. ofstream fout{"bac.out"};
  4. int main(){
  5.     unsigned int p1,p2,i,j;
  6.     cin >> p1 >> p2;
  7.     for(i = 1; i <= 9; ++i){
  8.         if(p1%i == 0 && p1/i <= 9){
  9.             for(j = 1; j<=9; ++j){
  10.                 if(p2%j == 0 && p2/j <= 9){
  11.                     fout<<i<<p1/i<<"000"<<p2/j<<j<<endl;
  12.                 }
  13.             }
  14.         }
  15.     }
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement