python3A题真爽啊~

P1591 阶乘数码

缥缈的鸿影 @ 2019-02-17 00:00:24

rt,竞赛要是支持python该多好啊…………

import re
t = int(input())
while t:
    s = input()
    s1 = re.split(' ', s)
    n = int(s1[0])
    m = int(s1[1])
    x = 1
    ans = 0
    while n:
        x *= n
        n -= 1
    x = str(x)
    l = len(x)
    for i in range(l):
        if(int(x[i]) == m) :
            ans+=1
    print(ans)
    t -= 1

by FP·荷兰猪 @ 2019-02-17 00:01:19

@爱吃肉的瓶子 这题其实可以不动用Python的


by dead_X @ 2019-02-17 00:21:01

€€£:C++允许STL!

P党:WTF?

€€£:允许Python3!

C党,P党:WTF?


by SSerxhs @ 2019-02-17 00:41:44

@dead_X 不允许stl也可以把stl代码贴过去啊...没什么区别吧


by Jelly_Goat @ 2019-02-17 06:28:49

@dead_X
太真实了吧...... 好习惯是先拿c++ AC一遍再py 3


by 龙之吻—水货 @ 2019-02-17 07:57:34

@dead_X

€€£:Python3与其他语言时限一样!

Python党:WTF?


by jyttoby @ 2019-02-17 08:15:57

@SSerxhs 请注意他说的是只能使用某些头文件


by SSerxhs @ 2019-02-17 12:20:27

@jyttoby 没错啊,但是本地一般都有stl源码啊,贴过去不就好了


by jyttoby @ 2019-02-17 13:19:11

@SSerxhs stl源码里面别的头文件更多


by jyttoby @ 2019-02-17 13:19:44

(除非你有时间dfs出来最底层的)


|