fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. long nod (int a, int b) {
  6. return b == 0 ? a : nod (b, a % b);
  7. }
  8.  
  9. int main() {
  10. int t1, t2;
  11. cin >> t1 >> t2;
  12. cout << t1 * (t2 / nod (t1, t2));
  13. return 0;
  14. }
Success #stdin #stdout 0s 4976KB
stdin
100000000 150000000
stdout
300000000