GCD X63747


Statement
 

pdf   zip

html

Write a program that, given two different positive integers, prints their GCD.

Input

Input consists of a two positive integers. Including the zero.

Output

The GCD.

Information about the checker

You can print the solutions to this exercise in any order.

Public test cases
  • Input

    0
    3
    
    

    Output

    The GCD of 0 and 3 
  • Input

    10
    0
    
    

    Output

    The GCD of 10 and 0 
  • Input

    0
    0
    
    

    Output

    The GCD of 0 and 0 
  • Input

    12
    1
    
    

    Output

    The GCD of 12 and 1 is 1
    
  • Input

    12
    36
    
    

    Output

    The GCD of 12 and 36 is 12
    
  • Information
    Author
    Language
    English
    Official solutions
    C++
    User solutions