以下結果是TLE(3s),這代表什麼意思?為什麼會這樣?
#input
sForm = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
lInp = []
import sys
def count(str):
#count 字母的位置
for i in str :
iInp = sForm.index(i)
#print(i,iInp)
lInp.append(iInp)
#print(lInp)
#count distance
k = 1
while k < len(lInp) :
iDist =lInp[k] - lInp[k-1]
if iDist < 0:
iDist = -iDist
print(iDist, end ="")
k += 1
print("")
return
#process
while True:
lInp = []
sInp0 = sys.stdin.readline()
sInp = sInp0.replace('\r','').replace('\n','')
if (len(sInp) == 7):
count(sInp)