Hide

Problem B
Búðarkassi 2

Languages en is

Snædís just got her first job! She works at a register in a large store and now a row of customers are waiting to pay for their wares. Each customer brings a slew of wares and Snædís needs to calculate the total cost for each customers. Each ware has some particular cost and sometimes customers purchase several identical items, then Snædís has to multiply the cost of one item by the number of items bought.

Despite Snædís being very good at math she’d appreciate some help in calculating these total costs to speed things along. Can you help?

Input

The first line contains two integers, $N$ and $K$, separated by spaces. $N$ denotes the number of items the customer is purchasing and $K$ is the cost of a single item.

Output

One line containing the total cost.

Explanation of Sample Inputs

In the first sample the customer intends to buy $10$ items all costing $13$ each. Thus the total cost is $10 \times 13 = 130$.

Scoring

The solution will be tested on differently hard input data and the data is divided into groups as shown in the table below. The solution will then be scored according to how many groups are solved.

Group

Points

Constraints

1

40

$ 1 \le N,K \le 1\, 000$

2

60

$ 1 \le N,K \le 10^5$

Sample Input 1 Sample Output 1
10 13
130
Sample Input 2 Sample Output 2
7 6
42
Sample Input 3 Sample Output 3
100000 100000
10000000000

Please log in to submit a solution to this problem

Log in