[Offer收割]编程练习赛73 register

Ended

Participants:99

Verdict:Runtime Error
Score:0 / 100
Submitted:2018-08-19 13:11:32

Lang:Python2

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import re
def check_is_good(num,str):
    total_list = []
    count = 0
    length = len(num)
    for i in range(length-1):
        total = num[i]
        for j in range(length):
            #tmp = num[i]+num[j]
            #total_list.append(tmp)
            total += num[j]
            total_list.append(total)
    total_list = list(set(total_list))
    if len(total_list)!=0:
        for item in total_list:
            if item.find(str)!=-1:
                count+=1
    if count==1:
        return count
    else:
        return 0
if __name__ == '__main__':
    n,s = input().split(' ')
    n = int(n)
    maxs = ''
    num = '9'
    for i in range(n):
        maxs +=num
    maxs = int(maxs)
    total_count = 0
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX