fork download
  1. def euklides(a, b):
  2. while b != 0:
  3. a, b = b, a % b
  4. return a
  5.  
  6. # Przykładowe wartości
  7. x = 15
  8. y = 60
  9.  
  10. # Wywołanie funkcji i wyświetlenie wyniku
  11. print(f"NWD({x}, {y}) = {euklides(x, y)}")
  12.  
Success #stdin #stdout 0.13s 13864KB
stdin
Standard input is empty
stdout
NWD(15, 60) = 15