Advertisement
Patey

Untitled

Jun 20th, 2020
910
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.70 KB | None | 0 0
  1. #include<iostream>
  2. #include<fstream>
  3. using namespace std;
  4. ofstream g("bac.out");
  5. int p1,p2,d,x,y,z,i,d2,n=0;
  6. int main()
  7. {
  8.     cin>>p1;
  9.     cin>>p2;
  10.     for(d=2;d<=p1/2;d++)
  11.     {
  12.         if(p1%d==0)
  13.         {
  14.             x=0;
  15.             x=d*10+(p1/d);
  16.             for(i=0;i<=9;i++)
  17.             {
  18.                 y=0;
  19.                 y=(y+i)*100+(y+i)*10+i;
  20.                 for(d2=2;d2<=p2/2;d2++)
  21.                 {
  22.                     if(p2%d2==0)
  23.                     {
  24.                     z=0;
  25.                     z=d2*10+(p2/d2);
  26.                     n=x*100000+y*100+z;
  27.                     cout<<n<<endl;
  28.                     }
  29.                 }
  30.             }
  31.  
  32.         }
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement