Determine the value placed at a given row and column of a 5-row multiplication table with a column-dependent offset.
A. Table
gfgTable
You are given two integers and representing a position in a table with 5 rows. The value in row and column is formed using a simple arithmetic rule based on the row number and the column number.
For the requested cell, compute and print the table value directly.
The task is straightforward and is meant to test careful implementation of a small formula rather than advanced algorithms.
Input Format
- A single line contains two integers and .
- They describe the requested cell in the table.
Output Format
- Print one integer: the value of the table at position .
Constraints
(These are sufficient for the direct formula-based solution.)
Example 1
Input
3 4
Output
12
Explanation
Using the table rule, the value at row 3 and column 4 is 12.
Premium problem context
Unlock deeper context for this problem
Premium adds guided hints, editorial links, similar variants, discussion resources, and concept maps so you can understand why a problem matters, not just solve it once.