# Код на ruby 2.2.3p173
def zadanie(a, b, c, d)
return a + b + c - d
end
# Примеры применения
p zadanie(2, 2, 2, 4)
p zadanie(0, 0, 6, 4)
# ===============================================
# Код на ruby 2.2.3p173
def zadanie(a1, b1, a2, b2, a3, b3)
basket_with_berries1 = a1
basket_with_berries2 = b1
basket1 = a3
basket2 = b2
return basket_with_berries1 - basket1, basket_with_berries2 - basket2
end
# Примеры применения
p zadanie(1,2,2,1,0,3)