INPUT "skorost x"; x1
INPUT "y"; y
x2 = x1 + y
INPUT "vvedite rasstoynie"; s
IF x1 <> x2 THEN
t1 = s / x1
t2 = s / x2
IF t1 < t2 THEN PRINT "1 masina:"; t2 - t1 ELSE PRINT "2 masina:"; t1 - t2
ELSE
PRINT "odnovremenno"
END IF
INPUT "skorost x"; x1
INPUT "y"; y
x2 = x1 + y
INPUT "vvedite rasstoynie"; s
IF x1 <> x2 THEN
t1 = s / x1
t2 = s / x2
IF t1 < t2 THEN PRINT "1 masina:"; t2 - t1 ELSE PRINT "2 masina:"; t1 - t2
ELSE
PRINT "odnovremenno"
END IF