2039. Cow Multiplication

单点时限: 2.0 sec

内存限制: 256 MB

Bessie is tired of multiplying pairs of numbers the usual way, so she invented her own style of multiplication. In her style, AB is equal to the sum of all possible pairwise products between the digits of A and B. For example, the product 12345 is equal to 1*4

  • 15 + 24 + 25 + 34 + 35 = 54. Given two integers A and B (1 <= A, B <= 1,000,000,000), determine AB in Bessie’s style of multiplication.

输入格式

  • Line 1: Two space-separated integers: A and B.

输出格式

  • Line 1: A single line that is the A*B in Bessie’s style of multiplication.

样例

Input
123 45
INPUT DETAILS:
The two numbers are 123 and 45.
Output
54

85 人解决,116 人已尝试。

98 份提交通过,共有 157 份提交。

3.0 EMB 奖励。

创建: 16 年,3 月前.

修改: 6 年,9 月前.

最后提交: 4 月,2 周前.

来源: USACO

题目标签