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 = 56
  8. y = 98
  9.  
  10. # Wywołanie funkcji i wyświetlenie wyniku
  11. print(f"NWD({x}, {y}) = {euklides(x, y)}")
  12.  
Success #stdin #stdout 0.09s 14132KB
stdin
Standard input is empty
stdout
NWD(56, 98) = 14