Skip to content
Snippets Groups Projects
Select Git revision
  • 4b0a40cb710e4aff7e4570af23c53ff2a05b0df2
  • master default
  • zs2021
  • zs1920
4 results

TODO

Blame
  • euklides-modulici.py 245 B
    #!/usr/bin/env python3
    # Největší společný dělitel: Euklidův algoritmus s modulem
    
    x = int(input())
    y = int(input())
    
    while x > 0 and y > 0:
        if x > y:
            x %= y
        else:
            y %= x
    
    if x > 0:
        print(x)
    else:
        print(y)