#P2026. 求一次函数解析式
求一次函数解析式
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 , indicating that the coordinates of the first lattice point are .
The second line contains two integers , indicating that the coordinates of the second lattice point are .
Output Format
Output a single line, which is the function expression.
3 6
2 4
y=2x
3 5
2 7
y=-2x+11
3 -1
5 -2
y=-1/2*x+1/2
Hint
is written as 2x.
is written as 1/2*x.
Translated by ChatGPT 5
京公网安备 11011102002149号