Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
183 views
in Technique[技术] by (71.8m points)

python 3.x - How can I reduce runtime?

Is there any who help me to solve that(https://codeforces.com/problemset/problem/1325/B) problem with python..my code is given below but with a runtime error?

n_case=int(input())

for i in range(n_case):

n_arr=int(input())
empty=[]
l=0
for j in range(1):
    taking_eli=list(map(int,input().split()))
    l+=len(taking_eli)
    empty+=taking_eli
mul=empty*l
get_distinc=set(mul)
print(len(get_distinc))

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...