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
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

To check your solution you need to sign in
Sign in to continue