QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#502535 | #3259. Substring Characters | yundaehyuck | WA | 15ms | 10492kb | Python3 | 806b | 2024-08-03 09:25:04 | 2024-08-03 09:25:04 |
Judging History
answer
while 1:
try:
s = input()
p = set(s)
X = set()
n = len(s)
min_v = len(s)+10
for i in range(n):
for j in range(i,n):
if i == 0 and j >= n-1:
continue
t = s[i:j+1]
if set(t) == p:
if min_v > len(t):
min_v = len(t)
X.add(t)
count = 0
for x in X:
if len(x) == min_v:
count += 1
print(count)
except:
break
詳細信息
Test #1:
score: 0
Wrong Answer
time: 15ms
memory: 10492kb
input:
aabbabb abAB34aB3ba7 104001144 aaabcaaa a bb bd 1234567
output:
2 1 1 2 0 1 0 0
result:
wrong answer 3rd lines differ - expected: '3', found: '1'