Key_Angus_23 @ 2021-04-15 14:05:05
# 输入行数
t = int(input())
# 输入指定函数的数据为列表,每行相当于一个元素
s = [input() for i in range(t)]
n = 1 # 计数
jc = [] # 阶乘列表
l = [] # 暂存列表
a = [] # 数码a
# 拆分输入
for i in s:
l.append(str(i).split(' '))
# 计算阶乘
for i in l:
for j in range(1, int(i[0])+1):
n *= j
jc.append(n)
n = 1
a.append(i[1])
l = []
n = 0
# 拆分阶乘
for i in range(t):
l = list(str(jc[i]))
for j in l:
if a[i] == j:
n += 1
print(n)
n = 0
by _Emiria_ @ 2021-04-15 14:25:04
我帮你在pycharm上跑了下,是对的啊
by _Emiria_ @ 2021-04-15 14:26:05
py水高精是真快乐
by Key_Angus_23 @ 2021-04-15 14:36:48
@蒟蒻且网抑fks 我也觉得很奇怪呀。。。
by _Emiria_ @ 2021-04-15 14:43:18
@Key_Angus_23 报的错全是 read 0