fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int i,j,m,n;
  7. cin>>m;
  8. cin>>n;
  9. for(i=1;i<=n*m;i++){
  10. j=1;
  11. for(j=1;j<=n*m;j++){
  12. if(j*n==i*m) cout<<i*m;
  13. }
  14. }
  15. return 0;
  16. }
Success #stdin #stdout 0.01s 5320KB
stdin
4
6
stdout
1224364860728496