#JSUTFPC2025F. Solving Equations I —— 解方程 I
Solving Equations I —— 解方程 I
Statement
Given an equation of the form or , provide and attempt to solve for .
Ensure that the values of appearing are all positive integers, and guarantee that the solution is also an integer.
Input
A string in the format y=kx+b or y=kx-b, where the corresponding mathematical formulas or satisfy
Output
Output an integer , representing the solution to the equation, ensuring that the result is always an integer.
Samples
3=1x+0
3
5=6x+5
0
87=15x-3
6