image.png

    1. #include <iostream>
    2. using namespace std;
    3. int main()
    4. {
    5. int num_1,num_2;
    6. int num_times;
    7. int times = 1;
    8. cin>>num_1>>num_2;
    9. while(1)
    10. {
    11. num_times=num_1*times;
    12. if(num_times%num_1==0 && num_times%num_2==0)
    13. break;
    14. times++;
    15. }
    16. cout<<num_times<<endl;
    17. }