Josif_tepe

Untitled

Dec 6th, 2025
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main(){
  4.     int m,n,nzs;
  5.     cin>>m>>n;
  6.    
  7.     for( int i=1;i<=m*n;i++){
  8.        
  9.        if(i%m==0 and i%n==0){
  10.            nzs=i;
  11.            break;
  12.        }
  13.        
  14.     }
  15.     cout<<nzs<<endl;
  16.     return 0;
  17. }
  18.  
  19.  
  20.  
  21.  
Advertisement
Add Comment
Please, Sign In to add comment