GCD and LCM X88616


Statement
 

pdf   zip

html
Public test cases
  • Input

    12
    36
    48
    84
    0
    

    Output

    12 = 2 x 2 x 3
    36 = 2 x 2 x 3 x 3
    48 = 2 x 2 x 2 x 2 x 3
    84 = 2 x 2 x 3 x 7
    The greatest common divisor is 2 x 2 x 3 = 12
    The least common multiples is 2 x 2 x 2 x 2 x 3 x 3 x 7 = 1008
    
  • Information
    Author
    HP Codewars BCN
    Language
    English
    Official solutions
    Python
    User solutions
    C++ Python