P27776 [洛谷] Finding the Equation of a Linear Function
普及
题目描述

Problem Background

Resentment from doing math winter homework...

Problem Description

Given the coordinates of two integer points, find the equation of the line (linear function) that passes through them.

Input Format

The first line contains two integers $x_1, y_1$, representing the coordinates of the first point $(x_1, y_1)$.

The second line contains two integers $x_2, y_2$, representing the coordinates of the second point $(x_2, y_2)$.

Output Format

Output a single line, which is the equation of the function.

Sample Input and Output

Sample Input #1

3 6
2 4

Sample Output #1

y=2x

Sample Input #2

3 5
2 7

Sample Output #2

y=-2x+11

Sample Input #3

3 -1
5 -2

Sample Output #3

y=-1/2*x+1/2

Notes

$2x$ should be represented as 2x.

$\frac{1}{2}x$ should be represented as 1/2*x.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
3 6 2 4
样例输出
y=2x