All problems

Building an Evenly-Spaced Price Ladder

easyPythonNumPyArray Creation

Riverbend Supply prices its bulk trays as a ladder: a base price for the smallest tray, then a fixed amount more for every size up from there. Sales staff want the whole ladder printed on the quote sheet instead of working the sizes out in their heads. The three numbers that define a ladder change from product to product, so the sheet is generated fresh each time.

Task: Print every price on the ladder, starting from the base price.

Input

One line holding three values separated by single spaces: the base price, the amount each step adds, and how many prices the ladder has. The first two may be decimals; the third is a whole number and is at least 1.

Output

One line holding exactly that many prices, separated by single spaces, smallest first. Write each with two digits after the decimal point. The base price itself is the first price on the ladder.

Example:

Input:
10 5 4

Output:
10.00 15.00 20.00 25.00

Sign in to solve this problem

Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.

Sign in

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…