#P1591. 阶乘数码
阶乘数码
Description
Find how many times a certain digit appears in .
Input Format
The first line contains (), indicating the number of test cases.
Each of the next lines contains a positive integer () and a digit .
Output Format
For each test case, output a single integer, the number of times appears in .
2
5 2
7 0
1
2
Hint
Translated by ChatGPT 5
京公网安备 11011102002149号