P2026 Find the Analytic Expression of a Linear Function
Background
Resentment from doing winter vacation math homework.
Description
Given the coordinates of two lattice points, find the function expression of the line they determine (a linear function).
Input Format
The first line contains two integers $x_1, y_1$, indicating that the coordinates of the first lattice point are $(x_1, y_1)$.
The second line contains two integers $x_2, y_2$, indicating that the coordinates of the second lattice point are $(x_2, y_2)$.
Output Format
Output a single line, which is the function expression.
Explanation/Hint
$2 x$ is written as `2x`.
$\frac{1}{2}x$ is written as `1/2*x`.
Translated by ChatGPT 5