D. 模糊的数

    Type: Default 1000ms 256MiB

模糊的数

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

AliceAlice写了一个十进制数 AA,不过呢有些字迹已经看不清楚了(看不清楚的地方用 ? 代替),现在给定一个和AA具有相同位数的十进制数 BBAliceAlice想知道有多少种可能使得 A>BA>B

Format

Input

第一行为正整数 t(100)t(≤100),表示数据组数;

每组数据中,第一行为一个16位以内的十进制数 AA, 当中有若干个 ?

一个和AA具有相同位数的十进制数 BB

Output

每组数据输出一行,表示 A>BA>B 的可能方案数。

Samples

输入样例
1
36?1?8
236428
输出样例
100

Limitation

1s, 1024KiB for each test case.

20250304基础测试

Not Attended
Status
Done
Rule
IOI
Problem
5
Start at
2025-4-2 16:15
End at
2025-4-2 18:15
Duration
2 hour(s)
Host
Partic.
22