fb pixel

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
 
To check your solution you need to sign in
Sign in to continue