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
s000522175
p02571
u945342410
1598731129
Python
Python (3.8.2)
py
Runtime Error
26
9004
467
sList = list(input()) tList = list(inout()) numList = [] for ti,t in enumerate(tList): num = 0 for si,s in enumerate(sList): tnum = ti snum = si while tList[tnum] == sList[snum]: num += 1 tnum += 1 snum += 1 if tnum >= len(tList): break if snum >= len(sList): break numL...
Traceback (most recent call last): File "/tmp/tmpohcew273/tmpkasq7bim.py", line 1, in <module> sList = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s789325423
p02571
u231570044
1598731092
Python
Python (3.8.2)
py
Runtime Error
699
137936
263
S = input() T = input() for i in range(len(T), 0, -1): for j in range(len(T)-i+1): subst = T[j:i+j] print(subst) if S.find(subst, j, len(S)-(len(T)-i-j))>=0: print (len(T)-i) # print(subst) exit(0)
Traceback (most recent call last): File "/tmp/tmpud9tepfc/tmpdbriht81.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s776769022
p02571
u885315507
1598731065
Python
Python (3.8.2)
py
Runtime Error
69
8884
207
S = input() T = input() L = len(S) l = len(T) r = [] for i in range(L - l): x = 0 for k in range(i, i + l): if S[k] == T[k - i]: x += 1 r.append(x) y = max(r) print(l - y)
Traceback (most recent call last): File "/tmp/tmplqiu0gcu/tmpjtmqkxgw.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s903105829
p02571
u006738234
1598731060
Python
Python (3.8.2)
py
Runtime Error
110
9152
329
s = list(str(input())) t = list(str(input())) x = [0] a = 0 for i in range(len(s)): if((s[i] == t[0]) and ((len(s)-i) >= (len(t)-1))): a += 1 for k in range(1,len(t)): if(s[i+k] == t[k] and (s[i+k-1] == t[k-1])): a += 1 x.append(a+1) a = 0 y = max(x) print((len...
Traceback (most recent call last): File "/tmp/tmpvj58ysol/tmpobppjmey.py", line 1, in <module> s = list(str(input())) ^^^^^^^ EOFError: EOF when reading a line
s782190225
p02571
u137191729
1598731029
Python
PyPy3 (7.3.0)
py
Runtime Error
94
68628
499
def inp(): return(int(input())) def inlt(): return(list(map(int,input().split()))) def insr(): s = input() return(list(s[:len(s) ])) def invr(): return(map(int,input().split())) I = input() first = s[0] second = s[1] vec = c() i=0 while len(vec)==0: j = len(second)- i for k in range(1,i+1) ...
File "/tmp/tmpb3z_stag/tmpyru5sngj.py", line 19 for k in range(1,i+1) ^ SyntaxError: expected ':'
s773186962
p02571
u942388574
1598731026
Python
Python (3.8.2)
py
Runtime Error
60
8936
315
# -*- coding: utf-8 -*- """ Created on Sat Aug 29 21:12:17 2020 @author: naoki """ S = input() T = input() count = [0 for i in range(len(S)-len(T))] for i in range(len(S)-len(T)): for j in range(len(T)): if S[i+j] != T[j]: count[i]+=1 count = sorted(count) print(count[0])
Traceback (most recent call last): File "/tmp/tmpaugmgd84/tmptur8_km_.py", line 8, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s898222349
p02571
u706659319
1598731023
Python
PyPy3 (7.3.0)
py
Runtime Error
120
68644
261
S = input() T = input() LS = len(S) LT = len(T) L = [] if T in S: print(0) else: for ls in range(LS - LT): d = 0 for lt in range(LT): if S[ls + lt:ls + LT] != T[lt]: d += 1 L.append(d) print(min(L))
Traceback (most recent call last): File "/tmp/tmp2uvxszm0/tmp3vef6iqx.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s581610841
p02571
u211544300
1598731014
Python
Python (3.8.2)
py
Runtime Error
27
8988
375
#include <bits/stdc++.h> using namespace std; char s[1111], t[1111]; int main(void) { int i, j, ans = 1000; scanf("%s %s", s + 1, t + 1); int n = strlen(s + 1); int m = strlen(t + 1); for (i = 1; i <= n - m + 1; i++) { int p = 0; for (j = i; j <= i + m - 1; j++) if (s[j] != t[j - i + 1]) p++; ...
File "/tmp/tmpmg0xfu28/tmpy4osbaqi.py", line 2 using namespace std; ^^^^^^^^^ SyntaxError: invalid syntax
s369079946
p02571
u643679148
1598730990
Python
Python (3.8.2)
py
Runtime Error
31
9176
171
n = int(input()) a = list(map(int, input().split())) sums = 0 for i in range(n-1): for j in range(i+1, n): sums += (a[i] * a[j]) print(sums % (10 ** 9 + 7))
Traceback (most recent call last): File "/tmp/tmpq2a8q7g3/tmp30xn53jd.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s211005319
p02571
u119015607
1598730947
Python
Python (3.8.2)
py
Runtime Error
92
14528
288
S= input() T= input() l=[] for i in range(len(S)-len(T)+1): A=S[i:i+(len(T))] #print(A) count=0 for j in range(len(A)): if A[j] == T[j]: count+=1 #print(count) l.append(count) #print(l) a=len(T)-max(l) print(a)
Traceback (most recent call last): File "/tmp/tmp8txjki1b/tmpqlsayhvw.py", line 1, in <module> S= input() ^^^^^^^ EOFError: EOF when reading a line
s542151636
p02571
u161857931
1598730928
Python
Python (3.8.2)
py
Runtime Error
45
9032
204
S = input() T = input() mS = [] d = len(S) - len(T) for j in range(d): m = 0 for i in range(len(T)): if S[i] != T[i] : m += 1 mS.append(m) S = S[1:] print(min(mS))
Traceback (most recent call last): File "/tmp/tmpvy3cw5qi/tmp9zwbcnye.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s717873226
p02571
u143051858
1598730910
Python
Python (3.8.2)
py
Runtime Error
34
9080
352
import math s = list(input()) t = list(input()) s.reverse() s=''.join(s) t.reverse() t=''.join(t) n = s.index(t[0]) res = len(t) num =0 while len(s)>=len(t): if len(s)<=len(t) and s[0] != t[0]:break n = s.index(t[0]) for i in range(len(t)): if t[i]!=s[i+n]: num+=1 res = min(res,num)...
Traceback (most recent call last): File "/tmp/tmp4qx6lmc_/tmpzvmivlnr.py", line 3, in <module> s = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s386848828
p02571
u071905007
1598730900
Python
Python (3.8.2)
py
Runtime Error
66
9064
223
S=list(map(str,input())) T=list(map(str,input())) X=[] Z=0 for I in range(len(S)-len(T)): Y=S[I:I+len(T)] Z=0 for J in range(len(T)): if Y[J]==T[J]: Z=Z+1 X.append(Z) print(len(T)-max(X))
Traceback (most recent call last): File "/tmp/tmpmrbto3xa/tmpfouzvnr4.py", line 1, in <module> S=list(map(str,input())) ^^^^^^^ EOFError: EOF when reading a line
s155781093
p02571
u885315507
1598730894
Python
Python (3.8.2)
py
Runtime Error
71
8964
207
S = input() T = input() L = len(S) l = len(T) r = [] for i in range(L - l): x = 0 for k in range(i, i + l): if S[k] == T[k - i]: x += 1 r.append(x) y = max(r) print(l - y)
Traceback (most recent call last): File "/tmp/tmpge1i0s2a/tmppdufzblc.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s072517329
p02571
u209268771
1598730886
Python
Python (3.8.2)
py
Runtime Error
76
9120
632
s = str(input()) t = str(input()) slen = len(s) tlen = len(t) i = tlen n = 0 a = 0 tuu = [0] * tlen ans = [0] * tlen max_count = 0 while i <= slen: ps = s[ n : i + tlen -1 ] count = 0 for j in range(tlen): if ps[j] == t[j]: count += 1 tuu[j] = "True" # print("通っ...
Traceback (most recent call last): File "/tmp/tmp3vzwonid/tmptmltq7l7.py", line 1, in <module> s = str(input()) ^^^^^^^ EOFError: EOF when reading a line
s238811740
p02571
u885315507
1598730841
Python
Python (3.8.2)
py
Runtime Error
71
8992
206
s = input() t = input() L = len(s) l = len(t) r = [] for i in range(L - l): x = 0 for k in range(i, i + l): if s[k] == t[k - i]: x += 1 r.append(x) y = max(r) print(l - y)
Traceback (most recent call last): File "/tmp/tmp5s4lvsj6/tmpalvhuscv.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s504592836
p02571
u654517927
1598730796
Python
Python (3.8.2)
py
Runtime Error
96
9084
426
date0=input() date1=input() list=[] if len(date1)>len(date0)-len(date1): N=len(date0)-len(date1) else: N=len(date1) for i in range(N): if date1[i] in date0[i:]: j=0 result=1 for j in range(len(date1)-i-1): if date1[i:j+i+2] in date0[i:]: result += 1 ...
Traceback (most recent call last): File "/tmp/tmpefhz1sv9/tmpll8x9d97.py", line 1, in <module> date0=input() ^^^^^^^ EOFError: EOF when reading a line
s445577931
p02571
u879584308
1598730731
Python
PyPy3 (7.3.0)
py
Runtime Error
629
77460
367
def main(): s = str(input()) t = str(input()) if len(s) < len(t): print(0) else: l = [] for i in range(len(s)-len(t)): l.append(s[i:i+len(t)]) ans = [] for c in l: counter = 0 for i in range(len(c)): if list(c)[i] == t[i]: counter += 1 ans.append(counter) print(len(t)-max(a...
Traceback (most recent call last): File "/tmp/tmpo8278o3u/tmpumr6v4lz.py", line 31, in <module> main() File "/tmp/tmpo8278o3u/tmpumr6v4lz.py", line 3, in main s = str(input()) ^^^^^^^ EOFError: EOF when reading a line
s989639863
p02571
u879584308
1598730703
Python
PyPy3 (7.3.0)
py
Runtime Error
94
68580
369
def main(): s = str(input()) t = str(input()) if len(s) > len(t): print(0) else: l = [] for i in range(len(s)-len(t)): l.append(s[i:i+len(t)]) ans = [] for c in l: counter = 0 for i in range(len(c)): if list(c)[i] == t[i]: counter += 1 ans.append(counter) print(len(t)-max...
Traceback (most recent call last): File "/tmp/tmpe6ua3orm/tmppfm7lbvl.py", line 30, in <module> main() File "/tmp/tmpe6ua3orm/tmppfm7lbvl.py", line 2, in main s = str(input()) ^^^^^^^ EOFError: EOF when reading a line
s024363953
p02571
u885315507
1598730701
Python
Python (3.8.2)
py
Runtime Error
33
8952
283
s = input() t = input() L = len(s) l = len(t) print(L, l) r = [] print("L-l=", L-l) for i in range(L - l): x = 0 print("i + l=", i + l) for k in range(i, i + l - 2): if s[k] == t[k]: x += 1 print("x=", x) r.append(x) y = max(r) print(l - y)
Traceback (most recent call last): File "/tmp/tmp68zzci19/tmpap2i44fy.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s141476715
p02571
u720558413
1598730687
Python
Python (3.8.2)
py
Runtime Error
19
8916
252
S = input() T = input() min_count = 10000000 for i in range(len(S)-len(T)+1): if S[i] = T[0]: count = 0 for j in range(1,len(T)): if S[i+j] != T[j]: count += 1 if count < min_count: min_count = count print(min_count)
File "/tmp/tmptvwr53uj/tmp_eksmo7k.py", line 7 if S[i] = T[0]: ^^^^ SyntaxError: cannot assign to subscript here. Maybe you meant '==' instead of '='?
s798426311
p02571
u619785253
1598730675
Python
Python (3.8.2)
py
Runtime Error
27
9136
311
import itertools def main(): s = input() t = input() for i in range(len(t)): if t[0:i] in s: # print(t[0:i],s,i) ans1 = i if t[i:] in s: # print(t[i:],s,i) ans2 = len(t)-i print(len(t)-max(ans1,ans2)) #print(ans1,ans2) if __name__ == '__main__': main()
Traceback (most recent call last): File "/tmp/tmpsdsetqz9/tmplgoqv3lz.py", line 17, in <module> main() File "/tmp/tmpsdsetqz9/tmplgoqv3lz.py", line 4, in main s = input() ^^^^^^^ EOFError: EOF when reading a line
s926341840
p02571
u785618718
1598730659
Python
Python (3.8.2)
py
Runtime Error
27
9124
220
S = input() T = input() min = length(T) for index in range( length(S)-length(T)+1 ): temp = 0 for index2 in range(T): if T[index2] == S[index+index2]: temp += 1 if temp < min: min = temp print(min)
Traceback (most recent call last): File "/tmp/tmp1q5yfrsb/tmp_saddjip.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s723597461
p02571
u249335194
1598730657
Python
Python (3.8.2)
py
Runtime Error
61
9016
501
s=input() t=input() S=[] c=0 for i in range(len(s)): if s[i] in t: c+=1 p=len(t)-1 q=t.index(s[i]) if q>i or i-q+p+1>len(s): pass else: s1=s[i-q:i+p-q+1] count=0 for j in range(len(s1)): if s1[j]!=t[...
Traceback (most recent call last): File "/tmp/tmpkjc7t7bs/tmpb2shrlx7.py", line 1, in <module> s=input() ^^^^^^^ EOFError: EOF when reading a line
s663340934
p02571
u633535831
1598730637
Python
Python (3.8.2)
py
Runtime Error
71
9520
766
#from functools import lru_cache import sys from itertools import product,combinations from functools import reduce,lru_cache def vfunc(f): return lambda *lst, **kwargs: list(map(lambda *x:f(*x,**kwargs),*lst)) def list_t(l): return vfunc(lambda *args:args)(*l) def rvfunc(f): return lambda *lst, **kwargs: list(map(l...
Traceback (most recent call last): File "/tmp/tmp2scjb960/tmpwmgo8i7y.py", line 14, in <module> s,t = list_t(reader())[0] ^^^^^^^^^^^^^^^^ File "/tmp/tmp2scjb960/tmpwmgo8i7y.py", line 8, in list_t def list_t(l): return vfunc(lambda *args:args)(*l) ^^^^^^^^^^^^^^^^^^^^^^^^...
s359290630
p02571
u790970861
1598730618
Python
Python (3.8.2)
py
Runtime Error
24
8956
403
S = input() T = input() counter_dict = {} for i in range(len(S)): counter = 0 for j in range(len(T)): if i + j < len(S): if S[i + j] == T[j]: counter += 1 else counter = 0 if str(i) in counter_dict.keys(): if counter_dict[str(i)] < counter: counter_dict[str(i)] = counter else: counter_dict[str...
File "/tmp/tmp896423b4/tmpv3kb5ohu.py", line 11 else ^ SyntaxError: expected ':'
s603249642
p02571
u879584308
1598730601
Python
PyPy3 (7.3.0)
py
Runtime Error
1143
77412
309
def main(): s = str(input()) t = str(input()) l = [] for i in range(len(s)-len(t)): l.append(s[i:i+len(t)]) ans = [] for c in l: counter = 0 for i in range(len(c)): if list(c)[i] == t[i]: counter += 1 ans.append(counter) print(len(t)-max(ans)) if __name__ == '__main__': main()
Traceback (most recent call last): File "/tmp/tmpeh3khsaj/tmpk4hzo4jn.py", line 24, in <module> main() File "/tmp/tmpeh3khsaj/tmpk4hzo4jn.py", line 3, in main s = str(input()) ^^^^^^^ EOFError: EOF when reading a line
s660909958
p02571
u207582576
1598730588
Python
Python (3.8.2)
py
Runtime Error
22
9016
251
S, T = [input() for i in range(2)] s = list(S) t = list(T) n = len(s) - len(t) + 1 min = len(t) for a in range(n): count = 0 for b in range(len(t)): if s[a+b] != t[b]: count += 1 if count < min: min = count print(min)
File "/tmp/tmpmucu6msw/tmpdry7xnsc.py", line 11 for b in range(len(t)): TabError: inconsistent use of tabs and spaces in indentation
s591787817
p02571
u928385607
1598730568
Python
Python (3.8.2)
py
Runtime Error
28
9132
207
s = input() t = input() for i in range(len(t)+1): if t[0:len(t)-i] in s or t[i:len(t)] in s: break for j in range(int(len(t)/2)): if t[j:len(t)-j] in s: break if i < j*2: print(i) else: print(j*2)
Traceback (most recent call last): File "/tmp/tmptvudod0a/tmpqalar3pm.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s210309209
p02571
u176165272
1598730555
Python
Python (3.8.2)
py
Runtime Error
64
8984
208
S = input() T = input() K = [] for i in range(len(S) - len(T)): V = S[i:i + len(T)] C = 0 for l in range(len(T)): if T[l] == V[l]: C += 1 K.append(C) print(len(T) - max(K))
Traceback (most recent call last): File "/tmp/tmpzzzulpy2/tmpz9_90y3q.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s804220378
p02571
u623814058
1598730529
Python
Python (3.8.2)
py
Runtime Error
2206
16744
485
S=input() T=input() import re def x(): for i in range(len(T),0,-1): # 文字列の長さ for j in range(len(T)-i): # T検索の開始位置=その前にある文字数 t=T[j:i+j] for m in re.finditer(t, S): p=m.start() if p!=-1: # print(j,i,t,p,j<=p and len(T)-j-1 <=len(S)-p...
Traceback (most recent call last): File "/tmp/tmpv16ler16/tmpczqkso12.py", line 1, in <module> S=input() ^^^^^^^ EOFError: EOF when reading a line
s446819529
p02571
u465276003
1598730489
Python
PyPy3 (7.3.0)
py
Runtime Error
2223
557136
338
S = input() T = input() lis = [] count = 0 saishou = 0 for i in range(len(T)): for j in range(i, len(S)-len(T)+i): c = 0 while i + c < len(T) and j + c < len(S) : if T[i+c] == S[j+c]: c = c + 1 lis.append(c) else: break saidai = max(lis) saishou = len(T) - said...
Traceback (most recent call last): File "/tmp/tmp083fb73l/tmp8m_3y2ni.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s511268574
p02571
u353548710
1598730431
Python
Python (3.8.2)
py
Runtime Error
62
8956
196
S = input() T = input() C = [] for i in range(len(S) - len(T)): s = S[i:len(T)+i] c = 0 for j in range(len(T)): if s[j] == T[j]: c += 1 C.append(c) print(len(T)-max(C))
Traceback (most recent call last): File "/tmp/tmp0siot058/tmpz8h83ynl.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s018889876
p02571
u006738234
1598730421
Python
Python (3.8.2)
py
Runtime Error
71
9156
290
s = list(str(input())) t = list(str(input())) x = [0] a = 0 for i in range(len(s)): if((s[i] == t[0]) and ((len(s)- i) >= (len(t)-1))): for k in range(1,len(t)): if(s[i+k] == t[k]): a += 1 x.append(a+1) a = 0 y = max(x) print((len(t) - y))
Traceback (most recent call last): File "/tmp/tmp8vo_1vth/tmpurrji08_.py", line 1, in <module> s = list(str(input())) ^^^^^^^ EOFError: EOF when reading a line
s317978054
p02571
u231570044
1598730414
Python
Python (3.8.2)
py
Runtime Error
2395
137884
263
S = input() T = input() for i in range(len(T), 0, -1): for j in range(len(T)-i+1): subst = T[j:i+j] # print(subst) if S.find(subst, j, len(S)-(len(T)-i-j))>=0: print (len(T)-i) print(subst) # exit(0)
Traceback (most recent call last): File "/tmp/tmpl42p_0my/tmpxm9j_pd5.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s526523375
p02571
u670567845
1598730396
Python
Python (3.8.2)
py
Runtime Error
329
9048
233
S = input() T = input() l = len(T) ans = l print(ans) for i in range(l): for j in range(l): if (i<=j): if T[i:j+1] in S: if f >= i and f + (l-j) <= len(S): ans = min(ans, l - (j+1-i)) print(ans)
Traceback (most recent call last): File "/tmp/tmpv26yl1ew/tmp8d512c1q.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s024113656
p02571
u990641144
1598730396
Python
Python (3.8.2)
py
Runtime Error
1286
148204
353
import numpy as np S = input() T = input() tmp = np.zeros(len(T)) i=0 flg=True while flg: for j in range(i, len(T)): print(i,j) print(T[i:j+1]) print(T[i:j+1] in S) if T[i:j+1] in S: tmp[i] = j+1-i i = max(i + int(tmp[i]),i+1) if i >= len(T)-1: flg=Fals...
Traceback (most recent call last): File "/tmp/tmpl6bxupqh/tmpk9uuwb9h.py", line 2, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s747006788
p02571
u249335194
1598730390
Python
Python (3.8.2)
py
Runtime Error
58
9020
434
s=input() t=input() S=[] for i in range(len(s)): if s[i] in t: p=len(t)-1 q=t.index(s[i]) if q>i or i-q+p+1>len(s): pass else: s1=s[i-q:i+p-q+1] count=0 for j in range(len(s1)): if s1[j]!=t[j]: count+...
Traceback (most recent call last): File "/tmp/tmpavlcs9g9/tmpzapyqh68.py", line 1, in <module> s=input() ^^^^^^^ EOFError: EOF when reading a line
s073920314
p02571
u934953801
1598730353
Python
Python (3.8.2)
py
Runtime Error
83
14504
232
S=input() T=input() match=[] lens=len(S) lent=len(T) for i in range(0,lens-lent): temp=S[i:i+lent] cnt=0 for j in range(lent): if temp[j]==T[j]: cnt+=1 match.append(cnt) print(lent-max(match))
Traceback (most recent call last): File "/tmp/tmpx83cn4kc/tmpj2coh1g8.py", line 1, in <module> S=input() ^^^^^^^ EOFError: EOF when reading a line
s210708534
p02571
u764393353
1598730335
Python
PyPy3 (7.3.0)
py
Runtime Error
88
68692
492
def main(): s = list(input()) t = list(input()) common = 0 max_common = 0 for t_ind in range(len(t)): for char in s: if not common and char == t[t_ind]: common += 1 elif char == t[common]: common += 1 else: ...
Traceback (most recent call last): File "/tmp/tmpg_6j1972/tmprxw8obpo.py", line 20, in <module> main() File "/tmp/tmpg_6j1972/tmprxw8obpo.py", line 2, in main s = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s665589471
p02571
u577745299
1598730305
Python
Python (3.8.2)
py
Runtime Error
122
27096
388
import numpy as np max_change = 1000 s = input() t = input() list_t = np.array([ _ for _ in t]) for i in range(1,len(s) - len(t) + 1): s_sample = s[i-1:len(t)+i-1] list_ss = np.array([ _ for _ in list_ss]) list_tf = list_t == list_ss n_change = len(list_t) - sum(list_tf) if n_change < max_change: ...
Traceback (most recent call last): File "/tmp/tmpm8m41o8g/tmpqggxgn9r.py", line 3, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s979509484
p02571
u633535831
1598730273
Python
PyPy3 (7.3.0)
py
Runtime Error
87
68528
766
#from functools import lru_cache import sys from itertools import product,combinations from functools import reduce,lru_cache def vfunc(f): return lambda *lst, **kwargs: list(map(lambda *x:f(*x,**kwargs),*lst)) def list_t(l): return vfunc(lambda *args:args)(*l) def rvfunc(f): return lambda *lst, **kwargs: list(map(l...
Traceback (most recent call last): File "/tmp/tmpdjeity8v/tmpoduqn8uw.py", line 14, in <module> s,t = list_t(reader())[0] ^^^^^^^^^^^^^^^^ File "/tmp/tmpdjeity8v/tmpoduqn8uw.py", line 8, in list_t def list_t(l): return vfunc(lambda *args:args)(*l) ^^^^^^^^^^^^^^^^^^^^^^^^...
s399214585
p02571
u183432736
1598730237
Python
Python (3.8.2)
py
Runtime Error
25
9024
363
S = str(input()) T = str(input()) tempcount = 0 mincount = 0 if S in T: print("0") exit for i in range(len(S) - len(T)+1): for j in range(len(T)+1): if S[i + j] != T[j]: tempcount += 1 if i == 0: mincount = tempcount elif tempcount < mincount: mincount = tempcou...
Traceback (most recent call last): File "/tmp/tmp3g7a2k4d/tmpy1ykytg1.py", line 1, in <module> S = str(input()) ^^^^^^^ EOFError: EOF when reading a line
s261114768
p02571
u170913092
1598730211
Python
Python (3.8.2)
py
Runtime Error
23
8988
176
S,T = input().split() mm = 0 for i in range(len(S)-len(T)): a = S[i:i+len(T)] mm_now = sum([x == y for x,y in [*zip(a,T)]]) mm = max(mm_now, mm) print(len(T) - mm)
Traceback (most recent call last): File "/tmp/tmpo8qijrjj/tmpr7fx0mek.py", line 1, in <module> S,T = input().split() ^^^^^^^ EOFError: EOF when reading a line
s135719416
p02571
u161857931
1598730187
Python
Python (3.8.2)
py
Runtime Error
65
8944
211
S = input() T = input() mS = [] d = len(S) - len(T) for j in range(d): m = 0 for i in range(len(T)): if S[i] == T[i] : m += 1 mS.append(m) S = S[1:] print(len(T) - max(mS))
Traceback (most recent call last): File "/tmp/tmp3x9rb6rt/tmpdd1cx1xj.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s989828806
p02571
u143051858
1598730185
Python
Python (3.8.2)
py
Runtime Error
30
9156
367
import math s = list(input()) t = list(input()) s.reverse() s=''.join(s) t.reverse() t=''.join(t) #print(s) n = s.index(t[0]) #print(n) res = len(t) num =0 while len(s)!=0: if len(s)<=len(t) and s[0] != t[0]:break n = s.index(t[0]) for i in range(len(t)): if t[i]!=s[i+n]: num+=1 res...
Traceback (most recent call last): File "/tmp/tmpmlx73yug/tmpdk43427j.py", line 3, in <module> s = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s683261600
p02571
u382639013
1598730167
Python
Python (3.8.2)
py
Runtime Error
22
9120
166
s = input() t = input() ans = 0 for i in range(len(s)-len(t)+1): if ans < count_ans(s[i:i+len(t)],t): ans = count_ans(s[i:i+len(t)],t) print(len(t)-ans)
Traceback (most recent call last): File "/tmp/tmpiu10tcdx/tmpwdj4h_0h.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s359484485
p02571
u404842368
1598730132
Python
Python (3.8.2)
py
Runtime Error
69
9072
359
S = input() T = input() if len(S)==len(T): for i in range(len(T)): if T[i] != S[i+n+1]: count+=1 print(count) else: countbox=[] for n in range(len(S)-len(T)): count =0 for i in range(len(T)): if T[i] != S[i+n+1]: count+=1 countbox...
Traceback (most recent call last): File "/tmp/tmpwcuwe133/tmp5b14gvhy.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s704642299
p02571
u282403093
1598730102
Python
Python (3.8.2)
py
Runtime Error
25
8948
482
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; using P = pair<int, int>; int main() { string S, T; cin >> S >> T; int ans = 10000; int cnt = 0; for (int i = 0; i < S.size() - T.size() + 1; ++i) { for (int j = i; j < T.s...
File "/tmp/tmp9brhs2dq/tmpo67k4wor.py", line 3 using namespace std; ^^^^^^^^^ SyntaxError: invalid syntax
s179494602
p02571
u264210020
1598730056
Python
Python (3.8.2)
py
Runtime Error
53
9024
318
S = str(input()) T = str(input()) init = len(T) tmp = init for i in range(0,len(S)-1): if i > len(S)-len(T)-1: break for n in range(0, len(T)-1): if S[i]==T[n]: ans -=1 if ans < tmp: tmp =ans else: ans = init ans = tmp print(ans)
Traceback (most recent call last): File "/tmp/tmptpsxz6e7/tmpvziatvnm.py", line 1, in <module> S = str(input()) ^^^^^^^ EOFError: EOF when reading a line
s262350356
p02571
u633535831
1598730007
Python
PyPy3 (7.3.0)
py
Runtime Error
131
68632
714
#from functools import lru_cache import sys from itertools import product,combinations from functools import reduce,lru_cache import heapq def vfunc(f): return lambda *lst, **kwargs: list(map(lambda *x:f(*x,**kwargs),*lst)) def list_t(l): return vfunc(lambda *args:args)(*l) def rvfunc(f): return lambda *lst, **kwarg...
Traceback (most recent call last): File "/tmp/tmpbwq9k7gr/tmpe1aprcde.py", line 15, in <module> s,t = list_t(reader())[0] ^^^^^^^^^^^^^^^^ File "/tmp/tmpbwq9k7gr/tmpe1aprcde.py", line 9, in list_t def list_t(l): return vfunc(lambda *args:args)(*l) ^^^^^^^^^^^^^^^^^^^^^^^^...
s088088346
p02571
u404842368
1598729994
Python
Python (3.8.2)
py
Runtime Error
67
9116
207
S = input() T = input() countbox=[] for n in range(len(S)-len(T)): count =0 for i in range(len(T)): if T[i] != S[i+n+1]: count+=1 countbox.append(count) print(min(countbox))
Traceback (most recent call last): File "/tmp/tmplcx83yi5/tmp0gwwge3y.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s239517924
p02571
u633535831
1598729957
Python
PyPy3 (7.3.0)
py
Runtime Error
214
68628
709
#from functools import lru_cache import sys from itertools import product,combinations from functools import reduce,lru_cache import heapq def vfunc(f): return lambda *lst, **kwargs: list(map(lambda *x:f(*x,**kwargs),*lst)) def list_t(l): return vfunc(lambda *args:args)(*l) def rvfunc(f): return lambda *lst, **kwarg...
Traceback (most recent call last): File "/tmp/tmp0onx7_hp/tmpk0lsbpvx.py", line 15, in <module> s,t = list_t(reader())[0] ^^^^^^^^^^^^^^^^ File "/tmp/tmp0onx7_hp/tmpk0lsbpvx.py", line 9, in list_t def list_t(l): return vfunc(lambda *args:args)(*l) ^^^^^^^^^^^^^^^^^^^^^^^^...
s912480793
p02571
u902917675
1598729930
Python
Python (3.8.2)
py
Runtime Error
73
8972
229
S = input() T = input() ev = [0] * (len(S) - len(T)) for i in range(len(S) - len(T)): commit = 0 for j in range(len(T)): if S[i + j] == T[j]: commit += 1 ev[i] = commit ev.sort(reverse=True) print(len(T) - ev[0])
Traceback (most recent call last): File "/tmp/tmpourz1h8q/tmpmejv7coe.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s436027896
p02571
u071905007
1598729911
Python
Python (3.8.2)
py
Runtime Error
65
9132
225
S=list(map(str,input())) T=list(map(str,input())) x=[] y=0 for i in range(len(S)-len(T)): Y=S[i:i+len(T)] y=0 for j in range(len(T)): if Y[j]==T[j]: y=y+1 x.append(y) print(len(T)-max(x))
Traceback (most recent call last): File "/tmp/tmp3jjus9dx/tmp4frpql62.py", line 1, in <module> S=list(map(str,input())) ^^^^^^^ EOFError: EOF when reading a line
s738789065
p02571
u216035099
1598729896
Python
Python (3.8.2)
py
Runtime Error
29
9196
473
def findProductSum(A, n): array_sum = 0 for i in range(0, n, 1): array_sum = array_sum + A[i] array_sum_square = array_sum * array_sum individual_square_sum = 0 for i in range(0, n, 1): individual_square_sum += A[i] * A[i] return (array_sum_square - ...
Traceback (most recent call last): File "/tmp/tmpplmxgtqx/tmph43p_dnc.py", line 16, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s165897533
p02571
u869955221
1598729842
Python
Python (3.8.2)
py
Runtime Error
526
9060
235
import sys s = input() t = input() ans = 0 if(t in s): print(0) sys.exit(1) for i in range(len(t)): for j in range(i,len(t)): me = t[i:j] if(me in s[i:]): ans = max(len(me),ans) print(len(t)-ans)
Traceback (most recent call last): File "/tmp/tmpw5dty2rd/tmp9aol7g3q.py", line 2, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s521987642
p02571
u577745299
1598729825
Python
Python (3.8.2)
py
Runtime Error
28
9148
555
import pandas as pd def diffab(x): if x.a == x.b: return 1 else: return 0 max_change = 1000 s = input() t = input() list_t = pd.Series([ _ for _ in t],name="a") for i in range(1,len(s) - len(t) + 1): s_sample = s[i-1:len(t)+i-1] list_ss = pd.Series([ _ for _ in s_sample],name="b") ...
Traceback (most recent call last): File "/tmp/tmpstwq831g/tmpvac6_qo1.py", line 11, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s660344565
p02571
u902917675
1598729821
Python
Python (3.8.2)
py
Runtime Error
71
9116
229
S = input() T = input() ev = [0] * (len(S) - len(T)) for i in range(len(S) - len(T)): commit = 0 for j in range(len(T)): if S[i + j] == T[j]: commit += 1 ev[i] = commit greatest = max(ev) print(len(T) - greatest)
Traceback (most recent call last): File "/tmp/tmp9u68_4nl/tmpeql6m4ey.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s980487199
p02571
u264210020
1598729814
Python
Python (3.8.2)
py
Runtime Error
156
9056
276
S = str(input()) T = str(input()) init = len(T) tmp = init for i in range(0,len(S)-1): for n in range(0, len(T)-1): if S[i]==T[n]: ans -=1 if ans < tmp: tmp =ans else: ans = init ans = tmp print(ans)
Traceback (most recent call last): File "/tmp/tmpjely2zar/tmp9qhtocvo.py", line 1, in <module> S = str(input()) ^^^^^^^ EOFError: EOF when reading a line
s014741533
p02571
u861886710
1598729811
Python
PyPy3 (7.3.0)
py
Runtime Error
84
68696
190
S = input() T = input() c = 0 l = [] for i in range(len(S)-len(T)): for j in range(len(T)): if (T[j] != S[i+j]): c += 1 l.append(c) c = 0 print(min(l))
Traceback (most recent call last): File "/tmp/tmp3n7yx00y/tmptvk78jm4.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s009819971
p02571
u721403425
1598729799
Python
Python (3.8.2)
py
Runtime Error
91
14396
252
s = input() t = input() l = len(t) ans = 0 a = 0 list1 = [] for i in range(len(s) - l + 1): ss = list(s[i:i+l]) for j in range(l): if ss[j] ==t[j]: ans += 1 list1.append(ans) else: pass ans = 0 m = max(list1) print(l-m)
Traceback (most recent call last): File "/tmp/tmpm_8algji/tmpcw190mlb.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s211399432
p02571
u990641144
1598729798
Python
Python (3.8.2)
py
Runtime Error
29
9056
242
S = input() T = input() tmp = np.zeros(len(T)) i=0 flg=True while flg: for j in range(i, len(T)): if T[i:j+1] in S: tmp[i] = j i = i + int(tmp[i]) if i >= len(T)-1: flg=False print(int(np.max(tmp)))
Traceback (most recent call last): File "/tmp/tmparl25e9h/tmp9m_yr5ft.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s095399379
p02571
u249335194
1598729765
Python
Python (3.8.2)
py
Runtime Error
51
9124
436
s=input() t=input() S=[] for i in range(len(s)): if s[i] in t: p=len(t)-1 q=t.index(s[i]) if q>i or i-q+p+1>len(s)-1: pass else: s1=s[i-q:i+p-q+1] count=0 for j in range(len(s1)): if s1[j]!=t[j]: coun...
Traceback (most recent call last): File "/tmp/tmpvfuz3b01/tmpkdc3ggxk.py", line 1, in <module> s=input() ^^^^^^^ EOFError: EOF when reading a line
s688915085
p02571
u743878367
1598729752
Python
Python (3.8.2)
py
Runtime Error
77
10716
227
S = input() T = input() cnt_list = [] for j in range(len(S)-len(T)): sub_S = S[j:(j+len(S))] for k in range(len(T)-1): cnt = 0 if T[k] != sub_S[k]: cnt += 1 cnt_list.append(cnt) print(min(cnt_list))
Traceback (most recent call last): File "/tmp/tmpivmvl9zb/tmp_p0i92yi.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s110724250
p02571
u403411012
1598729743
Python
Python (3.8.2)
py
Runtime Error
27
8980
295
S=input() T=input() count=0 if S.find(T)!=-1: print(0) else: a=0 for i in range(len(T)-1): if S.find(T[0:len(T)-i-1])!=-1: count=count+1 print(count) a=1 break else: count=count+1 if a==0: print(count)
Traceback (most recent call last): File "/tmp/tmpou2zwzgt/tmpbocuk4qv.py", line 1, in <module> S=input() ^^^^^^^ EOFError: EOF when reading a line
s668528790
p02571
u071905007
1598729678
Python
Python (3.8.2)
py
Runtime Error
67
9064
226
S=list(map(str,input())) T=list(map(str,input())) x=[] y=0 for i in range(len(S)-len(T)): Y=S[i:i+len(T)] y=0 for j in range(len(T)): if Y[j]==T[j]: y=y+1 x.append(y) print(len(T)-max(x))
Traceback (most recent call last): File "/tmp/tmpp3_6l1go/tmp870p5v95.py", line 1, in <module> S=list(map(str,input())) ^^^^^^^ EOFError: EOF when reading a line
s534692630
p02571
u542541293
1598729674
Python
Python (3.8.2)
py
Runtime Error
655
21680
170
S = input() T = input() L = [] for i in range(len(T)): for j in range(i+1): if T[j:len(T)+j-i] in S[j:]: L.append(len(T[j:len(T)+j-i])) print(len(T)-max(L))
Traceback (most recent call last): File "/tmp/tmp9kqfmzpc/tmpaoh4uejy.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s089334299
p02571
u671889550
1598729616
Python
Python (3.8.2)
py
Runtime Error
70
9136
309
s = input() t = input() len_s = len(s) len_t = len(t) ans = 1000 for i in range(len_s - len_t + 1): cnt = 0 l = [] for j in range(len_t): if s[i + j] == t[j]: cnt += 1 else: l.append(cnt) cnt = 0 ans = min(ans, len_t - max(l)) print(ans)
Traceback (most recent call last): File "/tmp/tmpenzf4ycr/tmplcb3o9pv.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s127249221
p02571
u869802270
1598729614
Python
Python (3.8.2)
py
Runtime Error
57
9048
168
S = input() T = input() l = [] for i in range(len(S) - len(T)): cnt = 0 for j in range(len(T)): if T[j] != S[i+j]: cnt += 1 l.append(cnt) print(min(l))
Traceback (most recent call last): File "/tmp/tmpm28ey6bd/tmpm0619def.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s373452992
p02571
u656120612
1598729605
Python
Python (3.8.2)
py
Runtime Error
60
9064
183
s=input() t=input() s=list(s) t=list(t) d=[] for i in range(len(s)-len(t)): c=0 for j in range(len(t)): if s[i+j]!=t[j]: c+=1 d.append(c) print(min(d))
Traceback (most recent call last): File "/tmp/tmp9x2d9v1_/tmpmaz6rmcs.py", line 1, in <module> s=input() ^^^^^^^ EOFError: EOF when reading a line
s297846425
p02571
u827599348
1598729543
Python
Python (3.8.2)
py
Runtime Error
28
8788
760
#include <bits/stdc++.h> using namespace std; #define max(a, b) ((a > b) ? a : b) #define min(a, b) ((a < b) ? a : b) #define forn(n) for(int i = 0; i < n; i++) #define fork(k, n) for(int i = k; i < n; i++) #define pb(n) push_back(n); typedef long long ll; typedef double dbl; const int MX = 1e6; const int MOD = 1e...
File "/tmp/tmpquzd1l4j/tmpm05j05wh.py", line 2 using namespace std; ^^^^^^^^^ SyntaxError: invalid syntax
s749062239
p02571
u389530753
1598729542
Python
Python (3.8.2)
py
Runtime Error
24
8888
129
N=int(input()) S=list(input().split()) A=[int(n) for n in S] ans=int(0) for i in A: for j in A: ans += i*j print(ans)
Traceback (most recent call last): File "/tmp/tmpgaxreeue/tmp8j0kfl2d.py", line 1, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s236206195
p02571
u389530753
1598729477
Python
Python (3.8.2)
py
Runtime Error
30
9164
129
N=int(input()) S=list(input().split()) A=[int(n) for n in S] ans=int(0) for i in A: for j in A: ans += i*j print(ans)
Traceback (most recent call last): File "/tmp/tmp07ljx0rf/tmp_z1y0eoe.py", line 1, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s767818036
p02571
u267466261
1598729470
Python
PyPy3 (7.3.0)
py
Runtime Error
87
69648
264
s = input() t = input() max = 0 a = 0 for i in range(len(s)): m = i for j in range(len(t)): if i < j: break if s[m] == t[j]: a += 1 m += 1 if max < a: max = a else: a = 0 m = i print(len(t) - max)
Traceback (most recent call last): File "/tmp/tmp9l74oee8/tmpzirxe8mp.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s538816529
p02571
u721403425
1598729430
Python
Python (3.8.2)
py
Runtime Error
85
14388
257
s = input() t = input() l = len(t) ans = 0 a = 0 list1 = [] for i in range(len(s) - l + 1): ss = list(s[i:i+l]) for j in range(l): if ss[j] ==t[j]: ans += 1 list1.append(ans) else: ans = 0 ans = 0 m = max(list1) print(l-m)
Traceback (most recent call last): File "/tmp/tmph44_yrj8/tmph1jfepuu.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s606559173
p02571
u945342410
1598729422
Python
Python (3.8.2)
py
Runtime Error
29
9068
271
sList = list(input()) tList = list(input()) numList = [] for t in enumerate(tList): num = 0 for s in enumerate(sList): i = t j = s while tList[i] == sList[j]: num += 1 i += 1 j += 1 numList.Append(num) print(len(tList) - max(numList))
Traceback (most recent call last): File "/tmp/tmphzcjbm86/tmpls0pc3n_.py", line 1, in <module> sList = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s406421201
p02571
u468972478
1598729421
Python
Python (3.8.2)
py
Runtime Error
19
9048
193
n = int(input()) a = list(map(int, input().split())) b = [] for i in range(n): for j in range(i+1, n): b.append(a[i] % (10 ** 9 + 7) * (a[j] % (10 ** 9 + 7)) print(sum(b) % (10 ** 9 + 7))
File "/tmp/tmprtgtrc9y/tmpj482ric7.py", line 6 b.append(a[i] % (10 ** 9 + 7) * (a[j] % (10 ** 9 + 7)) ^ SyntaxError: '(' was never closed
s421976386
p02571
u578930448
1598729415
Python
Python (3.8.2)
py
Runtime Error
73
9080
295
s = input().strip() t = input().strip() if t in s: print(0) else: ans = 1000 for i in range(len(s) - len(t) - 1): count = len(t) - 1 for j in range(len(t) - 1): if s[i + j] == t[i]: count -= 1 ans = min(count, ans) print(ans)
Traceback (most recent call last): File "/tmp/tmppqztd_mf/tmp6fol_a_f.py", line 1, in <module> s = input().strip() ^^^^^^^ EOFError: EOF when reading a line
s427966723
p02571
u096146539
1598729404
Python
Python (3.8.2)
py
Runtime Error
33
9040
323
s=input() t=input() index=0 count=0 for i in range (len(s)): if s[i]==t[0]: index=i+1 break if index == 0: for j in range(len(t)): if t[j]!=s[j]: count+=1 else: for j in range (1,len(t)): if t[j]!= s[index]: count+=1 index+=1 print(coun...
Traceback (most recent call last): File "/tmp/tmpi0csl6fc/tmp4opmcxld.py", line 1, in <module> s=input() ^^^^^^^ EOFError: EOF when reading a line
s780121992
p02571
u435593586
1598729390
Python
Python (3.8.2)
py
Runtime Error
23
9080
399
s = input() t = input() count = 0 res = '' ans = '' for x in t: if x not in s: continue elif t.index(x) > s.index(x): continue else: i = s.index(x) ans = x res = s[i-t.index(ans):i-t.index(ans)+len(t)] if res: if len(res) < len(t): print(len(t)) else: for i in range(len(res)): ...
Traceback (most recent call last): File "/tmp/tmpvk03z57k/tmp8x2vpg_m.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s239054545
p02571
u699715278
1598729390
Python
Python (3.8.2)
py
Runtime Error
27
9048
193
S = input() T = input() def a(): l = len(T) for i in range(l, 0, -1): for j in range(0, l-i+1): if T[j:j+i] in S[j:l-i+J]: return l-i print(a())
Traceback (most recent call last): File "/tmp/tmptux4vifw/tmpthudrqxw.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s729986711
p02571
u404842368
1598729381
Python
Python (3.8.2)
py
Runtime Error
70
8976
211
S = input() T = input() countbox=[] for n in range(len(S)-2-len(T)+1): count =0 for i in range(len(T)): if T[i] != S[i+n+1]: count+=1 countbox.append(count) print(min(countbox))
Traceback (most recent call last): File "/tmp/tmpmomua8q7/tmpxx1d6k4a.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s355615368
p02571
u455354923
1598729362
Python
PyPy3 (7.3.0)
py
Runtime Error
142
74656
199
S=str(input()) T=str(input()) ls = [] cnt = 0 for i in range(len(S)-len(T)): cnt = 0 for j in range(len(T)): if T[j] != S[j+i]: cnt += 1 ls.append(cnt) print(min(ls))
Traceback (most recent call last): File "/tmp/tmp0rjy1r63/tmpouclb15i.py", line 1, in <module> S=str(input()) ^^^^^^^ EOFError: EOF when reading a line
s135803477
p02571
u467463073
1598729349
Python
Python (3.8.2)
py
Runtime Error
24
9052
170
N = int(input()) A = list(map(int,input().split())) ans = 0 m0 = 10**9+7 for i in range(0,N-1): for j in range(i+1,N): ans = (ans + A[i]*A[j]) % m0 print(ans)
Traceback (most recent call last): File "/tmp/tmp7f3cw3tm/tmpnds2td50.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s659905447
p02571
u440478998
1598729309
Python
Python (3.8.2)
py
Runtime Error
697
221756
224
s = input() t = input() l = [] for i in range(len(t)): for j in range(i+1,len(t)+1): if t[i:j] in s[i:]: l.append(t[i:j]) l2 = [] for j in l: l2.append(len(j)) print(len(t) - max(l2))
Traceback (most recent call last): File "/tmp/tmpcuzabg_w/tmpm84qphmc.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s189223748
p02571
u766236264
1598729272
Python
Python (3.8.2)
py
Runtime Error
26
9112
256
minCount = 10000 i = 0 while i < len(s): countSame = 0 j = 0 while j < len(t) and i+j < len(s): if t[j] == s[i+j]: countSame += 1 j += 1 minCount = min(len(t) - countSame, minCount) i += 1 print(minCount)
Traceback (most recent call last): File "/tmp/tmpgpsl93ft/tmp1uzvrcj9.py", line 3, in <module> while i < len(s): ^ NameError: name 's' is not defined
s213529112
p02571
u961523950
1598729260
Python
Python (3.8.2)
py
Runtime Error
39
9152
484
S = input() T = input() match = 0 match_list = list() if T in S: print(0) exit() elif set(list(S)).intersection(set(list(T))) == set(): print(len(T)) exit() 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] ...
Traceback (most recent call last): File "/tmp/tmpzrpny5ju/tmp_6f2t1e1.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s145007398
p02571
u455354923
1598729250
Python
PyPy3 (7.3.0)
py
Runtime Error
86
68660
305
S=str(input()) T=str(input()) ls = [] cnt = 0 if T in S: print(0) else: for i in range(len(S)-len(T)): for j in range(len(T)): if T[j] != S[j+i]: #print (T[j],S[j+i]) cnt += 1 ls.append(cnt) cnt = 0 #print(ls) print(min(ls))
Traceback (most recent call last): File "/tmp/tmp0c97zm2b/tmprhmewo5_.py", line 1, in <module> S=str(input()) ^^^^^^^ EOFError: EOF when reading a line
s191530346
p02571
u404842368
1598729247
Python
Python (3.8.2)
py
Runtime Error
27
9124
274
S = input() T = input() if S>=(T+2): countbox=[] for n in range(len(S)-2-len(T)+1): count =0 for i in range(len(T)): if T[i] != S[i+n+1]: count+=1 countbox.append(count) print(min(countbox)) else: print(0)
Traceback (most recent call last): File "/tmp/tmpikulv4i8/tmpjf02cssu.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s897276647
p02571
u240292623
1598729226
Python
Python (3.8.2)
py
Runtime Error
34
9928
166
def check(s,t,n): if s.find(t) != -1: print(n) else: n += 1 t = t[:-1] check(s,t,n) s = input() t = input() n = 0 check(s,t,n)
Traceback (most recent call last): File "/tmp/tmp87liplbx/tmpg9qoso49.py", line 8, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s559924738
p02571
u671889550
1598729193
Python
Python (3.8.2)
py
Runtime Error
69
8956
305
s = input() t = input() len_s = len(s) len_t = len(t) ans = 1000 for i in range(len_s - len_t): cnt = 0 l = [] for j in range(len_t): if s[i + j] == t[j]: cnt += 1 else: l.append(cnt) cnt = 0 ans = min(ans, len_t - max(l)) print(ans)
Traceback (most recent call last): File "/tmp/tmp7gu9rfid/tmpjp5zds3s.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s469607692
p02571
u455354923
1598729173
Python
PyPy3 (7.3.0)
py
Runtime Error
152
68608
301
S=str(input()) T=str(input()) ls = [] cnt = 0 if T in S: print(0) else: for i in range(len(S)-len(T)): for j in range(len(T)): if T[j] != S[j+i]: #print (T[j],S[j+i]) cnt += 1 ls.append(cnt) cnt = 0 #print(ls) print(min(ls))
Traceback (most recent call last): File "/tmp/tmpplkvvoo1/tmpiwpg6huv.py", line 1, in <module> S=str(input()) ^^^^^^^ EOFError: EOF when reading a line
s573141532
p02571
u763291354
1598729168
Python
Python (3.8.2)
py
Runtime Error
69
9216
420
s = input() t = input() s_list = list(s) t_list = list(t) compare = [] score = [] if s == t: print(0) else: for i in range(len(s) - len(t) + 1): compare.append(s[i : i + len(t)]) for v in compare: count = 0 for v1, v2 in zip(list(v), t_list): #print(v1, v2) ...
Traceback (most recent call last): File "/tmp/tmpc4aqx7qs/tmpm5437qaa.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s842098345
p02571
u111471511
1598729162
Python
Python (3.8.2)
py
Runtime Error
31
8904
227
ans = [] for i in range(M-N+1): num = 0 substring = input_list[0][i:i+N] for j in range(len(substring)): if substring[j] != input_list[1][j]: num += 1 ans.append(num) print(min(ans))
Traceback (most recent call last): File "/tmp/tmp_8qtpjkv/tmpaqrrttiv.py", line 3, in <module> for i in range(M-N+1): ^ NameError: name 'M' is not defined
s129839287
p02571
u356983865
1598729126
Python
Python (3.8.2)
py
Runtime Error
93
14792
509
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+1): 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 +...
Traceback (most recent call last): File "/tmp/tmppq0gtasi/tmpgtbygkro.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s922741084
p02571
u404842368
1598729118
Python
Python (3.8.2)
py
Runtime Error
67
8880
211
S = input() T = input() countbox=[] for n in range(len(S)-2-len(T)+1): count =0 for i in range(len(T)): if T[i] != S[i+n+1]: count+=1 countbox.append(count) print(min(countbox))
Traceback (most recent call last): File "/tmp/tmpe5bwmj4b/tmp_wzir6lc.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s204261753
p02571
u284120954
1598729111
Python
Python (3.8.2)
py
Runtime Error
32
8860
224
S = input() T = input() Min = 100000 for i in range(len(S) - len(T) + 1): count = 0 for n in range(len(T)): if S[i + n] != T[n]: count += 1 if count < Min: Min = count print(count)
File "/tmp/tmpye9egcpx/tmpqly645g8.py", line 1 S = input() IndentationError: unexpected indent
s565194017
p02571
u707451177
1598729088
Python
Python (3.8.2)
py
Runtime Error
27
9036
150
s = input() t = input() for i in np.flip(np.arange(len(t))): if t[:i] in s: print(len(t)-i) break else: print(len(t))
Traceback (most recent call last): File "/tmp/tmpzs3sowik/tmp_veo6pxg.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s809006403
p02571
u806988802
1598729062
Python
Python (3.8.2)
py
Runtime Error
22
9056
258
s, t = input().split("\n") s_l = len(s) t_l = len(t) max_count = 0 for i in range(0, s_l - t_l): count = 0 for j in range(0, t_l): if s[i+j] == t[j]: count += 1 if count > max_count: max_count = count diff = t_l - max_count print(diff)
Traceback (most recent call last): File "/tmp/tmpicdscupl/tmpxv9rjs33.py", line 1, in <module> s, t = input().split("\n") ^^^^^^^ EOFError: EOF when reading a line