Initializing an Inventory Grid
Riverbend Supply is fitting out a new warehouse aisle. The stock system needs a blank count sheet in place before the first delivery arrives: one slot per storage bin, laid out as a grid of rows and columns, with every count starting at zero. Before the sheet goes live, the fitter checks two things on screen — that the grid came out the shape that was ordered, and how many bins that adds up to.
Task: Print the grid's shape, then the total number of bins it holds.
Input
One line holding two whole numbers separated by a single space: the number of rows, then the number of columns. Both are at least 1.
Output
Two lines. The first holds the row count and the column count, in that order, separated by a single space, with no brackets and no commas. The second holds the total number of bins, as one whole number.
Example:
Input:
3 4
Output:
3 4
12
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