2 solutions

  • 2
    @ 2025-12-4 13:21:35
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
        int a,b,c;cin>>a>>b>>c;
        int d=a*b/__gcd(a,b);
        cout<<c*d/__gcd(c,d);
        return 0;
    }
    
    • 2
      @ 2025-12-4 12:55:22
      #include<bits/stdc++.h>
      using namespace std;
      int main(){
          int a,b,c;cin>>a>>b>>c;
          for(int i=1;;i++)
              if(i%a==0&&i%b==0&&i%c==0){cout<<i;return 0;}
          return 0;
      }
      
      • 1

      Information

      ID
      705
      Time
      1000ms
      Memory
      128MiB
      Difficulty
      4
      Tags
      # Submissions
      45
      Accepted
      21
      Uploaded By