fork(1) download
  1. #include<iostream>
  2. #include<cmath>
  3. #include<cstdlib>
  4. using namespace std;
  5. int NWD(int a, int b)
  6. {
  7. int pom;
  8. while(b!=0)
  9. {
  10. pom = b;
  11. b = a%b;
  12. a = pom;
  13. }
  14. return a;
  15. }
  16. int main()
  17. {
  18. unsigned int a, b;
  19. cin>>a>>b;
  20. cout<<a/NWD(a, b)*b<<endl;
  21. return 0;
  22. }
Success #stdin #stdout 0s 3464KB
stdin
21344 865467
stdout
803153376