1 solutions

  • 0
    @ 2025-12-3 16:15:30

    C++ :

    #include <iostream>
    using namespace std;
    int a,b,x;
    int main()
    {
    	cin>>a>>b;
    	for (x=1; ; x++)
    	{
    		if (x%a==0 && x%b==0)
    		   break;
    	}
    	cout<<x;
    	return 0;
    }
    
    • 1

    Information

    ID
    837
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    10
    Tags
    # Submissions
    5
    Accepted
    5
    Uploaded By