s_id string | p_id string | u_id string | date string | language string | original_language string | filename_ext string | status string | cpu_time string | memory string | code_size string | code string | error string | stdout string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s191767555 | p02571 | u319589470 | 1598729050 | Python | Python (3.8.2) | py | Runtime Error | 58 | 9848 | 1495 | #!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**7)
import bisect
import heapq
import itertools
import math
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from math import gcd
from operator import add, itemgetter, mul, xor
def cmb(n,r,mod):
bunshi=... | Traceback (most recent call last):
File "/tmp/tmp_uolay_y/tmpjlftynl4.py", line 34, in <module>
s= input()
^^^^^^^
EOFError: EOF when reading a line
| |
s632407126 | p02571 | u902426510 | 1598729012 | Python | Python (3.8.2) | py | Runtime Error | 28 | 8900 | 653 | s = input()
t = input()
if t in s:
print(0)
else:
ans = 1000
for i in range(len(t)):
for j in range(len(s)):
if t[i] == s[j]:
if len(t) - i >= len(s) - j and i <= j:
k = i
l = j
cnt1 = 0
while k < len(t):
if t[k] != s[l]:
c... | File "/tmp/tmpc9jdnc0r/tmp7z4x6xbn.py", line 13
cnt1 = 0
^
IndentationError: unindent does not match any outer indentation level
| |
s817084666 | p02571 | u395356317 | 1598729012 | Python | Python (3.8.2) | py | Runtime Error | 73 | 9072 | 406 | s = list(input())
t = list(input())
max_length = 0
for i in range(len(t)):
for j in range(i, len(s)):
if t[i] == s[j]:
length = 0
for k in range(len(t)-i):
if t[i+k] == s[j+k]:
length += 1
else:
break
... | Traceback (most recent call last):
File "/tmp/tmpnwv6p9kz/tmp8azghvff.py", line 1, in <module>
s = list(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s097882077 | p02571 | u760760982 | 1598729011 | Python | Python (3.8.2) | py | Runtime Error | 63 | 9132 | 326 | s = input()
t = input()
ans = []
for i in range(len(s)-len(t)):
S = s[i:i+len(t)]
cnt = 0
for j in range(len(t)):
if t[j] == S[j]:
cnt += 1
ans.append(cnt)
a = ans.index(max(ans))
b = s[a:a+len(t)]
count = 0
for k in range(len(t)):
if t[k] != b[k]:
count += 1
print(count... | Traceback (most recent call last):
File "/tmp/tmpozc8mytb/tmpctkjn0in.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s251071835 | p02571 | u364693468 | 1598728977 | Python | PyPy3 (7.3.0) | py | Runtime Error | 250 | 69148 | 882 | import bisect, collections, copy, heapq, itertools, math, string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): r... | Traceback (most recent call last):
File "/tmp/tmplrf0x3mb/tmpeah1h076.py", line 37, in <module>
main()
File "/tmp/tmplrf0x3mb/tmpeah1h076.py", line 31, in main
ans = b - max(cnt_list)
^^^^^^^^^^^^^
ValueError: max() arg is an empty sequence
| |
s534808316 | p02571 | u959757057 | 1598728944 | Python | Python (3.8.2) | py | Runtime Error | 66 | 9052 | 225 | s = input()
t = input()
ratio = []
cnt = 0
for k in range(len(s) - len(t)):
for i in range(len(t)):
if s[i + k] == t[i]:
cnt += 1
ratio.append(cnt)
cnt = 0
res = len(t) - max(ratio)
print(res) | Traceback (most recent call last):
File "/tmp/tmp86u_pmoa/tmpi5isyvw1.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s683550751 | p02571 | u347502437 | 1598728899 | Python | Python (3.8.2) | py | Runtime Error | 52 | 9048 | 216 | S = input()
T = input()
D = []
for i in range(len(S) - len(T)):
SS = S[i:i+len(T)]
dif = 0
for j in range(len(T)):
if T[j] != SS[j]:
dif += 1
D += [dif]
print(min(D))
| Traceback (most recent call last):
File "/tmp/tmptqg14n_5/tmp4dtiboxe.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s045652635 | p02571 | u547608423 | 1598728898 | Python | Python (3.8.2) | py | Runtime Error | 1869 | 137912 | 337 | S = input()
T = input()
L = 0
judge = False
for i in range(len(T), 0, -1):
# print(i)
for j in range(len(T)-i+1):
print(S[j:])
if T[j:j+i] in S[j:]:
L = i
# print(T[j:j+i])
judge = True
# print(i, j)
break
if judge:
break
... | Traceback (most recent call last):
File "/tmp/tmpt78kqgqd/tmpgop80rvp.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s850442548 | p02571 | u962330718 | 1598728885 | Python | Python (3.8.2) | py | Runtime Error | 64 | 8924 | 176 | S=input()
T=input()
a=len(S)
b=len(T)
m=a-b
A=[]
for i in range(m):
cnt=b
for j in range(b):
if S[i+j]==T[j]:
cnt-=1
A.append(cnt)
print(min(A)) | Traceback (most recent call last):
File "/tmp/tmp_32td_gw/tmpi8jsg_09.py", line 1, in <module>
S=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s024772340 | p02571 | u990641144 | 1598728883 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9104 | 210 | #inp = list(map(int, input().split()))
S = input()
T = input()
tmp = []*len(T)
i=0
while i < len(T):
for j in range(i, len(T)-i):
if T[i:i+j+1] in S:
tmp[i] = j
i = tmp[i]
print(max(tmp)) | Traceback (most recent call last):
File "/tmp/tmpsp2i6_gc/tmprnp4xa71.py", line 2, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s959442194 | p02571 | u284120954 | 1598728878 | Python | Python (3.8.2) | py | Runtime Error | 59 | 9040 | 256 | S = input()
T = input()
Min = 100000
for i in range(len(S)):
if i + len(T) > len(S) - 1:
break
count = 0
for n in range(len(T)):
if S[i + n] != T[n]:
count += 1
if count < Min:
Min = count
print(count) | Traceback (most recent call last):
File "/tmp/tmptn_7bt6u/tmpc3gtn_2x.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s852926665 | p02571 | u745812846 | 1598728832 | Python | Python (3.8.2) | py | Runtime Error | 59 | 8924 | 240 | s = input()
t = input()
ans = 0
A = []
for i in range(len(s)-len(t)):
s_i = s[i:i+len(t)+1]
count = 0
for j in range(len(t)):
if s_i[j] == t[j]:
count += 1
A.append(count)
ans = len(t) - max(A)
print(ans) | Traceback (most recent call last):
File "/tmp/tmp03tkgfnc/tmp816cw_cx.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s678859483 | p02571 | u869955221 | 1598728823 | Python | Python (3.8.2) | py | Runtime Error | 31 | 9116 | 533 | import sys
s = input()
t = input()
j=0
maxa = 0
maxb = 0
if(len(t)==0):
print("0")
sys.exit(1)
for i in range(len(s)):
if(s[i]==t[j]):
j+=1
if(j==len(t)):
maxa = max(maxa,j)
break
else:
maxa = max(maxa,j)
j=0
j=len(t)-1
for i in range(len(s)-1,-1,-... | Traceback (most recent call last):
File "/tmp/tmpygzqqkd3/tmp4yx_mbes.py", line 2, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s846271619 | p02571 | u137346245 | 1598728806 | Python | Python (3.8.2) | py | Runtime Error | 71 | 9000 | 255 | S = list(input())
T = list(input())
O = list()
a = 0
for i in range (len(S) - len(T)):
b = 0
m = 0
for i in range (len(T)):
if S[b + a] != T[b]:
m = m + 1
b = b + 1
O.append(m)
a = a + 1
O.sort()
print(O[0]) | Traceback (most recent call last):
File "/tmp/tmp6m8zl5dc/tmptjcvykyr.py", line 1, in <module>
S = list(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s693828378 | p02571 | u040298438 | 1598728796 | Python | Python (3.8.2) | py | Runtime Error | 42 | 9048 | 131 | S = input()
T = input()
d = len(S) - len(T)
print(len(T) - max(sum(t == s for t, s in zip(T, S[i : i + d + 1])) for i in range(d))) | Traceback (most recent call last):
File "/tmp/tmpr8mgalv5/tmpb2ka_i2v.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s841204431 | p02571 | u347502437 | 1598728795 | Python | Python (3.8.2) | py | Runtime Error | 47 | 9124 | 215 | S = input()
T = input()
D = []
for i in range(len(S) - len(T)):
SS = S[i:i+len(T)]
dif = 0
for j in range(len(T)):
if T[j] != SS[j]:
dif += 1
D += [dif]
print(min(D)) | Traceback (most recent call last):
File "/tmp/tmp0q1ah81c/tmpqczaxn8e.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s842109956 | p02571 | u987846648 | 1598728792 | Python | PyPy3 (7.3.0) | py | Runtime Error | 86 | 68716 | 209 | s = input()
t = input()
ans = []
for i in range(len(s)-len(t)):
cnt = 0
for j in range(len(t)):
if t[j] != s[i+j]:
cnt += 1
ans.append(cnt)
cnt2 = min(ans)
print(cnt2)
| Traceback (most recent call last):
File "/tmp/tmpzl66287y/tmpcaojitb9.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s129230366 | p02571 | u961523950 | 1598728791 | Python | Python (3.8.2) | py | Runtime Error | 68 | 9060 | 338 | S = input()
T = input()
match = 0
match_list = list()
if T in S:
print(0)
else:
for i in range(len(T), len(S)):
match = 0
list_S = list(S[i-len(T):i])
list_T = list(T)
for j in range(len(T)):
if list_S[j] == list_T[j]:
match = match + 1
match_list.append(match)
print(len(T)-max(ma... | Traceback (most recent call last):
File "/tmp/tmpk5e3x16j/tmpt4x9soui.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s552182542 | p02571 | u113107956 | 1598728789 | Python | Python (3.8.2) | py | Runtime Error | 223 | 16564 | 220 | s=input()
t=input()
cnt=0
a=[]
for i in range(len(s)):
for l in range(len(t)):
if t[l]==s[i]:
cnt+=1
else:
a.append(cnt)
cnt=0
#print(*a)
print(len(t)-max(a)) | Traceback (most recent call last):
File "/tmp/tmpp9sphkwm/tmpnwz2qwnp.py", line 1, in <module>
s=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s228944389 | p02571 | u005569385 | 1598728771 | Python | Python (3.8.2) | py | Runtime Error | 97 | 9028 | 270 | S = input()
T = input()
s1 = list(S)
t1 = list(T)
a = len(s1); b = len(t1)
z = []
for i in range(a-b):
x = []
y = 0
for j in range(b):
x.append(s1[i+j])
for k in range(b):
if t1[k]==x[k]:
y += 1
z.append(y)
print(b-max(z)) | Traceback (most recent call last):
File "/tmp/tmpozcanq0h/tmpcu32aqy3.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s772472233 | p02571 | u427819770 | 1598728763 | Python | Python (3.8.2) | py | Runtime Error | 73 | 9112 | 222 | S = input()
T = input()
ans = [0 for i in range(len(S)-len(T))]
for i in range(len(S)-len(T)):
cnt = len(T)
for j in range(len(T)):
if S[i+j] == T[j]:
cnt -= 1
ans[i] = cnt
print(min(ans))
| Traceback (most recent call last):
File "/tmp/tmpbgc1bkrz/tmpho__nm2m.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s372310934 | p02571 | u364693468 | 1598728757 | Python | PyPy3 (7.3.0) | py | Runtime Error | 221 | 74856 | 889 | import bisect, collections, copy, heapq, itertools, math, string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): r... | Traceback (most recent call last):
File "/tmp/tmpt9_y5789/tmptlpmjdp4.py", line 37, in <module>
main()
File "/tmp/tmpt9_y5789/tmptlpmjdp4.py", line 31, in main
ans = b - max(cnt_list)
^^^^^^^^^^^^^
ValueError: max() arg is an empty sequence
| |
s777478526 | p02571 | u294000907 | 1598728740 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9012 | 119 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import Levenshtein
s=input()
t=input()
print(Levenshtein.distance(s,t))
| Traceback (most recent call last):
File "/tmp/tmppb3klhb6/tmpyyp_5ljn.py", line 3, in <module>
import Levenshtein
ModuleNotFoundError: No module named 'Levenshtein'
| |
s523229662 | p02571 | u356983865 | 1598728718 | Python | Python (3.8.2) | py | Runtime Error | 88 | 14624 | 507 | S = input()
T = input()
N = len(T)
count = 0
count_list = []
index_list = []
if len(S)-len(T) != 0:
for i in range(len(S)-N):
index_list.append(S[0+i:N+i])
for i in range(len(index_list)):
count = 0
for j in range(N):
if index_list[i][j] == T[j]:
count +=1... | Traceback (most recent call last):
File "/tmp/tmprnyp1fyj/tmpezv374yw.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s785793531 | p02571 | u002663801 | 1598728693 | Python | PyPy3 (7.3.0) | py | Runtime Error | 100 | 69160 | 418 | s = input()
t = input()
ans = len(t)
long = ans
for i in range(len(t)):
tc = t[i]
for j in range(0+i,len(s)):
if tc == s[j]:
count = 1
for k in range(1,len(t)-i):
if t[i+k] == s[j+k]:
count += 1
else:
if an... | Traceback (most recent call last):
File "/tmp/tmpl0ehoc9b/tmp808nw4rg.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s401474506 | p02571 | u213497190 | 1598728668 | Python | Python (3.8.2) | py | Runtime Error | 2096 | 137912 | 218 | s = input()
t = input()
max_len = 0
for i in range(len(t)):
for j in range(i, len(t)+1):
print(t[i:j])
if t[i:j] in s[i:len(s)-j+1]:
max_len = max(max_len, j-i)
print(len(t) - max_len) | Traceback (most recent call last):
File "/tmp/tmpo4_jec69/tmp9leuj552.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s379739589 | p02571 | u113107956 | 1598728661 | Python | Python (3.8.2) | py | Runtime Error | 230 | 16688 | 219 | s=input()
t=input()
cnt=0
a=[]
for i in range(len(t)):
for l in range(len(s)):
if t[i]==s[l]:
cnt+=1
else:
a.append(cnt)
cnt=0
#print(*a)
print(len(t)-max(a)) | Traceback (most recent call last):
File "/tmp/tmprj1fz43k/tmp4vqo7js8.py", line 1, in <module>
s=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s526092297 | p02571 | u185405877 | 1598728642 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8888 | 214 | s=input()
l=input()
len_s=len(s)
len_l=len(l)
a=len_s-len_l
ans=1001
for i in range(len_s-len_l+!):
cnt=0
for j in range(len_l):
if l[j]!=s[i+j]:
cnt+=1
ans=min(ans,cnt)
print(ans)
| File "/tmp/tmp5vp_83u5/tmp9_ey5cqp.py", line 7
for i in range(len_s-len_l+!):
^
SyntaxError: invalid syntax
| |
s888163908 | p02571 | u389737182 | 1598728633 | Python | Python (3.8.2) | py | Runtime Error | 55 | 9108 | 202 | s = input()
t = input()
i = 0
ans = []
while i < len(s) - len(t):
cnt = 0
for j in range(len(t)):
if s[i+j] != t[j]:
cnt += 1
ans.append(cnt)
i += 1
print(min(ans)) | Traceback (most recent call last):
File "/tmp/tmpqndq1_uo/tmprxt8ega3.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s997509767 | p02571 | u364693468 | 1598728626 | Python | PyPy3 (7.3.0) | py | Runtime Error | 130 | 69608 | 729 | import bisect, collections, copy, heapq, itertools, math, string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): r... | Traceback (most recent call last):
File "/tmp/tmplp00vq5c/tmpd55yfd46.py", line 29, in <module>
main()
File "/tmp/tmplp00vq5c/tmpd55yfd46.py", line 23, in main
ans = b - max(cnt_list)
^^^^^^^^^^^^^
ValueError: max() arg is an empty sequence
| |
s846952299 | p02571 | u658288444 | 1598728594 | Python | Python (3.8.2) | py | Runtime Error | 57 | 9064 | 283 | def resolve():
s = input()
t = input()
ls = len(s)
lt = len(t)
c = []
for i in range(ls - lt):
count = 0
for j in range(lt):
if s[i+j] == t[j]:
count += 1
c.append(count)
print(lt - max(c))
resolve() | Traceback (most recent call last):
File "/tmp/tmpziyzvxaw/tmpwrrno0fq.py", line 14, in <module>
resolve()
^^^^^^^^^
File "/tmp/tmpziyzvxaw/tmpwrrno0fq.py", line 2, in resolve
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s019251537 | p02571 | u756311765 | 1598728522 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9044 | 370 | S = input()
T = input()
minimum = 0
for i in range(len(S)):
m = 0
for j in range(len(T)):
if i + j == len(S):
break
else:
if S[i+j] != T[j]:
m += 1
if m == 0:
print(m)
else:
if minimum == 0:
minimum = m
elif:
... | File "/tmp/tmpifrfr_gy/tmp2big_ubo.py", line 17
elif:
^
SyntaxError: invalid syntax
| |
s794389450 | p02571 | u609561564 | 1598728508 | Python | Python (3.8.2) | py | Runtime Error | 2016 | 137900 | 222 | S=input()
T=input()
num_char=0
for i in range(len(T)):
for j in range(i+1,len(T)):
if T[i:j] in S[i:]:
print(T[i:j])
if num_char<j-i:
num_char=j-i
print(len(T)-num_char) | Traceback (most recent call last):
File "/tmp/tmpbp4bqrzx/tmpofhr3yx_.py", line 1, in <module>
S=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s056704599 | p02571 | u013864607 | 1598728505 | Python | Python (3.8.2) | py | Runtime Error | 191 | 27184 | 342 | import numpy as np
S=input()
T=input()
max_score = 0
for i in range(len(list(S))-len(list(T))):
tmp_T = np.array(list(T))
tmp_S = np.array(list(S))[i:i+len(tmp_T)]
score = np.zeros(len(tmp_T))
score[tmp_T==tmp_S]=1
score = np.sum(score)
if max_score < score:
max_score=score
print(int(l... | Traceback (most recent call last):
File "/tmp/tmpd61i3m5t/tmp5hmdii3a.py", line 3, in <module>
S=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s298871272 | p02571 | u360574092 | 1598728502 | Python | PyPy3 (7.3.0) | py | Runtime Error | 175 | 69516 | 179 | S = input()
T = input()
ans = 0
for i in range(len(S)):
tmp = 0
for j in range(len(T)):
if S[i + j] == T[j]:
tmp += 1
ans = max(ans, tmp)
print(len(T) - ans)
| Traceback (most recent call last):
File "/tmp/tmp58ul021k/tmpy5qtm0un.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s877572010 | p02571 | u665873062 | 1598728494 | Python | Python (3.8.2) | py | Runtime Error | 73 | 9056 | 231 | S = input()
T = input()
maxs = 0
for x in range(len(S)-len(T)+1):
for y in range(len(T)):
if T[y] == S[x+y]:
count += 1
else:
count = 0
maxs = max(count,maxs)
print(len(T)-maxs) | Traceback (most recent call last):
File "/tmp/tmpp4hlkk6h/tmpwuoe2qni.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s134191084 | p02571 | u605880635 | 1598728479 | Python | Python (3.8.2) | py | Runtime Error | 65 | 9112 | 315 | S = input()
T = input()
if T in S:
print("0")
else:
slen = len(S)
tlen = len(T)
ansCnt = tlen
for i in range(slen-tlen):
cnt = 0
for j in range(tlen):
if T[j]!=S[i+j]:
cnt += 1
if ansCnt>cnt:
ansCnt = cnt
print(ansCnt)
| Traceback (most recent call last):
File "/tmp/tmpsx5ls68v/tmpqp1t03kr.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s142899332 | p02571 | u034385994 | 1598728468 | Python | PyPy3 (7.3.0) | py | Runtime Error | 127 | 68676 | 173 | s = input()
t = input()
c = [0] * (len(s) - len(t))
for i in range(len(s) - len(t)):
for j in range(len(t)):
if s[i+j] == t[j]:
c[i] += 1
print(len(t)-max(c)) | Traceback (most recent call last):
File "/tmp/tmpdffift_z/tmpkma0iv97.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s216990051 | p02571 | u635621124 | 1598728458 | Python | Python (3.8.2) | py | Runtime Error | 56 | 9128 | 250 | import sys
list_a = []
S = input()
T = input()
if T in S:
print(0)
sys.exit()
for i in range(len(S) - len(T)):
cnt = 0
for j in range(len(T)):
if T[j] != S[i + j]:
cnt += 1
list_a.append(cnt)
print(min(list_a)) | Traceback (most recent call last):
File "/tmp/tmp3ib9qu_k/tmpxenv0o08.py", line 3, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s403192226 | p02571 | u595905528 | 1598728446 | Python | PyPy3 (7.3.0) | py | Runtime Error | 567 | 73080 | 617 | import sys
import bisect
import itertools
import collections
import fractions
import heapq
import math
from operator import mul
from functools import reduce
from functools import lru_cache
def solve():
readline = sys.stdin.buffer.readline
mod = 10 ** 9 + 7
S = input()
T = input()
numdic = [0]*(le... | Traceback (most recent call last):
File "/tmp/tmpwbei_fkx/tmpht0fl4a3.py", line 35, in <module>
solve()
File "/tmp/tmpwbei_fkx/tmpht0fl4a3.py", line 16, in solve
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s143018599 | p02571 | u257265865 | 1598728434 | Python | PyPy3 (7.3.0) | py | Runtime Error | 121 | 68728 | 177 | s=input()
t=input()
ans=[]
for i in range(len(s)-len(t)):
count=0
for j in range(len(t)):
if t[j]==s[i+j]:
count+=1
ans.append(count)
print(len(t)-max(ans))
| Traceback (most recent call last):
File "/tmp/tmpamylk6xe/tmpjbzch4zz.py", line 1, in <module>
s=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s428896100 | p02571 | u360574092 | 1598728423 | Python | PyPy3 (7.3.0) | py | Runtime Error | 145 | 69664 | 180 | S = input()
T = input()
ans = 0
for i in range(len(S)):
tmp = 0
for j in range(len(T)):
if S[i + j] == T[j]:
tmp += 1
ans = max(ans, tmp)
print(len(T) - ans)
| Traceback (most recent call last):
File "/tmp/tmpedf658ej/tmpev3l5g3i.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s795544345 | p02571 | u223555291 | 1598728410 | Python | Python (3.8.2) | py | Runtime Error | 59 | 9204 | 247 | s=input()
t=input()
a=0
b=[]
c=[]
for i in range(len(s)-len(t)):
b.append(s[i:len(t)+i])
for i in range(len(b)):
for j in range(len(b[i])):
if b[i][j]!=t[j]:
a+=1
c.append(a)
a=0
print(min(c))
| Traceback (most recent call last):
File "/tmp/tmpgqcn6d2y/tmpydovj05p.py", line 1, in <module>
s=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s261872238 | p02571 | u955691979 | 1598728405 | Python | PyPy3 (7.3.0) | py | Runtime Error | 80 | 69120 | 361 | s = input()
t = input()
s = list(s)
s.append("0")
t = list(t)
roop = len(s)-len(t)
cc = []
for i in range(roop):
c = 0
tmp = []
tmp = s[i:len(t)+1+i]
for i in range(len(t)):
if tmp[i] == t[i]:
c += 1
cc.append(c)
ma = max(cc)
a = cc.index(ma)
tmp = s[a:1+len(t)]
ans = 0
for i in range(len(t)):
i... | Traceback (most recent call last):
File "/tmp/tmpdd6iysxf/tmpaeuu5r1v.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s205490196 | p02571 | u869955221 | 1598728398 | Python | Python (3.8.2) | py | Runtime Error | 30 | 9084 | 328 | s = input()
t = input()
j=0
maxa = 0
maxb = 0
for i in range(len(s)):
if(s[i]==t[j]):
j+=1
else:
maxa = max(maxa,j)
j=0
j=len(t)-1
for i in range(len(s)-1,-1,-1):
if(s[i]==t[j]):
j-=1
else:
maxb = max(maxb,len(t)-1-j)
j=len(t)-1
print(min(len(t)-maxa,len(t... | Traceback (most recent call last):
File "/tmp/tmpvz501ra9/tmpdt5svu1d.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s775288928 | p02571 | u161164709 | 1598728361 | Python | PyPy3 (7.3.0) | py | Runtime Error | 87 | 68708 | 226 | import numpy as np
s = input()
t = input()
len_s = len(s)
len_t = len(t)
ma = 0
for i in range(len_s - len_t + 1):
ma = max(ma, np.sum(np.array(list(s[i: i + len_t])) == np.array(list(t))))
ans = len_t - ma
print(ans) | Traceback (most recent call last):
File "/tmp/tmpg2oao8kr/tmpu6dxtbga.py", line 3, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s586564805 | p02571 | u525796732 | 1598728319 | Python | Python (3.8.2) | py | Runtime Error | 66 | 10380 | 495 | import sys
import math
import fractions
from collections import defaultdict
stdin = sys.stdin
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))
S=list(ns())
T=list(ns())
INF=1... | Traceback (most recent call last):
File "/tmp/tmpeabguwcf/tmp90cduvbo.py", line 25, in <module>
print(tmp)
^^^
NameError: name 'tmp' is not defined
| |
s539306414 | p02571 | u755056246 | 1598728315 | Python | PyPy3 (7.3.0) | py | Runtime Error | 129 | 68716 | 208 | s = input()
t = input()
lent = len(t)
ans = []
for i in range(len(s) - lent):
ss = s[i:i+lent]
ans1 = 0
for s1, t1 in zip(ss, t):
ans1 += (s1==t1)
ans.append(ans1)
print(lent-max(ans)) | Traceback (most recent call last):
File "/tmp/tmp_kh6shpg/tmp_phk8hb6.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s196432477 | p02571 | u902426510 | 1598728291 | Python | Python (3.8.2) | py | Runtime Error | 138 | 9072 | 329 | s = input()
t = input()
if t in s:
print(0)
else:
ans = 1000
for i in range(len(t)):
for j in range(len(s)):
if t[i] == s[j]:
k = i
l = j
while k < len(t):
if t[k] != s[l]:
break
k += 1
l += 1
ans = min(ans, len(t) - k)
print(ans... | Traceback (most recent call last):
File "/tmp/tmpmabttx3g/tmpjluumz3h.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s472186515 | p02571 | u201382544 | 1598728291 | Python | Python (3.8.2) | py | Runtime Error | 57 | 9116 | 220 | s = list(str(input()))
t = list(str(input()))
l = []
count = 0
for i in range(len(s)-len(t)):
for j in range(len(t)):
if s[i+j] != t[j]:
count += 1
l.append(count)
count = 0
print(min(l)) | Traceback (most recent call last):
File "/tmp/tmpdtcpbarz/tmps791axzo.py", line 1, in <module>
s = list(str(input()))
^^^^^^^
EOFError: EOF when reading a line
| |
s645740840 | p02571 | u765590009 | 1598728262 | Python | Python (3.8.2) | py | Runtime Error | 61 | 9048 | 175 | s = input()
t = input()
a = []
for i in range(len(s)-len(t)):
count = 0
for j in range(len(t)):
if t[j] != s[j+i]:
count += 1
a.append(count)
print(min(a)) | Traceback (most recent call last):
File "/tmp/tmpkpdjd5qo/tmpdry9i9c9.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s427860801 | p02571 | u991542950 | 1598728260 | Python | PyPy3 (7.3.0) | py | Runtime Error | 129 | 68648 | 282 | import sys
input = sys.stdin.readline
S = input()
T = input()
score_list = []
diff = len(S) - len(T)
len_T = len(T)
for i in range(0, diff):
s = S[i:i+len_T]
score = sum([1 if s[i]==T[i] else 0 for i in range(len(s))])
score_list.append(score)
print(len_T - max(score_list))
| Traceback (most recent call last):
File "/tmp/tmp8_ygef2f/tmpd30qltl6.py", line 13, in <module>
print(len_T - max(score_list))
^^^^^^^^^^^^^^^
ValueError: max() arg is an empty sequence
| |
s198731837 | p02571 | u426513846 | 1598728257 | Python | PyPy3 (7.3.0) | py | Runtime Error | 160 | 68640 | 190 | s = input()
t = input()
i = 0
j = len(t)
m = j
while j < len(s):
count = 0
for k in range(i, j):
if s[k] == t[k]
count += 1
m = min(m, len(t) - count)
j += 1
i += 1 | File "/tmp/tmp03en4v6u/tmpiwykg4nq.py", line 11
if s[k] == t[k]
^
SyntaxError: expected ':'
| |
s972744741 | p02571 | u589783652 | 1598728242 | Python | PyPy3 (7.3.0) | py | Runtime Error | 151 | 68756 | 234 | S = input()
T = input()
for i in range(len(S) - len(T)):
count = 0
maxcount = 0
for j in range(len(T)):
if S[i + j] == T[j]:
count += 1
maxcount = max(maxcount, count)
print(len(T) - maxcount)
| Traceback (most recent call last):
File "/tmp/tmp10h3brtn/tmpm4_b3of6.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s486079855 | p02571 | u864090097 | 1598728242 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9056 | 167 | S = input()
T = input()
l = len(T)
for i in range (l):
if T[:l-i] in S:
ans = i
break
if T[i:] in S:
ans = i
break
print(ans) | Traceback (most recent call last):
File "/tmp/tmp9ifvyadn/tmp0iweok8_.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s525987214 | p02571 | u251075661 | 1598728227 | Python | Python (3.8.2) | py | Runtime Error | 50 | 9108 | 239 | s = input()
t = input()
counters = []
for i in range(len(s) - len(t)):
part_of_s = s[i: i + len(t)]
counter = 0
for sss, ttt in zip(part_of_s, t):
if sss != ttt:
counter += 1
counters.append(counter)
print(min(counters)) | Traceback (most recent call last):
File "/tmp/tmpgn4dl90a/tmpvbu42yic.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s447675074 | p02571 | u635621124 | 1598728205 | Python | Python (3.8.2) | py | Runtime Error | 58 | 9040 | 198 | list_ = []
S = input()
T = input()
for i in range(len(S) - len(T)):
cnt = 0
for j in range(len(T)):
if T[j] != S[i + j]:
cnt += 1
list_.append(cnt)
print(min(list_))
| Traceback (most recent call last):
File "/tmp/tmpmrorfc5m/tmp2njnv766.py", line 2, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s712653829 | p02571 | u771007149 | 1598728203 | Python | Python (3.8.2) | py | Runtime Error | 71 | 9044 | 211 | s = input()
t = input()
result = []
for i in range(len(s)-len(t)):
tmp = 0
for j in range(i,len(t)+i):
if s[j] == t[j-i]:
tmp += 1
result.append(tmp)
print(len(t)-max(result))
| Traceback (most recent call last):
File "/tmp/tmpg4fhs_pp/tmpuu0tml3v.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s952511567 | p02571 | u935139749 | 1598728190 | Python | Python (3.8.2) | py | Runtime Error | 345 | 9108 | 217 | s = input()
t = input()
cnt = 0
for ti in range(len(t)):
for si in range(len(s)):
if t[ti] == s[si]:
cnt += 1
ans = max(0,cnt)
else:
cnt = 0
print(len(t) - ans) | Traceback (most recent call last):
File "/tmp/tmp9cigg776/tmptwj5dkd4.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s718702212 | p02571 | u185405877 | 1598728176 | Python | Python (3.8.2) | py | Runtime Error | 31 | 9068 | 213 | s=input()
l=input()
len_s=len(s)
len_l=len(l)
a=len_s-len_l
ans=1001
for i in range(len_s-a):
cnt=0
for j in range(len_s):
if l[j]==s[i+j]:
cnt+=1
ans=min(ans,len_l-cnt)
print(ans) | Traceback (most recent call last):
File "/tmp/tmp3w1ekkoz/tmppmyxdgor.py", line 1, in <module>
s=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s942645213 | p02571 | u760569096 | 1598728166 | Python | PyPy3 (7.3.0) | py | Runtime Error | 186 | 68676 | 162 | s = input()
t = input()
g = []
for i in range(len(s)-len(t)):
n = 0
for j in range(len(t)):
if s[i+j]==t[j]:
n+=1
g.append(len(t)-n)
print(min(g)) | Traceback (most recent call last):
File "/tmp/tmp77zrnjvs/tmp53uopufz.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s384930188 | p02571 | u581403769 | 1598728160 | Python | Python (3.8.2) | py | Runtime Error | 22 | 9124 | 243 | s = list(input())
t = list(input())
ln = len(s)
lt = len(t)
n = ls - lt + 1
l = []
cnt = 0
for i in range(n):
for j in range(lt):
if t[j] != s[i + j]:
cnt += 1
l.append(cnt)
cnt = 0
print(min(l))
| Traceback (most recent call last):
File "/tmp/tmp6omzu9j0/tmpsdztw93n.py", line 1, in <module>
s = list(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s121197825 | p02571 | u491100219 | 1598728147 | Python | Python (3.8.2) | py | Runtime Error | 29 | 8940 | 493 | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
using namespace std;
using ll = long long;
const ll mod = (ll)1e9 + 7;
int main() {
string s, t;
cin >> s >> t;
int ans = INT_MAX;
rep(i, t.size()) {
for (int j = i; j < s.size() && t.size() - i <= s.size() - j; j++) {
if (... | File "/tmp/tmp4piggda8/tmp9kn4ts4r.py", line 3
using namespace std;
^^^^^^^^^
SyntaxError: invalid syntax
| |
s395042452 | p02571 | u190616335 | 1598728115 | Python | Python (3.8.2) | py | Runtime Error | 21 | 9008 | 303 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
s = input()
t = input()
min_count = 1000
for i in range(len(s) - len(t) + ):
count = 0
for j in range(len(t)):
if s[i+j] != t[j]:
count += 1
min_count = min(count, min_count)
if min_count == 0:
break
print(min_count) | File "/tmp/tmp7v1fnx0b/tmp2tsr3sjm.py", line 6
for i in range(len(s) - len(t) + ):
^
SyntaxError: invalid syntax
| |
s081809056 | p02571 | u259975636 | 1598728112 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9032 | 178 | s = input()
t = input()
q = []
for i in range(1,len(t)):
if t[:i] in s: q.append(i)
if len(q) == 0:
for j in t:
if j in s: q.append(len(t)-1)
print(min(q))
| Traceback (most recent call last):
File "/tmp/tmpuu2cteyg/tmplbis187n.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s387776953 | p02571 | u616382321 | 1598728094 | Python | Python (3.8.2) | py | Runtime Error | 61 | 9040 | 196 | S = input()
T = input()
l = len(T)
ans = []
for i in range(len(S)-l):
cnt = 0
for n in range(l):
if S[i+n] != T[n]:
cnt += 1
ans.append(cnt)
print(min(ans))
| Traceback (most recent call last):
File "/tmp/tmpkkr6q9hy/tmpba8cpn9a.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s343900211 | p02571 | u146066372 | 1598728090 | Python | PyPy3 (7.3.0) | py | Runtime Error | 99 | 68640 | 232 | s =input()
t =input()
S = len(s)
T = len(t)
cnt=0
max=0
for i in range(T):
for j in range(S-T):
if s[i+j] == t[j]:
cnt += 1
else:
if max<cnt:
max=cnt
cnt=0
print(T-max)
| Traceback (most recent call last):
File "/tmp/tmpjxvvc9rm/tmpa736xz1b.py", line 1, in <module>
s =input()
^^^^^^^
EOFError: EOF when reading a line
| |
s899126789 | p02571 | u998741086 | 1598728071 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8912 | 229 | #!/usr/bin/env python3
s = input()
t = input()
errors = []
for i in range(len(s)-len(t)+1):
error = 0
for j in range(len(t)):
if s[i+j] != t[j]:
error += 1
errors.append(error)
print(min(errors) | File "/tmp/tmpvs3qnmcw/tmpj3mbpnm1.py", line 13
print(min(errors)
^
SyntaxError: '(' was never closed
| |
s505532874 | p02571 | u842170774 | 1598728062 | Python | Python (3.8.2) | py | Runtime Error | 44 | 9120 | 214 | # B
S=input()
T=input()
def check(i,T):
ns=S[i:i+len(T)]
res=0
for i in range(len(T)):
if ns[i]!=T[i]:
res+=1
return res
print(min([check(i,T) for i in range(len(S)-len(T))])) | Traceback (most recent call last):
File "/tmp/tmp9v7t87xi/tmpey204a1q.py", line 3, in <module>
S=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s290715738 | p02571 | u755056246 | 1598728002 | Python | Python (3.8.2) | py | Runtime Error | 53 | 9108 | 208 | s = input()
t = input()
lent = len(t)
ans = []
for i in range(len(s) - lent):
ss = s[i:i+lent]
ans1 = 0
for s1, t1 in zip(ss, t):
ans1 += (s1==t1)
ans.append(ans1)
print(lent-max(ans)) | Traceback (most recent call last):
File "/tmp/tmpjrr3jddm/tmpzdjkku3w.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s481813095 | p02571 | u321605735 | 1598727999 | Python | Python (3.8.2) | py | Runtime Error | 60 | 8992 | 196 | S=list(input())
T=list(input())
ans_li=[]
for i in range(len(S)-len(T)):
ans=0
for j in range(len(T)):
if S[i+j]!=T[j]:
ans+=1
ans_li.append(ans)
print(min(ans_li)) | Traceback (most recent call last):
File "/tmp/tmpvgxrm7sc/tmp0mi5yyb2.py", line 1, in <module>
S=list(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s070806666 | p02571 | u157379742 | 1598727988 | Python | PyPy3 (7.3.0) | py | Runtime Error | 93 | 74756 | 1944 | import bisect
import sys,io
import math
from collections import deque
from heapq import heappush, heappop
input = sys.stdin.buffer.readline
def sRaw():
return input().rstrip("\r")
def iRaw():
return int(input())
def ssRaw():
return input().split()
def isRaw():
return list(map(int, ssRaw()))
INF... | Traceback (most recent call last):
File "/tmp/tmplpra0g2u/tmpdnej3cqx.py", line 109, in <module>
main()
File "/tmp/tmplpra0g2u/tmpdnej3cqx.py", line 101, in main
S= sRaw()
^^^^^^
File "/tmp/tmplpra0g2u/tmpdnej3cqx.py", line 10, in sRaw
return input().rstrip("\r")
^^^^^^^^^^^^^^^^^^^^... | |
s167294905 | p02571 | u991542950 | 1598727978 | Python | PyPy3 (7.3.0) | py | Runtime Error | 153 | 68664 | 255 | import sys
input = sys.stdin.readline
S = input()
T = input()
score_list = []
for i in range(0, len(S)-len(T)):
s = S[i:i+len(T)]
score = sum([1 if s[i]==T[i] else 0 for i in range(len(s))])
score_list.append(score)
print(len(T) - max(score_list)) | Traceback (most recent call last):
File "/tmp/tmp0l07o94g/tmpp558trl0.py", line 11, in <module>
print(len(T) - max(score_list))
^^^^^^^^^^^^^^^
ValueError: max() arg is an empty sequence
| |
s705423741 | p02571 | u371132735 | 1598727974 | Python | Python (3.8.2) | py | Runtime Error | 32 | 9032 | 156 | # abc177_b.py
S = input()
T = input()
for i in range(1,len(T)):
if T[0:i] in S:
continue
else:
ans = i
break
print(len(T)-i) | Traceback (most recent call last):
File "/tmp/tmpdo49crzj/tmp6b820hul.py", line 2, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s769790935 | p02571 | u722217673 | 1598727955 | Python | Python (3.8.2) | py | Runtime Error | 41 | 9100 | 175 | S = input()
T = input()
def diff(a, b):
return sum(aa != bb for aa, bb in zip(a, b))
answer = min( diff(S[i: i+len(T)], T) for i in range(len(S)-len(T)) )
print(answer)
| Traceback (most recent call last):
File "/tmp/tmp14ib782t/tmpk8sng3f1.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s733815849 | p02571 | u671211357 | 1598727940 | Python | Python (3.8.2) | py | Runtime Error | 53 | 9052 | 205 | S=input()
T=input()
cnt=[]
for i in range(len(S)-len(T)):
count=0
kari=S[i:i+len(T)]
for j in range(len(T)):
if kari[j]!=T[j]:
count+=1
cnt.append(count)
print(min(cnt)) | Traceback (most recent call last):
File "/tmp/tmpfxf80b0j/tmpg5z78mt8.py", line 1, in <module>
S=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s924536005 | p02571 | u216928054 | 1598727936 | Python | PyPy3 (7.3.0) | py | Runtime Error | 122 | 68568 | 1239 | #!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**6)
INF = 10 ** 9 + 1 # sys.maxsize # float("inf")
MOD = 10 ** 9 + 7
def debug(*x):
print(*x, file=sys.stderr)
def solve(S, T):
buf = []
for i in range(len(S) - len(T)):
diff = 0
for j in range(len(T)):
if S[i + j] !... | Traceback (most recent call last):
File "/tmp/tmp7midz_ou/tmpos8tu1ar.py", line 78, in <module>
main()
File "/tmp/tmp7midz_ou/tmpos8tu1ar.py", line 27, in main
print(solve(S, T))
^^^^^^^^^^^
File "/tmp/tmp7midz_ou/tmpos8tu1ar.py", line 20, in solve
return min(buf)
^^^^^^^^
ValueEr... | |
s364071269 | p02571 | u556589653 | 1598727919 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9156 | 86 | d,t,s = map(int,input().split())
if d <= s * t:
print("Yes")
else:
print("No") | Traceback (most recent call last):
File "/tmp/tmp42_qmdob/tmprjue8ev7.py", line 1, in <module>
d,t,s = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s293039623 | p02571 | u460229551 | 1598727876 | Python | Python (3.8.2) | py | Runtime Error | 73 | 9048 | 192 | s=input()
t=input()
anses=[]
for i in range(0,len(s)-len(t),1):
cnt=0
for j in range(len(t)):
if s[i+j]==t[j]:
cnt+=1
anses.append(cnt)
print(len(t)-max(anses)) | Traceback (most recent call last):
File "/tmp/tmp6k4o234a/tmpu5mj2vg0.py", line 1, in <module>
s=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s662194017 | p02571 | u530606147 | 1598727840 | Python | Python (3.8.2) | py | Runtime Error | 50 | 9040 | 187 | s = input()
t = input()
anses = []
for i in range(len(s) - len(t)):
cnt = 0
for c, d in zip(s[i:i + len(t)], t):
if c != d:
cnt += 1
anses.append(cnt)
print(min(anses))
| Traceback (most recent call last):
File "/tmp/tmpnlanw8hn/tmp_lupdrdu.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s322078003 | p02571 | u667024514 | 1598727804 | Python | PyPy3 (7.3.0) | py | Runtime Error | 137 | 69236 | 184 | s = str(input())
t = str(input())
ans = 10000
for i in range(len(s)-len(t)+1):
num = 0
for j in range(len(t)):
if s[i+j] != t[i]:
num += 1
ans = min(ans,num)
print(ans) | Traceback (most recent call last):
File "/tmp/tmporh_vhgc/tmpxjx_pf8i.py", line 1, in <module>
s = str(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s986261587 | p02572 | u921156673 | 1600686835 | Python | PyPy3 (7.3.0) | py | Runtime Error | 123 | 105360 | 224 | N = int(input())
A = list(map(int, input().split()))
assert len(A) == N
total = 0
sumA = []
for i,ai in enumerate(A):
sumA.append(sum(A[i+1]))
for i,ai in enumerate(A):
total += ai * sumA[i]
print(total % (10 ** 9 + 7)) | Traceback (most recent call last):
File "/tmp/tmp93z_t2k1/tmpsykul9pu.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s821567593 | p02572 | u921156673 | 1600686214 | Python | PyPy3 (7.3.0) | py | Runtime Error | 108 | 93760 | 144 | N = int(input())
A = map(int, input().split())
total = 0
for i in range(1, N+1):
for j in range(i, N+1):
total += A[i] * A[j]
print(total) | Traceback (most recent call last):
File "/tmp/tmpn2nbpfwv/tmp2f69lw1s.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s875865568 | p02572 | u754511616 | 1600676913 | Python | Python (3.8.2) | py | Runtime Error | 76 | 31712 | 152 | MOD=10**9+7
N=int(input())
A=list(map(int,input().split()))
S=sum(A)%MOD
ans=0
for x in A:
s-=x
s%=MOD
ans+=s*x
ans%=MOD
ans%=MOD
print(ans) | Traceback (most recent call last):
File "/tmp/tmptxj71ita/tmp864dlcd1.py", line 2, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s298983589 | p02572 | u282376189 | 1600654964 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8972 | 159 | N = int(input())
A = list(map(int,input().split()))
mod = 1000000000 + 7
add = 0
for i in range(N):
tmp = sum(A[i+1:N])
add += tmp * A[i]
print(add%mod | File "/tmp/tmpce3p02qp/tmp1gch7d5z.py", line 8
print(add%mod
^
SyntaxError: '(' was never closed
| |
s332514472 | p02572 | u196182810 | 1600646954 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 31648 | 267 | def SumOfProduct(n, arrayA):
ans = 0
for i in range(0, len(arrayA)):
for j in range(i + 1, len(arrayA)):
ans += arrayA[i] * arrayA[j]
print(ans)
n = int(input())
arrayA = list(map(int, input().split()))
SumOfProduct(n, arrayA)
print(a+b+c+d+e+f)
| Traceback (most recent call last):
File "/tmp/tmpowbzezhx/tmpqc0skpes.py", line 10, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s867048452 | p02572 | u696886537 | 1600621166 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9072 | 194 | f=open('in','r')
input=lambda:f.readline().strip()
n=int(input())
r=list(map(int,input().split()))
mod=1000000007
s=sum(r)%mod
x=0
for u in r:
x+=u**2
x%=mod
t=500000004
print((s**2-x)*t%mod) | Traceback (most recent call last):
File "/tmp/tmpco5hgchu/tmp7iizbbu4.py", line 1, in <module>
f=open('in','r')
^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'in'
| |
s548649484 | p02572 | u402492580 | 1600618090 | Python | Python (3.8.2) | py | Runtime Error | 71 | 31524 | 194 | N = int(input())
A = list(map(int, input().split()))
mod = 7 + 10**9
for i in A:
A[i] %= mod
for j in range(N-1):
for k in range(j+1, N):
t = A[j] * A[k]
ans += t
ans %= mod
print(ans) | Traceback (most recent call last):
File "/tmp/tmph1a64zsa/tmpzz00ymdn.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s053870738 | p02572 | u402492580 | 1600617539 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9104 | 252 | #N = int(input())
#A = list(map(int, input().split()))
n, a = input().split("\n")
N = int(n)
A = list(map(int, a.split()))
mod = 7 + 10**9
s = 0
for i in range(N-1):
for j in range(i+1, N):
t = A[i] * A[j] % mod
s += t
ans = s % mod
print(ans) | Traceback (most recent call last):
File "/tmp/tmp0upvwnqi/tmpeabmp27t.py", line 3, in <module>
n, a = input().split("\n")
^^^^^^^
EOFError: EOF when reading a line
| |
s001257226 | p02572 | u402492580 | 1600615033 | Python | Python (3.8.2) | py | Runtime Error | 72 | 31664 | 155 | N = int(input())
A = list(map(int, input().split()))
for i in range(N-1):
for j in range(i+1, N):
t = A[i]*A[j] % (10**9+7)
sum = sum(t)
print(sum) | Traceback (most recent call last):
File "/tmp/tmp78n2_3ay/tmpu83n_ceq.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s041538847 | p02572 | u402492580 | 1600614936 | Python | Python (3.8.2) | py | Runtime Error | 76 | 31736 | 150 | N = int(input())
A = list(map(int, input().split()))
for i in range(N-1) and j in range(i+1, N):
t = A[i]*A[j] % (10**9+7)
sum = sum(t)
print(sum) | Traceback (most recent call last):
File "/tmp/tmp3w8ss4yx/tmp8r67y7_e.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s400059268 | p02572 | u486209657 | 1600614457 | Python | Python (3.8.2) | py | Runtime Error | 664 | 924936 | 182 | import numpy as np
N=int(input())
A=np.array(list(map(int,input().split())))
L=len(str(max(A)))//4
A=A/10**L
x=np.sum(np.outer(A,A))-np.sum(A*A)
print(int(x/2*10**(2*L)%(10**9+7))) | Traceback (most recent call last):
File "/tmp/tmp2xfsieoa/tmpj6tq3lrt.py", line 3, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s199524566 | p02572 | u365838886 | 1600599563 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9076 | 699 | N, K = list(map(int, input().split()))
A = list(map(int, input().split()))
count = 0
stack = set()
visited = []
visited_set = set()
endf = False
current = 0
while True:
i = A[current]-1
visited_set.add(current)
visited.append(current)
if not i in visited_set:
current = i
count += 1
... | Traceback (most recent call last):
File "/tmp/tmp64sovm35/tmppycy79ne.py", line 1, in <module>
N, K = list(map(int, input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s755517211 | p02572 | u865383026 | 1600562444 | Python | Python (3.8.2) | py | Runtime Error | 1843 | 1933164 | 154 | import numpy as np
N = int(input())
A = list(map(int, input().split()))
print(np.sum(np.tril(np.outer(np.array(A), np.array(A)), k = -1)) % (10 ** 9 + 7)) | Traceback (most recent call last):
File "/tmp/tmpx71iq5xa/tmp8fq6rzlm.py", line 2, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s923534851 | p02572 | u365838886 | 1600555851 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 31604 | 147 | N = int(input())
A = list(map(int, input().split()))
s = 0
for i in range(N-1):
s += A[i]*sum(A[i+1:])
# answer = s % (10**9+7)
print(answer) | Traceback (most recent call last):
File "/tmp/tmprj_rtze9/tmpys6sqc18.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s951355625 | p02572 | u963963908 | 1600526063 | Python | Python (3.8.2) | py | Runtime Error | 71 | 31420 | 131 | N = int(input())
A = list(map(int,input().split()))
for i in range(1,N-1):
for j in range(i,N):
K = sum(A[i]*A[j])
print(K) | Traceback (most recent call last):
File "/tmp/tmpn2wwubwa/tmppnvbtya_.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s379822705 | p02572 | u849559474 | 1600375609 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8916 | 170 | n = int(input())
mod = 10 ** 9 + 7
import numpy as np
a = list(map(int, input().split())
s=0
ss=0
for i in range(n):
ss += a[i]%mod
s += ss * a[i] % mod
print(s)
| File "/tmp/tmp_a64lskw/tmpsysk92gd.py", line 4
a = list(map(int, input().split())
^
SyntaxError: '(' was never closed
| |
s291732569 | p02572 | u849559474 | 1600375566 | Python | Python (3.8.2) | py | Runtime Error | 21 | 8908 | 169 | n = int(input())
mod = 10 ** 9 + 7
import numpy as np
a = np.array(map(int, input().split())
s=0
ss=0
for i in range(n):
ss += a[i]%mod
s += ss * a[i] % mod
print(s) | File "/tmp/tmp16cdgw4x/tmpcwk2l84d.py", line 4
a = np.array(map(int, input().split())
^
SyntaxError: '(' was never closed
| |
s298496334 | p02572 | u849559474 | 1600375537 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9000 | 173 | n = int(input())
mod = 10 ** 9 + 7
import numpy as np
a = np.array(map(int, input().split())
s=0
ss=0
for i in range(n):
ss += a[i]%mod
s += ss * a[i] % mod
print(s) | File "/tmp/tmp__73ghm2/tmp7qvubmd1.py", line 4
a = np.array(map(int, input().split())
^
SyntaxError: '(' was never closed
| |
s990227349 | p02572 | u848097937 | 1600336293 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8896 | 1469 | //g++ -std=gnu++14 a.cpp
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <iostream>
#include <istream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <tuple>
#include <iomanip>
#include <random>
#inclu... | File "/tmp/tmpxgp2dcz9/tmpyykjjlft.py", line 28
ll INFL = 1LL << 60;
^
SyntaxError: invalid decimal literal
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.