Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/a-dan-b-gacha-kopaytma

Product from A to B

Easy 1000 ms 64 MB 26%
Share

Two integers $A$ and $B$ are given ($A \lt B$). Compute the product of all integers from $A$ to $B$:

$$P = A * (A + 1) * \dots * B$$

The product of the integers in the range

Input

One line with two integers: $A$ and $B$.

Output

One integer — the product.

Note

$1 \le A \lt B \le 10$

Examples

Input #1
1 5
Output #1
120
Input #2
2 6
Output #2
720

Sign in to submit a solution

Signing up is free and takes a minute.