14 lines
269 B
Python
14 lines
269 B
Python
from utils import AlgoContext, Int
|
|
|
|
ctx = AlgoContext()
|
|
x = Int(int(input("Erste Zahl: ")), ctx)
|
|
y = Int(int(input("Zweite Zahl: ")), ctx)
|
|
|
|
while x > 0:
|
|
if x < y:
|
|
x, y = y, x
|
|
x -= y
|
|
print(y)
|
|
|
|
print(f"Insgesamt gab es {ctx.subtractions} Subtraktionen.")
|