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
s620272760
p03975
u005260772
1525656940
Python
Python (2.7.6)
py
Runtime Error
10
2568
124
a, b, c = map(int, input().split()) ans = 0 for i in range(a): n = int(input()) if n < b: ans += 1 print ans
File "/tmp/tmpsneyd9xv/tmp8m4xmbfc.py", line 7 print ans ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s816724807
p03975
u283229916
1475858860
Python
Python (2.7.6)
py
Runtime Error
17
2580
153
n=int(input()) a=int(input()) b=int(input()) cnt=0 for i in range(n): t=int(input()) if t<a || b<=t: cnt=cnt+1 print cnt
File "/tmp/tmp8lweghti/tmpjuy74kld.py", line 7 if t<a || b<=t: ^ SyntaxError: invalid syntax
s214357330
p03975
u283229916
1475858800
Python
Python (2.7.6)
py
Runtime Error
17
2696
150
n=int(input()) a=int(input()) b=int(input()) cnt=0 for i in range(n): t=int(input()) if t<a or b<=t: cnt+=1 print cnt
File "/tmp/tmpf3fyvstf/tmp27egmet1.py", line 9 print cnt ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s934405161
p03975
u283229916
1475858732
Python
Python (2.7.6)
py
Runtime Error
17
2568
149
n=int(input()) a=int(input()) b=int(input()) cnt=0 for i in range(n): t=int(input()) if t<a or b<=t: cnt++ print cnt
File "/tmp/tmpivou5h7i/tmppi00r44j.py", line 8 cnt++ ^ SyntaxError: invalid syntax
s121324722
p03975
u283229916
1475858665
Python
Python (2.7.6)
py
Runtime Error
17
2568
149
n=int(input()) a=int(input()) b=int(input()) cnt=0 for i in range(n): t=int(input()) if t<a || b<=t: cnt++ print cnt
File "/tmp/tmpds65_2ot/tmpytcerv_h.py", line 7 if t<a || b<=t: ^ SyntaxError: invalid syntax
s521703902
p03975
u950384958
1475842668
Python
Python (2.7.6)
py
Runtime Error
256
18904
2619
import numpy as np H, W = map(int, raw_input().split()) S_list = list() for i in range(H): S_list.append(raw_input()) X_mat = np.zeros((H, W), dtype='int') S_mat_extend = np.zeros((H+2, W+2), dtype='int') # input for h in range(H): for w in range(W): if S_list[h][w] == 'X': X_mat[h, w] +=...
File "/tmp/tmpoi86qzwy/tmpnk3fxc6j.py", line 100 print res ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s660264875
p03975
u352021237
1475827309
Python
PyPy2 (5.6.0)
py
Runtime Error
40
8944
227
n,k=map(int,raw_input().split()) a=[0]*25 b=[] count=0 for i in range(n): b.append(raw_input()) b=list(set(b)) for i in b: a[ord(i[0])-65]+=1 for i in a: if i>0: count+=i if len(set(a))==2: print 0 else: print count/k
File "/tmp/tmpkopvhg11/tmp1ftnxdrv.py", line 14 print 0 ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s557971993
p03975
u830390742
1475593870
Python
Python (2.7.6)
py
Runtime Error
17
2808
249
from collections import Counter N, K = map(int, raw_input().split()) C = sorted(Counter(raw_input()[0] for _ in xrange(N)).values()) a = C.pop() b = sum(C) for i in xrange(a, 0, -1): if b/i >= K-1: print i break else: print 0
File "/tmp/tmptymbuktm/tmpb9wyhtz9.py", line 8 print i ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s326924528
p03975
u765237551
1475429299
Python
Python (3.4.3)
py
Runtime Error
27
3316
311
from collections import Counter n, k = map(int, input().split()) ps = [input() for _ in range(n)] heads = Counter((p[0] for p in ps)) ans = 0 while len(heads) >= k: ans += 1 for h, c in heads.most_common()[:k]: if c==1: heads.pop(h) else: heads[h] -= 1 print(ans)
Traceback (most recent call last): File "/tmp/tmpfd4auc53/tmpis35tjxl.py", line 2, in <module> n, k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s995794040
p03975
u725608977
1475428331
Python
Python (2.7.6)
py
Runtime Error
16
2572
175
N, A, B = map(int, raw_input().split()) #t_li = [] cnt = 0 for i in range(len(N)): if A <= int(raw_input()) < B: cnt +=1 # t_li.append(raw_input()) print N-cnt
File "/tmp/tmpx_6lfzjp/tmp0ocbw6o4.py", line 9 print N-cnt ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s482962584
p03976
u620480037
1597011634
Python
PyPy3 (7.3.0)
py
Runtime Error
114
76264
261
N,K=map(int,input().split()) D={} for i in range(N): s=input() if s[0] not in D: D[s[0]]=1 else: D[s[0]]+=1 #print(D) MAX=0 for k,v in D.items(): if MAX < v: MAX = v #print(MAX) NOTM = N - MAX print(min(MAX,NOTM//(K-1)))
Traceback (most recent call last): File "/tmp/tmptdyfbfp8/tmp5zl7qjje.py", line 1, in <module> N,K=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s358563373
p03976
u145950990
1586314256
Python
PyPy3 (2.4.0)
py
Runtime Error
258
44632
323
n,k = map(int,input().split()) p = [input()[0] for i in range(n)] from collections import Counter c = Counter(p) v = list(c.values()) ans = 0 while len(v)>=k: c = 0 while c<k and len(v)!=0: if v[c]==0: v.pop(c) else: v[c] -= 1 c+=1 if c==k:ans += 1 print(a...
Traceback (most recent call last): File "/tmp/tmp6rt_1jqy/tmpixwb_udo.py", line 1, in <module> n,k = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s277907603
p03976
u145950990
1586313974
Python
PyPy3 (2.4.0)
py
Runtime Error
262
43864
324
n,k = map(int,input().split()) p = [input()[0] for i in range(n)] from collections import Counter c = Counter(p) v = list(c.values()) ans = 0 while len(v)>=k: c = 0 while c<3 and len(v)!=0: if v[c]==0: v.pop(c) else: v[c] -= 1 c+=1 if c==3:ans += 1 print(a...
Traceback (most recent call last): File "/tmp/tmp78700qe4/tmpoifm52dh.py", line 1, in <module> n,k = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s720886690
p03976
u356832650
1505271286
Python
Python (3.4.3)
py
Runtime Error
78
3064
377
N,K = list(map(int, input().split(' '))) d = {} for i in range(N): S = str(input())[0] if S in d: d[S] += 1 else: d[S] = 1 p = list(d.values()) if len(p) < K: print(0) sys.exit() c = 0 while(len(p) >= K): c += 1 sq = sorted(p, reverse=True) for i in range(K): sq[i...
Traceback (most recent call last): File "/tmp/tmpxcm80860/tmpsqz8mhqw.py", line 1, in <module> N,K = list(map(int, input().split(' '))) ^^^^^^^ EOFError: EOF when reading a line
s342951462
p03976
u356832650
1505186246
Python
Python (3.4.3)
py
Runtime Error
40
3060
264
from heapq import heappush, heappop import sys N,K = list(map(int, input().split(' '))) d = {} for i in range(N): S = str(input())[0] if S in d: d[S] += 1 else: d[S] = 1 p = list(d.values()) if len(p) < K: print(0) sys.exit(1)
Traceback (most recent call last): File "/tmp/tmpxjrl5d7g/tmpdysa3nd6.py", line 4, in <module> N,K = list(map(int, input().split(' '))) ^^^^^^^ EOFError: EOF when reading a line
s303037442
p03976
u356832650
1505183981
Python
Python (3.4.3)
py
Runtime Error
37
3064
433
from heapq import heappush, heappop import sys N,K = list(map(int, input().split(' '))) d = {} for i in range(N): S = str(input())[0] if S in d: d[S] += 1 else: d[S] = 1 p = list(d.values()) if len(p) < K: print(0) sys.exit(1) h = [] for i in p: heappush(h, i) #while(len(h) > ...
Traceback (most recent call last): File "/tmp/tmpl3jsr1uy/tmp7s5xj_2s.py", line 4, in <module> N,K = list(map(int, input().split(' '))) ^^^^^^^ EOFError: EOF when reading a line
s064170117
p03976
u356832650
1505179730
Python
Python (3.4.3)
py
Runtime Error
36
3064
389
from heapq import heappush, heappop import sys N,K = list(map(int, input().split(' '))) d = {} for i in range(N): S = str(input())[0] if S in d: d[S] += 1 else: d[S] = 1 p = list(d.values()) if len(p) < K: print(0) sys.exit(1) h = [] for i in p: heappush(h, i) while(len(h) > K...
Traceback (most recent call last): File "/tmp/tmpkwgxy54f/tmpoz53dbtb.py", line 4, in <module> N,K = list(map(int, input().split(' '))) ^^^^^^^ EOFError: EOF when reading a line
s980835808
p03976
u356832650
1505179337
Python
Python (3.4.3)
py
Runtime Error
35
3188
407
from heapq import heappush, heappop import sys N,K = list(map(int, input().split(' '))) d = {} for i in range(N): S = str(input())[0] if S in d: d[S] += 1 else: d[S] = 1 p = list(d.values()) if len(p) < K: print(0) sys.exit(1) h = [] for i in p: heappush(h, i) while(len(h) > K...
Traceback (most recent call last): File "/tmp/tmp9z_ptgia/tmp53r28q1c.py", line 4, in <module> N,K = list(map(int, input().split(' '))) ^^^^^^^ EOFError: EOF when reading a line
s754665906
p03976
u356832650
1505168778
Python
Python (3.4.3)
py
Runtime Error
36
3064
388
from heapq import heappush, heappop import sys N,K = list(map(int, input().split(' '))) d = {} for i in range(N): S = str(input())[0] if S in d: d[S] += 1 else: d[S] = 1 p = list(d.values()) if len(p) < K: print(0) sys.exit(1) h = [] for i in p: heappush(h, i) while(len(h) > K...
Traceback (most recent call last): File "/tmp/tmpu6c7hdih/tmp7wm8eyo8.py", line 4, in <module> N,K = list(map(int, input().split(' '))) ^^^^^^^ EOFError: EOF when reading a line
s459818539
p03976
u356832650
1505168629
Python
Python (3.4.3)
py
Runtime Error
37
3064
389
from heapq import heappush, heappop import sys N,K = list(map(int, input().split(' '))) d = {} for i in range(N): S = str(input())[0] if S in d: d[S] += 1 else: d[S] = 1 p = list(d.values()) if len(p) < K: print(0) sys.exit(1) h = [] for i in p: heappush(h, i) while(len(h) > K...
Traceback (most recent call last): File "/tmp/tmpeooqf_7n/tmpqt244l0p.py", line 4, in <module> N,K = list(map(int, input().split(' '))) ^^^^^^^ EOFError: EOF when reading a line
s473328368
p03976
u356832650
1505168512
Python
Python (3.4.3)
py
Runtime Error
35
3188
390
from heapq import heappush, heappop import sys N,K = list(map(int, input().split(' '))) d = {} for i in range(N): S = str(input())[0] if S in d: d[S] += 1 else: d[S] = 1 p = list(d.values()) if len(p) < K: print(0) sys.exit(1) h = [] for i in p: heappush(h, i) while(len(h) != ...
Traceback (most recent call last): File "/tmp/tmpu8hy0xwo/tmpjhorx4iv.py", line 4, in <module> N,K = list(map(int, input().split(' '))) ^^^^^^^ EOFError: EOF when reading a line
s209405596
p03976
u296290704
1476466017
Python
Python (2.7.6)
py
Runtime Error
32
2948
180
n,k=map(int,raw_input().split()) c=[0]*200 r=range(n) for i in r:c[ord(raw_input()[0])]+=1 c.sort() p=a=0 while p<1: p=k;a+=1 for i in r: if p*c[-i-1]:p-=1;c[-i-1]-=1 print a-1
File "/tmp/tmpuap049_l/tmpd5ncqz0b.py", line 11 print a-1 ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s370431936
p03976
u805593120
1475825554
Python
PyPy2 (5.6.0)
py
Runtime Error
203
19868
430
#!/usr/bin/python from collections import defaultdict from heapq import * import sys d=defaultdict(int) n,k=map(int,sys.stdin.readline().split()) for _ in range(n): s=sys.stdin.readline().strip() d[s[0]]-=1 if len(d)<k: print(0) else: q=[] for khi in d: heappush(q,[d[khi],khi]) r=0 while 1: a=[heappop(q) for...
Traceback (most recent call last): File "/tmp/tmpywjv0hm7/tmp0q_fbjct.py", line 6, in <module> n,k=map(int,sys.stdin.readline().split()) ^^^ ValueError: not enough values to unpack (expected 2, got 0)
s812637670
p03976
u805593120
1475824972
Python
PyPy2 (5.6.0)
py
Runtime Error
206
19868
430
#!/usr/bin/python from collections import defaultdict from heapq import * import sys d=defaultdict(int) n,k=map(int,sys.stdin.readline().split()) for _ in range(n): s=sys.stdin.readline().strip() d[s[0]]-=1 if len(d)<k: print(0) else: q=[] for khi in d: heappush(q,[d[khi],khi]) r=0 while 1: a=[heappop(q) for...
Traceback (most recent call last): File "/tmp/tmpl17ckzyu/tmpu43qoe_h.py", line 6, in <module> n,k=map(int,sys.stdin.readline().split()) ^^^ ValueError: not enough values to unpack (expected 2, got 0)
s560463178
p03976
u732391415
1475429549
Python
Python (3.4.3)
py
Runtime Error
23
3064
583
n, k = map(lambda x: int(x), input().split()) p = [] for i in range(n): p.append(input()) count = 0 while True: if len(p) == 0: break head = [] dummy = p[:] for item in dummy: if not item[0] in head: head.append(item[0]) ...
File "/tmp/tmpcalrnptb/tmplt6ls_mn.py", line 23 ~ ^ SyntaxError: invalid syntax
s970689352
p03976
u765237551
1475429135
Python
Python (3.4.3)
py
Runtime Error
22
3064
312
afrom collections import Counter n, k = map(int, input().split()) ps = [input() for _ in range(n)] heads = Counter((p[0] for p in ps)) ans = 0 while len(heads) >= k: ans += 1 for h, c in heads.most_common()[:k]: if c==1: heads.pop(h) else: heads[h] -= 1 print(ans)
File "/tmp/tmpshlm_q3m/tmpcbw1konf.py", line 1 afrom collections import Counter ^^^^^^^^^^^ SyntaxError: invalid syntax
s722725651
p03979
u844789719
1594800001
Python
Python (3.8.2)
py
Runtime Error
477
44920
874
import sys import itertools from scipy.sparse import csr_matrix, lil_matrix from scipy.sparse.csgraph import maximum_flow H, W = map(int, sys.stdin.buffer.readline().split()) S = b''.join(sys.stdin.buffer.read().split()) source = 2 * H * W sink = source + 1 INF = source * 2 graph = lil_matrix((sink + 1, sink + 1), ...
Traceback (most recent call last): File "/tmp/tmpixbyp7d2/tmpf_vkkofj.py", line 6, in <module> H, W = map(int, sys.stdin.buffer.readline().split()) ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s969996173
p03979
u844789719
1594799169
Python
Python (3.8.2)
py
Runtime Error
2211
164948
836
import sys import itertools import networkx as nx H, W = map(int, sys.stdin.buffer.readline().split()) S = b''.join(sys.stdin.buffer.read().split()) source = 2 * H * W sink = source + 1 INF = 10**12 graph = nx.DiGraph() graph.add_nodes_from(range(sink)) def add(start, end, cap): graph.add_edge(start, end, capac...
Traceback (most recent call last): File "/tmp/tmp31z6h6dk/tmplbke36es.py", line 4, in <module> H, W = map(int, sys.stdin.buffer.readline().split()) ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s411033106
p03979
u844789719
1594799078
Python
Python (3.8.2)
py
Runtime Error
2210
165408
849
import sys import itertools import networkx as nx H, W = map(int, sys.stdin.buffer.readline().split()) S = b''.join(sys.stdin.buffer.read().split()) source = 2 * H * W sink = source + 1 INF = source * 2 graph = nx.DiGraph() graph.add_nodes_from(range(sink)) for i in range(H * W): x, y = divmod(i, W) if S[i]...
Traceback (most recent call last): File "/tmp/tmp6j39azwq/tmp5z1_h1ac.py", line 4, in <module> H, W = map(int, sys.stdin.buffer.readline().split()) ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s518999936
p03979
u844789719
1594798744
Python
Python (3.8.2)
py
Runtime Error
2209
164692
815
import sys import itertools import networkx as nx H, W = map(int, sys.stdin.buffer.readline().split()) S = b''.join(sys.stdin.buffer.read().split()) source = 2 * H * W sink = source + 1 INF = source * 2 graph = nx.DiGraph() for i in range(H * W): x, y = divmod(i, W) if S[i] == ord('.'): graph.add_ed...
Traceback (most recent call last): File "/tmp/tmpgjre9rkh/tmp591hnqiu.py", line 4, in <module> H, W = map(int, sys.stdin.buffer.readline().split()) ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s391211627
p03979
u844789719
1594798625
Python
Python (3.8.2)
py
Runtime Error
2209
164628
809
import sys import itertools import networkx as nx H, W = map(int, sys.stdin.buffer.readline().split()) S = b''.join(sys.stdin.buffer.read().split()) source = 2 * H * W sink = source + 1 INF = source * 2 graph = nx.DiGraph() def add(start, end, cap): graph.add_edge(start, end, capacity=cap) for i in range(H *...
Traceback (most recent call last): File "/tmp/tmp96oeekbw/tmpm9c5fawl.py", line 4, in <module> H, W = map(int, sys.stdin.buffer.readline().split()) ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s453241842
p03979
u844789719
1594798607
Python
Python (3.8.2)
py
Runtime Error
339
59188
775
import sys import itertools import networkx as nx H, W = [int(_) for _ in input().split()] S = b''.join(sys.stdin.buffer.read().split()) source = 2 * H * W sink = source + 1 INF = H * W * 3 graph = nx.DiGraph() def add(start, end, cap): graph.add_edge(start, end, capacity=cap) for i in range(H * W): x, y...
Traceback (most recent call last): File "/tmp/tmpaian9kxl/tmpy8cgzysv.py", line 4, in <module> H, W = [int(_) for _ in input().split()] ^^^^^^^ EOFError: EOF when reading a line
s355286817
p03979
u844789719
1594798394
Python
Python (3.8.2)
py
Runtime Error
2209
164716
805
import sys import itertools import networkx as nx H, W = map(int, sys.stdin.buffer.readline().split()) S = b''.join(sys.stdin.buffer.read().split()) source = 2 * H * W sink = source + 1 INF = 10**12 graph = nx.DiGraph() def add(start, end, cap): graph.add_edge(start, end, capacity=cap) for i in range(H * W):...
Traceback (most recent call last): File "/tmp/tmp_jb61gjp/tmp68s2z3y8.py", line 4, in <module> H, W = map(int, sys.stdin.buffer.readline().split()) ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s018607820
p03979
u844789719
1594798372
Python
Python (3.8.2)
py
Runtime Error
341
58892
772
import sys import itertools import networkx as nx H, W = [int(_) for _ in input().split()] S = b''.join(sys.stdin.buffer.read().split()) source = 2 * H * W sink = source + 1 INF = 10**12 graph = nx.DiGraph() def add(start, end, cap): graph.add_edge(start, end, capacity=cap) for i in range(H * W): x, y = ...
Traceback (most recent call last): File "/tmp/tmp7ja9dly_/tmpbi6jbc_n.py", line 4, in <module> H, W = [int(_) for _ in input().split()] ^^^^^^^ EOFError: EOF when reading a line
s069664262
p03979
u844789719
1594797574
Python
Python (3.8.2)
py
Runtime Error
2210
164820
803
import sys import itertools import networkx as nx H, W = map(int, sys.stdin.buffer.readline().split()) S = b''.join(sys.stdin.buffer.read().split()) source = 2 * H * W sink = source + 1 INF = 10**12 graph = nx.DiGraph() def add(start, end, cap): graph.add_edge(start, end, capacity=cap) for i in range(H * W):...
Traceback (most recent call last): File "/tmp/tmpu59omqk6/tmput5w9met.py", line 4, in <module> H, W = map(int, sys.stdin.buffer.readline().split()) ^^^^ ValueError: not enough values to unpack (expected 2, got 0)
s532351225
p03979
u844789719
1594797258
Python
Python (3.8.2)
py
Runtime Error
336
58896
791
import sys import itertools import networkx as nx H, W = [int(_) for _ in input().split()] S = b''.join(sys.stdin.buffer.read().split()) source = 2 * H * W sink = source + 1 INF = 10**12 graph = nx.DiGraph() def add(start, end, cap): graph.add_edge(start, end, capacity=cap) for i in range(H * W): x, y = ...
Traceback (most recent call last): File "/tmp/tmpy_zz86y_/tmpvvkf22ot.py", line 4, in <module> H, W = [int(_) for _ in input().split()] ^^^^^^^ EOFError: EOF when reading a line
s797154725
p03979
u950384958
1475967441
Python
PyPy2 (5.6.0)
py
Runtime Error
39
9200
4663
H, W = map(int, raw_input().split()) S_list = list() for i in range(H): S_list.append(raw_input()) # large_const large_const = 100000 # X_mat = np.zeros((H, W), dtype='int') X_mat = [[0]*W]*H # input for h in range(H): for w in range(W): if S_list[h][w] == 'X': X_mat[h, w] += 1 # make g...
File "/tmp/tmprgi9b72y/tmpqod0v_30.py", line 147 print res ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s544191437
p03979
u950384958
1475966894
Python
PyPy2 (5.6.0)
py
Runtime Error
39
9072
4711
import numpy as np H, W = map(int, raw_input().split()) S_list = list() for i in range(H): S_list.append(raw_input()) # large_const large_const = 100000 X_mat = np.zeros((H, W), dtype='int') S_mat_extend = np.zeros((H+2, W+2), dtype='int') # input for h in range(H): for w in range(W): if S_list[h][w...
File "/tmp/tmp5iugs0oi/tmp2dcazg8z.py", line 148 print res ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s850564736
p03979
u950384958
1475649022
Python
Python (2.7.6)
py
Runtime Error
18
2948
2684
X_mat = np.zeros((H, W), dtype='int') S_mat_extend = np.zeros((H+2, W+2), dtype='int') # input for h in range(H): for w in range(W): if S_list[h][w] == 'X': X_mat[h, w] += 1 # make graph G = dict() def add_node(s, Graph=G): Graph[s] = {'edges':dict()} def add_edge(s, t, weight=1, Gra...
File "/tmp/tmpni3pkdgh/tmp26c45bxm.py", line 96 print res ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s308192847
p03986
u023229441
1599891042
Python
PyPy3 (7.3.0)
py
Runtime Error
92
74900
131
s=input() ; n=len(s) for i in range(10000): s=s.replace("ST","") if a==s: print(len(s));exit() a=s print(len(s))
Traceback (most recent call last): File "/tmp/tmpw43i44h7/tmpg2tf0d5v.py", line 1, in <module> s=input() ; n=len(s) ^^^^^^^ EOFError: EOF when reading a line
s253091876
p03986
u375695365
1599615507
Python
PyPy3 (7.3.0)
py
Runtime Error
94
74576
175
x=list(input()) s=0 t=0 ans=0 for i in range(len(x)): if x[i]="S": s+=1 else: if s==0: ans+=1 else: s-=1 print(ans+s)
File "/tmp/tmptv3uuyie/tmpm5ftywto.py", line 6 if x[i]="S": ^^^^ SyntaxError: cannot assign to subscript here. Maybe you meant '==' instead of '='?
s237478086
p03986
u375695365
1599615343
Python
PyPy3 (7.3.0)
py
Runtime Error
89
74564
179
x=input() x=list(x) s=0 t=0 ans=0 for i in range(len(x)): if x[i]="S": s+=1 else: if s==0: ans+=1 else: s-=1 print(ans+s)
File "/tmp/tmp5dnp9vob/tmpj6kj5gs5.py", line 7 if x[i]="S": ^^^^ SyntaxError: cannot assign to subscript here. Maybe you meant '==' instead of '='?
s730412279
p03986
u629454253
1598113502
Python
PyPy3 (7.3.0)
py
Runtime Error
445
314276
225
X = input() idx = 0 while idx < len(X): print(idx, X) if X[idx] == 'S': if idx+1 < len(X) and X[idx+1] == 'T': X = X[:idx] + X[idx+2:] idx = max(-1, idx-2) idx += 1 print(len(X))
Traceback (most recent call last): File "/tmp/tmpcmm68_me/tmpi682mfag.py", line 1, in <module> X = input() ^^^^^^^ EOFError: EOF when reading a line
s231587318
p03986
u062691227
1596920701
Python
PyPy3 (7.3.0)
py
Runtime Error
109
74736
207
ans = 0 cnt_s = cnt_t = 0 for c in s: if c == 'S': cnt_s += 1 else: cnt_t += 1 if cnt_t > cnt_s: ans += cnt_s cnt_s = cnt_t = 0 ans += cnt_s print(len(s) - ans*2)
Traceback (most recent call last): File "/tmp/tmp1x7262yj/tmp4ddpd7y1.py", line 4, in <module> for c in s: ^ NameError: name 's' is not defined
s974952176
p03986
u871841829
1595656078
Python
Python (3.8.2)
py
Runtime Error
24
8920
171
X = input() cache = 0 ans = len(X) for c in X: if c == 'S' cache += 1 else: if cache > 0: cache -= 1 ans -= 2 print(ans)
File "/tmp/tmp_rsnycj7/tmptn31se5v.py", line 7 if c == 'S' ^ SyntaxError: expected ':'
s185198142
p03986
u747703115
1594688573
Python
Python (3.8.2)
py
Runtime Error
25
9224
77
X = input() while X!=X_: X_ = X X = X.replace('ST', '') print(len(X))
Traceback (most recent call last): File "/tmp/tmpj7anekpr/tmpq0mqj5b1.py", line 1, in <module> X = input() ^^^^^^^ EOFError: EOF when reading a line
s459104289
p03986
u941438707
1594164780
Python
Python (3.8.2)
py
Runtime Error
69
10452
573
x=input() a=[1] for i in range(1,len(x)): if x[i]==x[i-1]: a[-1]+=1 else:a+=[1] ans=0 if x[0]=="T": ans+=a.pop(0) if x[-1]=="S": ans+=a.pop(-1) while len(a)>1: a=[i-j for i,j in zip(a[::2],a[1::2]) if i!=j] while a and a[0]<0: ans+=abs(a.pop(0)) while a and a[-1]>0: ...
Traceback (most recent call last): File "/tmp/tmpl1s37n1l/tmp7wk64zo5.py", line 1, in <module> x=input() ^^^^^^^ EOFError: EOF when reading a line
s363244615
p03986
u941438707
1594164718
Python
Python (3.8.2)
py
Runtime Error
68
10616
572
x=input() a=[1] for i in range(1,len(x)): if x[i]==x[i-1]: a[-1]+=1 else:a+=[1] ans=0 if x[0]=="T": ans+=a.pop(0) if x[-1]=="S": ans+=a.pop(-1) while len(a)>1: a=[i-j for i,j in zip(a[::2],a[1::2]) if i!=j] while a and a[0]<0: ans+=abs(a.pop(0)) while a and a[-1]>0: ...
Traceback (most recent call last): File "/tmp/tmp2w82ny82/tmpy028_4ev.py", line 1, in <module> x=input() ^^^^^^^ EOFError: EOF when reading a line
s672175138
p03986
u941438707
1594164117
Python
Python (3.8.2)
py
Runtime Error
72
10512
407
x=input() a=[1] for i in range(1,len(x)): if x[i]==x[i-1]: a[-1]+=1 else:a+=[1] ans=0 if x[0]=="T": ans+=a.pop(0) if x[-1]=="S": ans+=a.pop(-1) while len(a)>1: a=[i-j for i,j in zip(a[::2],a[1::2]) if i!=j] if a and a[0]<0: ans-=a.pop(0) if a and [-1]>0: ...
Traceback (most recent call last): File "/tmp/tmpbz4rm_20/tmpm2fiwiyp.py", line 1, in <module> x=input() ^^^^^^^ EOFError: EOF when reading a line
s408886875
p03986
u941438707
1594163945
Python
Python (3.8.2)
py
Runtime Error
82
10288
449
x=input() a=[1] for i in range(1,len(x)): if x[i]==x[i-1]: a[-1]+=1 else:a+=[1] ans=0 if x[0]=="T": ans+=a.pop(0) if x[-1]=="S": ans+=a.pop(-1) while len(a)>1: a=[a[i]-a[i+1] for i in range(0,len(a),2)] a=[i for i in a if i!=0] if a: if a[0]<0: ans-=a.pop...
Traceback (most recent call last): File "/tmp/tmptass7wo3/tmp_82u5rz6.py", line 1, in <module> x=input() ^^^^^^^ EOFError: EOF when reading a line
s520035829
p03986
u941438707
1594163869
Python
Python (3.8.2)
py
Runtime Error
83
10164
420
x=input() a=[1] for i in range(1,len(x)): if x[i]==x[i-1]: a[-1]+=1 else:a+=[1] ans=0 if x[0]=="T": ans+=a.pop(0) if x[-1]=="S": ans+=a.pop(-1) while len(a)>1: a=[a[i]-a[i+1] for i in range(0,len(a),2)] if a: if a[0]<0: ans-=a.pop(0) if a: if a[-1...
Traceback (most recent call last): File "/tmp/tmpfqmzqpcm/tmphm1xa552.py", line 1, in <module> x=input() ^^^^^^^ EOFError: EOF when reading a line
s361070311
p03986
u941438707
1594163779
Python
Python (3.8.2)
py
Runtime Error
80
10392
412
x=input() a=[1] for i in range(1,len(x)): if x[i]==x[i-1]: a[-1]+=1 else:a+=[1] ans=0 if x[0]=="T": ans+=a.pop(0) if x[-1]=="S": ans+=a.pop(-1) while len(a)>1: a=[a[i]-a[i+1] for i in range(0,len(a),2)] if a: if a[0]<0: ans-=a.pop(0) if a: if a[-1...
Traceback (most recent call last): File "/tmp/tmp3ahmqk3g/tmpflt6d1m2.py", line 1, in <module> x=input() ^^^^^^^ EOFError: EOF when reading a line
s665003904
p03986
u941438707
1594163607
Python
Python (3.8.2)
py
Runtime Error
80
10260
388
x=input() a=[1] for i in range(1,len(x)): if x[i]==x[i-1]: a[-1]+=1 else:a+=[1] ans=0 if x[0]=="T": ans+=a.pop(0) if x[-1]=="S": ans+=a.pop(-1) while len(a)>1: a=[a[i]-a[i+1] for i in range(0,len(a),2)] if a: if a[0]<0: ans-=a.pop(0) if a: if a[-1...
Traceback (most recent call last): File "/tmp/tmpo362x7rd/tmpg_eavz7f.py", line 1, in <module> x=input() ^^^^^^^ EOFError: EOF when reading a line
s746581216
p03986
u941438707
1594163555
Python
Python (3.8.2)
py
Runtime Error
81
10316
364
x=input() a=[1] for i in range(1,len(x)): if x[i]==x[i-1]: a[-1]+=1 else:a+=[1] ans=0 if x[0]=="T": ans+=a.pop(0) if x[-1]=="S": ans+=a.pop(-1) while len(a)>1: a=[a[i]-a[i+1] for i in range(0,len(a),2)] if a and a[0]<0: ans-=a.pop(0) if a and a[-1]>0: ans+=a....
Traceback (most recent call last): File "/tmp/tmp22wr85bj/tmp6ve_v4ge.py", line 1, in <module> x=input() ^^^^^^^ EOFError: EOF when reading a line
s940777278
p03986
u594803920
1594124177
Python
PyPy3 (7.3.0)
py
Runtime Error
105
82092
156
x = list(input()) cnt = 0 for i in x: if x == 'S': cnt += 1 elif y == 'T': if cnt > 0: cnt -= 1 else: continue print(len(x)-cnt)
Traceback (most recent call last): File "/tmp/tmpeyjbf9mx/tmpq2tcw468.py", line 1, in <module> x = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s721998750
p03986
u437215432
1593984426
Python
PyPy2 (7.3.0)
py
Runtime Error
331
86452
96
# AGC005A # TLE 2/13 x = input() while 'ST' in x: x = x.replace('ST', '', 1) print(len(x))
Traceback (most recent call last): File "/tmp/tmpl6jzr4fy/tmp1xwvoaok.py", line 4, in <module> x = input() ^^^^^^^ EOFError: EOF when reading a line
s527386021
p03986
u793868662
1593314968
Python
Python (3.8.2)
py
Runtime Error
62
10516
411
def resolve(): from collections import deque x = input() final = deque([]) final.append(x[0]) for i in range(1, len(x)): if x[i] == "S": final.append("S") else: last = final.pop() if last == "S": continue else: ...
Traceback (most recent call last): File "/tmp/tmp_c13cjhc/tmpc3jq03vj.py", line 18, in <module> resolve() File "/tmp/tmp_c13cjhc/tmpc3jq03vj.py", line 3, in resolve x = input() ^^^^^^^ EOFError: EOF when reading a line
s079101559
p03986
u780475861
1591916671
Python
Python (3.4.3)
py
Runtime Error
72
4992
161
x = input() res = [x[0]] for i in x[1:]: if i == 'S': res += [i] else: if res[-1] == 'S': res.pop() else: res += [i] print(len(res))
Traceback (most recent call last): File "/tmp/tmpfxga8jad/tmpooyq16j9.py", line 1, in <module> x = input() ^^^^^^^ EOFError: EOF when reading a line
s060375222
p03986
u923270446
1591487451
Python
Python (3.4.3)
py
Runtime Error
43
3500
96
x=input() s,a=0,0 for i in x: if i=="S": s+=1 elif s==0: ans+=1 else: s-=1 print(ans+s)
Traceback (most recent call last): File "/tmp/tmpx79z4qjx/tmp7cyd6ugx.py", line 1, in <module> x=input() ^^^^^^^ EOFError: EOF when reading a line
s230499317
p03986
u897328029
1589751704
Python
Python (3.4.3)
py
Runtime Error
164
150120
1671
#!/usr/bin/env python3 X = input() N = len(X) after_x = "" next_i = 0 # 連続する箇所で部分文字列を作りたい if X[0] == "T": # Tから始まる場合、最初の連続するTは確定で残る for i, x in enumerate(X): if x == "T": after_x += x else: break next_i = i if next_i < N - 1: # 残りの文字列について操作する(最初のTは処理したので、必ずSから始ま...
Traceback (most recent call last): File "/tmp/tmp807pt5jt/tmpxqibion4.py", line 3, in <module> X = input() ^^^^^^^ EOFError: EOF when reading a line
s024182117
p03986
u223504018
1588812082
Python
PyPy3 (2.4.0)
py
Runtime Error
167
38384
313
#include <bits/stdc++.h> using namespace std; int main(){ string x;cin>>x; int i=0; int k=x.size(); while(i<k){ if(i>=0&&i<k-1){ if(x.substr(i,2)=="ST"){ x.replace(i,2,""); i=i-2; k=x.size(); } } i++; } cout<<x.size()<<endl; }
File "/tmp/tmp55m4lzq3/tmpztddk7tf.py", line 2 using namespace std; ^^^^^^^^^ SyntaxError: invalid syntax
s906872095
p03986
u026788530
1588691976
Python
Python (3.4.3)
py
Runtime Error
17
2940
124
s=input() c=0 ans=0 for i in range(len(s)): if s[i]=='T': c+=1 if s[i]='S': c-=1 ans = max(ans,c) print(ans*2)
File "/tmp/tmpxkrj1lel/tmps7p65sd5.py", line 7 if s[i]='S': ^^^^ SyntaxError: cannot assign to subscript here. Maybe you meant '==' instead of '='?
s215998805
p03986
u026788530
1588691951
Python
Python (3.4.3)
py
Runtime Error
17
2940
119
s=input() c=0 ans=0 for i in range(n): if s[i]=='T': c+=1 if s[i]='S': c-=1 ans = max(ans,c) print(ans*2)
File "/tmp/tmpuanvyib5/tmp0tihm57b.py", line 7 if s[i]='S': ^^^^ SyntaxError: cannot assign to subscript here. Maybe you meant '==' instead of '='?
s886277453
p03986
u345966487
1587119801
Python
Python (3.4.3)
py
Runtime Error
18
3500
88
X=input() t,s=0,0 for x in X: if x=='S':ns+=1 elif ns>0:ns-=1 else:nt+=1 print(nt+ns)
Traceback (most recent call last): File "/tmp/tmpdinzi2rf/tmp2rkjjatp.py", line 1, in <module> X=input() ^^^^^^^ EOFError: EOF when reading a line
s111676506
p03986
u345966487
1587116177
Python
PyPy3 (2.4.0)
py
Runtime Error
1058
61552
391
import sys X = list(sys.stdin.readline().strip()) N = len(X) def solve(): cnt = 0 i = 0 while True: while i < N and X[i] != 'S': i += 1 j = i + 1 while j < N and X[j] != 'T': j += 1 if j == N: return N - 2*cnt cnt += 1 X[i]...
Traceback (most recent call last): File "/tmp/tmpuquddv1f/tmp_6qd1xxd.py", line 22, in <module> print(solve()) ^^^^^^^ File "/tmp/tmpuquddv1f/tmp_6qd1xxd.py", line 17, in solve X[i] = ' ' ~^^^ IndexError: list assignment index out of range
s453951949
p03986
u102242691
1586142637
Python
Python (3.4.3)
py
Runtime Error
17
2940
305
X = input() ans = [] for x in X: if x == "S": ans.append(x) else: if len(ans) != 0: if ans [-1] == "S": ans.pop() else: ans.append(x) else: ans.append(x) print(len(ans))
File "/tmp/tmp_htfnzhp/tmpuksy16xk.py", line 6 else: ^^^^ SyntaxError: invalid syntax
s754170333
p03986
u521518741
1585830169
Python
PyPy3 (2.4.0)
py
Runtime Error
175
38384
247
X = input() stack = [] for s in X: if not stack: stack.append(s) continue if s == 'T' and stack[-1] == 'S': stack.pop() else: stack.append(s) print(len(stack))
File "/tmp/tmpwmf4ku5y/tmppsg9ii4n.py", line 1 X = input() IndentationError: unexpected indent
s835449664
p03986
u521518741
1585829849
Python
PyPy3 (2.4.0)
py
Runtime Error
165
38256
180
X = input() stack = [] for s in X: if not stack: stack.append(s) continue if s == 'T' and stack[-1] == 'S': stack.pop() else: stack.append(s) print(len(stack))
File "/tmp/tmphm9m1pv_/tmpfx02628r.py", line 6 continue TabError: inconsistent use of tabs and spaces in indentation
s670062610
p03986
u521518741
1585829775
Python
PyPy3 (2.4.0)
py
Runtime Error
173
38468
152
X = input() stack = [] for s in X: if not stack: stack.append(s) continue if s == 'T' and stack[-1] == 'S': stack.pop() print(len(stack))
File "/tmp/tmpx8luh9o8/tmpd3pvo8an.py", line 6 continue TabError: inconsistent use of tabs and spaces in indentation
s747639117
p03986
u152891327
1584815633
Python
Python (3.4.3)
py
Runtime Error
1056
3804
292
X = input() mLoop = 10 ** 1000 i = 0 while i < mLoop: p = X.find('ST') if p == -1: break q = p + 2 p -= 1 while p >= 0 and i < mLoop: if not(X[p] == 'S' and X[q] == 'T'): break p -= 1 q += 1 i += 1 X = ''.join([X[:p + 1],X[q:]]) i += 1 print(len(X))
Traceback (most recent call last): File "/tmp/tmpaetlzf5n/tmpa8xh7n24.py", line 1, in <module> X = input() ^^^^^^^ EOFError: EOF when reading a line
s350283125
p03986
u287500079
1583755246
Python
Python (3.4.3)
py
Runtime Error
39
5716
1183
import sys, re, os from collections import deque, defaultdict, Counter from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians from itertools import permutations, combinations, product, accumulate from operator import itemgetter, mul from copy import deepcopy from string import ascii_lowercase, ascii_upper...
Traceback (most recent call last): File "/tmp/tmpjjqr4x46/tmpmzfkjx73.py", line 8, in <module> from fractions import gcd ImportError: cannot import name 'gcd' from 'fractions' (/root/miniconda3/envs/sandbox-runtime/lib/python3.11/fractions.py)
s130332102
p03986
u287500079
1583754983
Python
Python (3.4.3)
py
Runtime Error
39
5712
1114
import sys, re, os from collections import deque, defaultdict, Counter from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians from itertools import permutations, combinations, product, accumulate from operator import itemgetter, mul from copy import deepcopy from string import ascii_lowercase, ascii_upper...
Traceback (most recent call last): File "/tmp/tmpk9hjzupz/tmp332mk7m0.py", line 8, in <module> from fractions import gcd ImportError: cannot import name 'gcd' from 'fractions' (/root/miniconda3/envs/sandbox-runtime/lib/python3.11/fractions.py)
s953439580
p03986
u835924161
1583739390
Python
Python (3.4.3)
py
Runtime Error
96
4328
331
s=str(input()) co=int(1) n=len(s) A=[] for i in range(1,n): if s[i]!=s[i-1]: A.append(co) co=1 else: co+=1 A.append(co) m=len(A) how=0 if s[0]=='T': how=1 for i in range(how,m-how): if i%2!=how: continue if A[i]<A[i+1]: n-=2*A[i] else: n-=2*A[i+1...
Traceback (most recent call last): File "/tmp/tmp6xve93oh/tmphvdn01x8.py", line 1, in <module> s=str(input()) ^^^^^^^ EOFError: EOF when reading a line
s715532970
p03986
u287500079
1582397023
Python
Python (3.4.3)
py
Runtime Error
107
4328
299
x = str(input()) n = len(x) stack = [] for i in range(n): if x[i] == 'S': stack.append('S') elif x[i] == 'T' and (len(stack) == 0 or stack[len(stack) - 1]) == 'T': stack.append('T') elif x[i] == 'T' and stack[len(stack) - 1] == 'S': stack.pop() print(len(stack))
Traceback (most recent call last): File "/tmp/tmp6bd5odhy/tmpxjjxs6hv.py", line 1, in <module> x = str(input()) ^^^^^^^ EOFError: EOF when reading a line
s242239370
p03986
u561231954
1581178909
Python
Python (3.4.3)
py
Runtime Error
61
6204
198
x=list(input()) n=len(x) stack=[x[0]] for i in range(1,n): if x[i]=='S': stack.append('S') else: if stack[-1]=='S': stack.pop() else: stack.append('T') print(len(stack))
Traceback (most recent call last): File "/tmp/tmpckaaap_t/tmp2w3yrtdk.py", line 1, in <module> x=list(input()) ^^^^^^^ EOFError: EOF when reading a line
s909635895
p03986
u513434790
1579561934
Python
Python (3.4.3)
py
Runtime Error
88
13928
201
from itertools import groupby x = [[i,len(list(j))] for i,j in groupby(input())] ans = [] if x[0][0] == "T": ans.append(x[0][1]) if x[-1][0] == "S": ans.append(x[-1][1]) print(max(ans)*2)
Traceback (most recent call last): File "/tmp/tmprp6bhm9h/tmprhu_3ue4.py", line 2, in <module> x = [[i,len(list(j))] for i,j in groupby(input())] ^^^^^^^ EOFError: EOF when reading a line
s658962144
p03986
u472216275
1579459942
Python
PyPy3 (2.4.0)
py
Runtime Error
163
38256
199
s_list = list(input()) seizon_t = 0 s_amari = 0 for char in s_list: if char == "T": if s_amari == 0: seizon_t += 1: else: s_amari -= 1 else: s_amari += 1 print(2*seizon_t)
File "/tmp/tmp07rxeujj/tmp0vs1utnv.py", line 7 seizon_t += 1: ^ SyntaxError: invalid syntax
s354479051
p03986
u838644735
1579395730
Python
PyPy3 (2.4.0)
py
Runtime Error
184
47840
258
from collections import deque X = input() ret = deque([X[0]]) for i in range(1, len(X)): x = X[i] if x == 'S': ret.append(x) else: if ret[-1] == 'S': ret.pop() else: ret.append(x) print(len(ret))
Traceback (most recent call last): File "/tmp/tmpr03saasq/tmpwo13_8b1.py", line 3, in <module> X = input() ^^^^^^^ EOFError: EOF when reading a line
s964203029
p03986
u317713173
1577453623
Python
Python (3.4.3)
py
Runtime Error
80
3500
135
x = input() s = t = 0 for i in range(200000): if x[i] == "T": t += 1 if x[-i-1] == "S": s += 1 print(max(s, t))
Traceback (most recent call last): File "/tmp/tmpte1hhl_m/tmp8wgf2_dv.py", line 1, in <module> x = input() ^^^^^^^ EOFError: EOF when reading a line
s225259923
p03986
u317713173
1577453531
Python
Python (3.4.3)
py
Runtime Error
17
2940
133
x = input() s = t = 0 for i in range(200000): if x[i] = "T": t += 1 if x[-i-1] = "S": s += 1 print(max(s, t))
File "/tmp/tmp83lpp2mm/tmpctj7j955.py", line 4 if x[i] = "T": ^^^^ SyntaxError: cannot assign to subscript here. Maybe you meant '==' instead of '='?
s156593474
p03986
u317713173
1577453474
Python
Python (3.4.3)
py
Runtime Error
17
2940
124
x = input() for i in range(200000): if x[i] = "T": t += 1 if x[-i-1] = "S": s += 1 print(max(s, t))
File "/tmp/tmpqu6x6xhr/tmpcevyc_p7.py", line 4 if x[i] = "T": ^^^^ SyntaxError: cannot assign to subscript here. Maybe you meant '==' instead of '='?
s409276312
p03986
u557494880
1576709049
Python
Python (3.4.3)
py
Runtime Error
18
3500
311
S = input() n = len(S) ans = 0 s = 0 t = 0 for i in range(N): x = S[i] if x == 'S': s += 1 if t > 0: if s > t: s -= t else: t = t-s ans += t s = 0 else: t += 1 ans += s print(ans)
Traceback (most recent call last): File "/tmp/tmpnjdpn1ro/tmp475umd64.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s458345328
p03986
u593934357
1576365864
Python
Python (3.4.3)
py
Runtime Error
17
2940
367
x = input() i = len(x) cnt = 0 while True: if cnt > p = x.find('ST') if p != -1: cnt += 1 else: break n = p while True: if len(x) -1 > 0: if x[n-1] == 'S': cnt += 1 n -= 1 else: ...
File "/tmp/tmpsyr97cgd/tmpgwcjc0fa.py", line 6 if cnt > ^ SyntaxError: invalid syntax
s230478774
p03986
u673361376
1576207899
Python
PyPy3 (2.4.0)
py
Runtime Error
198
51292
304
def sol(): ti = 0 ans = lenX for i in range(lenX//2): while S[i]>=T[ti]: ti += 1 if ti>=lenX//2: return ans ans -= 2 ti += 1 return ans X = input() lenX = len(X) S = [] T = [] for i,x in enumerate(X): if x == 'S':S.append(i) else:T.append(i) print(sol())
Traceback (most recent call last): File "/tmp/tmpsv88wzl0/tmpdyf03jja.py", line 13, in <module> X = input() ^^^^^^^ EOFError: EOF when reading a line
s482391659
p03986
u374802266
1575886825
Python
Python (3.4.3)
py
Runtime Error
18
3500
162
s=input() a,b,n=0,0,len(s) for i in range(n): if s[i]==T: if a==0: b+=1 else: a-=1 else: a+=1 print(n-2*a)
Traceback (most recent call last): File "/tmp/tmp4ue4jl09/tmp6h27gu7h.py", line 1, in <module> s=input() ^^^^^^^ EOFError: EOF when reading a line
s487938127
p03986
u826771152
1575567641
Python
Python (3.4.3)
py
Runtime Error
17
2940
130
x = "TSTSTSTS" n = 0 filter = [n:n+1] for i in range(10**1000): if x[i:i+1] == "ST": x.pop(i) x.pop(i+1) print(len(x))
File "/tmp/tmpzok2ywix/tmpxzloy3r2.py", line 3 filter = [n:n+1] ^ SyntaxError: invalid syntax
s296237086
p03986
u905203728
1575063614
Python
Python (3.4.3)
py
Runtime Error
147
6308
325
s=list(input()) word,cnt=s[0],0 n=len(s) S="" for i in range(n): if word!=s[i]: S +=word+str(cnt) cnt=1 word=s[i] else: cnt +=1 S +=word+str(cnt) S +="G" S=list(S) cnt=0 for i in range(0,len(S)-1,2): if S[i]+S[i+2]=="ST": cnt +=(min(int(S[i+1]),int(S[i+3])))*2 print(n...
Traceback (most recent call last): File "/tmp/tmpdxwz3ot9/tmp1s3v8j3m.py", line 1, in <module> s=list(input()) ^^^^^^^ EOFError: EOF when reading a line
s835456732
p03986
u094191970
1574309957
Python
Python (3.4.3)
py
Runtime Error
19
3500
81
h,w=map(int,input().split()) for i in range(h): s=input() print(s+'\n'+s)
Traceback (most recent call last): File "/tmp/tmppddjx955/tmp388ie7jr.py", line 1, in <module> h,w=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s411131979
p03986
u256464928
1569466633
Python
Python (3.4.3)
py
Runtime Error
1056
4840
237
S = list(input()) cnt = len(S) while len(S) > 0: i = 0 while i < len(S)-1: if S[i] == "S" and S[i+1] == "T": S.pop(i) S.pop(i+1) i += 1 if cnt == len(S): print(len(S)) exit() cnt = len(S) print(len(S))
Traceback (most recent call last): File "/tmp/tmp18j8hi4_/tmpd1t03_r6.py", line 1, in <module> S = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s335802274
p03986
u948524308
1569279441
Python
Python (3.4.3)
py
Runtime Error
18
3500
107
X=input() S=0 for i in range(L): if X[-(1+i)]=="S": S+=1 else: break print(2*S)
Traceback (most recent call last): File "/tmp/tmpls0b9jyq/tmpkksfi1as.py", line 1, in <module> X=input() ^^^^^^^ EOFError: EOF when reading a line
s799756285
p03986
u993622994
1568127857
Python
Python (3.4.3)
py
Runtime Error
18
3500
118
X = input() for j in range(len(X//2)): X = X.replace('ST', '') if 'ST' not in X: break print(len(X))
Traceback (most recent call last): File "/tmp/tmpuf138vyd/tmpts6mlrg4.py", line 1, in <module> X = input() ^^^^^^^ EOFError: EOF when reading a line
s903248441
p03986
u993622994
1568127804
Python
Python (3.4.3)
py
Runtime Error
18
3500
113
X = input() for j in range(X//2): X = X.replace('ST', '') if 'ST' not in X: break print(len(X))
Traceback (most recent call last): File "/tmp/tmpx_5blw7l/tmpug58c8fp.py", line 1, in <module> X = input() ^^^^^^^ EOFError: EOF when reading a line
s000942539
p03986
u814986259
1567213129
Python
Python (3.4.3)
py
Runtime Error
22
6304
263
X = input() X = list(X) prev = "" for i in range(len(X) - 1): if X[i] + X[i + 1] == "ST": a = X.pop(i + 1) b = X.pop(i) X = [b,a].extend(X) for i in range(0, len(X)): if X[len(X) - (i+1)] == "T": print(i * 2) break
Traceback (most recent call last): File "/tmp/tmpxdta4qip/tmpaha2yryv.py", line 1, in <module> X = input() ^^^^^^^ EOFError: EOF when reading a line
s295609109
p03986
u703890795
1567069354
Python
Python (3.4.3)
py
Runtime Error
17
2940
106
X = input() l = len(X) while(True): l = len(X) X.replace("ST", "") if l = len(X): break print(X)
File "/tmp/tmpyjtz81uj/tmpv4vn9_cv.py", line 6 if l = len(X): ^^^^^^^^^^ SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
s461492079
p03986
u007550226
1566594380
Python
Python (3.4.3)
py
Runtime Error
17
2940
259
#include<iostream> #include<algorithm> using namespace std; int main() { string s; cin >> s; int k=0,sn; for (auto c:s) { if (c=='S') {++sn;} else {if (sn>0){--sn;k+=2;}} } cout << s.length()-k << endl; return 0; }
File "/tmp/tmpq5t38yms/tmpdxqdvvjm.py", line 3 using namespace std; ^^^^^^^^^ SyntaxError: invalid syntax
s087133213
p03986
u532966492
1563026549
Python
Python (3.4.3)
py
Runtime Error
30
3560
217
s=input() l=s.find("S") r=s.rfind("T") if l==-1 or r==-1: print(len(s)) else: rest=l+len(s)-r-1 s=s[l:r+1] from collections import Counter s=list(Counter(s).values()) print(rest+abs(s[0]-s[1]))
Traceback (most recent call last): File "/tmp/tmp0qq83dzp/tmpsf8ryaf9.py", line 1, in <module> s=input() ^^^^^^^ EOFError: EOF when reading a line
s039045934
p03986
u942915776
1562879044
Python
Python (3.4.3)
py
Runtime Error
76
4252
252
x = input() ans = len(x) def do(i, j): global ans if x[i] == 'S' and x[j] == 'T': ans -= 2 if i > 0 and j < len(x) - 1: do(i-1, j+1) if j - i == 1 and j < len(x) - 1: do(i+1, j+1) do(0, 1) print(ans)
Traceback (most recent call last): File "/tmp/tmpnvh2ldt3/tmpw227zv8i.py", line 1, in <module> x = input() ^^^^^^^ EOFError: EOF when reading a line
s803491766
p03986
u671252250
1562771361
Python
Python (3.4.3)
py
Runtime Error
58
5668
272
# coding: utf-8 # Your code here! X = list(input()) num = len(X) stack = [] for i in X: if i == "S": stack.append(i) else: if stack[-1] == "T" or stack[0] == "": stack.append(i) else: stack.pop() print(len(stack))
Traceback (most recent call last): File "/tmp/tmp08wzrkdc/tmpdl0mddb_.py", line 4, in <module> X = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s092025403
p03986
u671252250
1562770965
Python
Python (3.4.3)
py
Runtime Error
71
6200
297
# coding: utf-8 # Your code here! X = list(input()) num = len(X) stack = [X[0]] for i in range(1, num): if X[i] == "S": stack.append("S") else: if stack[-1] == "T" or stack[0] == "": stack.append("T") else: stack.pop(-1) print(len(stack))
Traceback (most recent call last): File "/tmp/tmpag959k8x/tmp0c7905i2.py", line 4, in <module> X = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s833247009
p03986
u026155812
1562300695
Python
Python (3.4.3)
py
Runtime Error
17
3500
177
s = input() cnt = 0 cnt_set = 0 for x in S: if x == 'S': cnt += 1 else: if cnt > 0: cnt_set += 1 cnt -= 1 print(len(s)-2*cnt_set)
Traceback (most recent call last): File "/tmp/tmpz03zanxj/tmpkxkgaa5q.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line