logo AlgoBeat OnlineJudge
登录 注册

#209240. [SNCPC2019] Digit Product

内存限制:256 MiB 时间限制:1000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

Define the ''digit product'' of a positive integer as the product of all its digits. For example, , and .

Given two integers and , please calculate the following value:

In case that you don't know what represents, the above expression is the same as

输入格式

There are multiple test cases. The first line of the input contains an integer (about ), indicating the number of test cases. For each test case:

The first and only line contains two integers and (), indicating the given two integers. The integers are given without leading zeros.

输出格式

For each test case output one line containing one integer indicating the answer.

样例

样例输入 1

2
1 9
97 99

样例输出 1

362880
367416

数据范围与提示

For the first sample test case, the answer is .

For the second sample test case, the answer is .