Если один из корней уравнения x^2 - 13x + q = 0 равен 12, то другой корень можно найти с помощью формулы Виета:
x = -13/2 + (-13/2) * sqrt(1 + 4 * (-13/2) * q)
Подставляем значения:
x = -13/2 + (-13/2) * sqrt(1 + 4 * (-13/2) * q)
x = -13/2 + (-13/2) * sqrt(1 + 52 * q)
x = -13/2 + (-13/2) * sqrt(53 * q)
x = -13/2 - 13/2 * sqrt(q)
x = -13 * sqrt(q) / 2
Теперь найдем q:
q = (x + 13 * sqrt(q)) / (-13 * sqrt(q))
q = (-13 * sqrt(q) / 2 + 13 * sqrt(q)) / (-13 * sqrt(q))
q = 1 / (-2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))
q = -1 / (2 * sqrt(q))