Line equation
An equation of a line can be represented as . As it’s quite tedious to calculate
y
for each and every x
, you are asked to write a program to do that calculation.![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F7ca9436a-1dc8-49e8-9d7d-e03689d14c3c%2FScreen_Shot_2022-04-10_at_7.03.55_PM.png?table=block&id=85cf3f1a-632d-4218-94f4-b6f5005d79c0&cache=v2)
The first 3 lines of the input represent
k
, x
, and b
. Print the corresponding y
in the output.Input | Output |
10
0
5 | 5 |
1
-5
-3 | -8 |
Constraints
Time limit: 2 seconds
Memory limit: 512 MB
Output limit: 1 MB