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
s453367393
p04030
u408375121
1582246558
Python
Python (3.4.3)
py
Runtime Error
17
2940
130
s = input() c = '' for t in s: if t == '0' or t == '1': c += t elif t == 'B': if c != '': c = c - c[-1] print(c)
Traceback (most recent call last): File "/tmp/tmps5_thaks/tmpkrm37a08.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s837087649
p04030
u160359809
1582164705
Python
Python (3.4.3)
py
Runtime Error
18
3060
217
n=input() ans=[] y="" for i in range(len(n)): if n[i]=="0": ans.append("0") elif n[i]=="1": ans.append("1") elif n[i]=="B": del(ans[i-1]) for x in ans: y=y+x print(y)
Traceback (most recent call last): File "/tmp/tmp1a13daqo/tmp_fb56wff.py", line 1, in <module> n=input() ^^^^^^^ EOFError: EOF when reading a line
s331844797
p04030
u772649753
1581395724
Python
Python (3.4.3)
py
Runtime Error
17
2940
151
s = input() ans = "" for i in s if i == "B": if len(ans) > 0: ans = ans[:-1] else: ans = ans else: ans = ans + i print(ans)
File "/tmp/tmpmghk1pi2/tmpi_nqkix9.py", line 3 for i in s ^ SyntaxError: expected ':'
s323283854
p04030
u772649753
1581395702
Python
Python (3.4.3)
py
Runtime Error
17
2940
151
s = input() ans = "" for i in s if i == "B": if len(ans) > 0: ans = ans[:-1] else: ans = ans else: ans = ans + c print(ans)
File "/tmp/tmpllxvc5cq/tmpvprlhtdb.py", line 3 for i in s ^ SyntaxError: expected ':'
s203694323
p04030
u772649753
1581395230
Python
Python (3.4.3)
py
Runtime Error
17
2940
170
s = str(input()) ans = "" n = len(s) for i in range(n) if s[i] = "B": if ans == "": ans = ans + "" else: ans = ans[:-1] else: ans = ans + s[i]
File "/tmp/tmpvytg6g68/tmpxwy84ofh.py", line 4 for i in range(n) ^ SyntaxError: expected ':'
s370783471
p04030
u045953894
1581379463
Python
Python (3.4.3)
py
Runtime Error
17
2940
109
s = input() t = '' for i in range(len(s)): if s[i] == 'B': t = t[:-1] else: t += i print(t)
Traceback (most recent call last): File "/tmp/tmpro4pmnks/tmpk37s50um.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s316057990
p04030
u934868410
1581095029
Python
PyPy3 (2.4.0)
py
Runtime Error
169
38512
152
s = input() b = 0 for i in range(n-1,-1,-1): if s[i] == 'B': b += 1 else: if b > 0: b -= 1 else: print(s[i], end='') print()
Traceback (most recent call last): File "/tmp/tmph4xbp0t_/tmp56pwlhbc.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s314075930
p04030
u131267733
1580964108
Python
Python (3.4.3)
py
Runtime Error
17
2940
152
s= input() list=[] for i in s: if i == '0': list.append('0') elif i == '1': list.append('1') elif i == 'B': list.pop(-1) print(list)
Traceback (most recent call last): File "/tmp/tmpdniziqxb/tmpnfvdcuz4.py", line 1, in <module> s= input() ^^^^^^^ EOFError: EOF when reading a line
s141605870
p04030
u131267733
1580963959
Python
Python (3.4.3)
py
Runtime Error
16
2940
159
s= input() list=[] for i in s: if i == '0': list.append('0') elif i == '1': list.append('1') elif i == 'B': list.remove(-1) print(list)
Traceback (most recent call last): File "/tmp/tmplonh82xd/tmphhyu7qxf.py", line 1, in <module> s= input() ^^^^^^^ EOFError: EOF when reading a line
s236060122
p04030
u143212659
1580944727
Python
Python (3.4.3)
py
Runtime Error
17
2940
270
#!/usr/bin/env python3 # -*- coding: utf-8 -*- def main(): S = list(input().split()) reslut = '' for s in S: if S == 'B': reslut.pop() else: reslut.append(s) print(reslut) if __name__ == "__main__": main()
Traceback (most recent call last): File "/tmp/tmpig5qhwds/tmpwympdfwp.py", line 17, in <module> main() File "/tmp/tmpig5qhwds/tmpwympdfwp.py", line 6, in main S = list(input().split()) ^^^^^^^ EOFError: EOF when reading a line
s703684319
p04030
u857428111
1580868264
Python
Python (3.4.3)
py
Runtime Error
19
3060
146
import math N=int(input()) p=math.sqrt(N*2-0.25)-0.5 q=int(p)+1 M=q*(q+1)//2 L=M-N#must0or+ for i in range(1,q+1): if i != L: print(i)
Traceback (most recent call last): File "/tmp/tmpw9304qj3/tmp4q62pqmo.py", line 2, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s399692402
p04030
u329049771
1580831717
Python
Python (3.4.3)
py
Runtime Error
17
2940
140
stack = [] for s in input(): if s == '0' or s == '1': stack.append(s) if s == 'B': stack.pop() print(''.join(stack))
Traceback (most recent call last): File "/tmp/tmpb8aykgz5/tmp_80q6y7d.py", line 2, in <module> for s in input(): ^^^^^^^ EOFError: EOF when reading a line
s292832307
p04030
u329049771
1580831681
Python
Python (3.4.3)
py
Runtime Error
17
2940
139
stack = [] for s in input() if s == '0' or s == '1': stack.append(s) if s == 'B': stack.pop() print(''.join(stack))
File "/tmp/tmpqhqnn1mk/tmp2k2fdnz5.py", line 2 for s in input() ^ SyntaxError: expected ':'
s546656592
p04030
u088078693
1580765260
Python
Python (3.4.3)
py
Runtime Error
17
2940
99
s = list(input()) for i in range(len(s)): if s[i]=="B": del s[i-1:i+1] print(*s,sep="")
Traceback (most recent call last): File "/tmp/tmp7a1c79om/tmpk1x1mrmm.py", line 1, in <module> s = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s035856876
p04030
u762420987
1580695589
Python
PyPy3 (2.4.0)
py
Runtime Error
167
38640
172
s = input() ans = [] for c in s: if c == "0": ans.append("0") if c == "1": ans.append("1") if c == "B": ans.pop(-1) print("".join(ans))
Traceback (most recent call last): File "/tmp/tmps3vqx5jt/tmpfg8xhqox.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s531539481
p04030
u018679195
1580542566
Python
Python (3.4.3)
py
Runtime Error
17
2940
150
a=input() m=[] for i in a: if i=='0': m.append(i) if i=='1': m.append(i) if i=='B': m.pop() m="".join(m) print(m)
Traceback (most recent call last): File "/tmp/tmpfdc98la9/tmp7fi89e6t.py", line 1, in <module> a=input() ^^^^^^^ EOFError: EOF when reading a line
s981272013
p04030
u863370423
1580540111
Python
Python (3.4.3)
py
Runtime Error
17
3060
172
s=input() l=[] for i in s: if i=='0': l.append('0') elif i=='1': l.append('1') elif i=='B': l.pop() for i in l: print(i,end='')
Traceback (most recent call last): File "/tmp/tmpcji89syo/tmpuu9als2o.py", line 1, in <module> s=input() ^^^^^^^ EOFError: EOF when reading a line
s544941304
p04030
u816631826
1580538472
Python
Python (3.4.3)
py
Runtime Error
17
3064
284
s = input() len = 0 op = [] for i in s: if(i == '1'): op.append('1') len += 1 elif(i == '0'): op.append('0') len += 1 elif(i == 'B'): if(len > 0): op.pop() len = len - 1 for i in op: print(i, end = ''
File "/tmp/tmpa0tfod4x/tmp_cer1npp.py", line 18 print(i, end = '' ^ SyntaxError: '(' was never closed
s869899455
p04030
u746849814
1580395602
Python
Python (3.4.3)
py
Runtime Error
17
2940
189
inputs = list(map(str, input())) output = '' for i in inputs: if output == 'B': output = output[:-1] elif output == '1': output += '1' else: output += '0' print(output)
File "/tmp/tmpi7w3_uim/tmp5avoagba.py", line 6 output = output[:-1] TabError: inconsistent use of tabs and spaces in indentation
s517104845
p04030
u690037900
1580176128
Python
Python (3.4.3)
py
Runtime Error
17
2940
127
S=list(input()) stack=[] for s in S: if s!="B": stack.append(s) else: stack.pop() print("".join(stack))
Traceback (most recent call last): File "/tmp/tmpg0koxxb5/tmpdzjo8s0b.py", line 1, in <module> S=list(input()) ^^^^^^^ EOFError: EOF when reading a line
s027281578
p04030
u857070771
1580166010
Python
Python (3.4.3)
py
Runtime Error
17
2940
101
s=input() a=[] for i in s: if i == 'B': if a: a.pop() else: a.append(i) print(''.join(a))
File "/tmp/tmpj0ti1ztq/tmpugbwchre.py", line 6 a.pop() TabError: inconsistent use of tabs and spaces in indentation
s724698891
p04030
u857070771
1580165827
Python
Python (3.4.3)
py
Runtime Error
17
2940
101
s=input() a=[] for i in s: if i == 'B': if a: a.pop() else: a.append(i) print(''.join(a))
File "/tmp/tmpbepelczl/tmpm2n7d1df.py", line 5 if a: ^ IndentationError: unindent does not match any outer indentation level
s561332549
p04030
u857070771
1580165606
Python
Python (3.4.3)
py
Runtime Error
17
2940
89
s=input() a=[] for i in s: if i == 'B': a.pop() else: a.append(i) print(''.join(a))
Traceback (most recent call last): File "/tmp/tmpj6512toi/tmpkefw50ym.py", line 1, in <module> s=input() ^^^^^^^ EOFError: EOF when reading a line
s713228045
p04030
u241159583
1579806765
Python
Python (3.4.3)
py
Runtime Error
17
2940
193
s = input() ans = [] for i in range(len(s)): if s[i] != "B": ans.append(s[i]) else: if len(s) == 0: continue elif len(s) > 0: ans.pop(-1) print("".join(ans))
Traceback (most recent call last): File "/tmp/tmplfi5upsg/tmp55nr14vw.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s304726749
p04030
u241159583
1579806707
Python
Python (3.4.3)
py
Runtime Error
17
2940
156
s = input() ans = [] for i in range(len(s)): if s[i] != "B": ans.append(s[i]) else: if len(s) > 0: ans.pop(-1) print("".join(ans))
Traceback (most recent call last): File "/tmp/tmpoqp8v55h/tmpi2oay1j0.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s450665824
p04030
u995062424
1579741203
Python
Python (3.4.3)
py
Runtime Error
17
3060
205
s = input() a = [] for i in range(len(s)): if (s[i] == "B"): if(len(a) == 0): continue else: a.remove(a[i-1]) else: a.append(s[i]) print(''.join(a))
Traceback (most recent call last): File "/tmp/tmpni3o6ot4/tmplz8feusc.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s404003098
p04030
u871596687
1579379695
Python
Python (3.4.3)
py
Runtime Error
17
2940
172
chars = input() ans = [] for c in chars: if c in ['0','1']: ans.append(c) elif len(ans) != 0: ans.pop(-1) p;rint(''.join(ans))
Traceback (most recent call last): File "/tmp/tmpgb6z23q2/tmp_1r_l4u3.py", line 1, in <module> chars = input() ^^^^^^^ EOFError: EOF when reading a line
s742095545
p04030
u072717685
1579150128
Python
Python (3.4.3)
py
Runtime Error
17
2940
91
s = input() s = s.replace("B0", "") s = s.replace("B1", "") s = s.replace("B", "") print(r)
Traceback (most recent call last): File "/tmp/tmpt7_w2ni5/tmpdiaqgqdv.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s306817514
p04030
u671211357
1579055099
Python
Python (3.4.3)
py
Runtime Error
17
3064
365
s=input() kouho = [] ans = [s[i] for i in range(len(s))] for i in range(len(s)): if s[i] == "B" and i>=1: kouho.append(i-1) kouho.sort() kouho.reverse() for j in kouho: ans.pop(j) ans.pop(j) kesu = [] for k in range(len(ans)): if ans[k]=="B": kesu.append(k) kesu.sort() kesu.reverse() for m in kesu: ans.pop(m) print(*ans,sep="")
Traceback (most recent call last): File "/tmp/tmpy1unnjbi/tmpxt6n7m3h.py", line 1, in <module> s=input() ^^^^^^^ EOFError: EOF when reading a line
s214877104
p04030
u485566817
1578961212
Python
Python (3.4.3)
py
Runtime Error
17
2940
166
s = input() ans = [] for i in s: if i == "0": ans.append("0") elif i == "1": ans.append("1") else: ans.pop() print("".join(ans))
Traceback (most recent call last): File "/tmp/tmpbbwew7z7/tmp3n9bq5_1.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s830552909
p04030
u609061751
1578939661
Python
Python (3.4.3)
py
Runtime Error
17
3060
218
import sys input = sys.stdin.readline ans = [] s = list(input().rstrip()) for i in s: if s == "0": ans.apppend("0") elif s == "1": ans.append("1") else: ans.pop() print("".join(ans))
s844395498
p04030
u243572357
1578808625
Python
Python (3.4.3)
py
Runtime Error
17
2940
105
t = "" s = input() for i in s: if i == 'B' and len(t) > 0: t.pop() else: t.append(i) print(t)
Traceback (most recent call last): File "/tmp/tmpj7nmw9kw/tmp96q9qx0c.py", line 2, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s278592523
p04030
u672316981
1578681815
Python
Python (3.4.3)
py
Runtime Error
17
3060
234
s = str(input()) lst = [] for i in range(len(s)): if s[i]=='B' and len(lst)!=0: del lst[-1] else: for j in range(2): if int(s[i])==j: lst.append('{}'.format(j)) print(''.join(lst))
Traceback (most recent call last): File "/tmp/tmpccvu9uwb/tmp22s8vil3.py", line 1, in <module> s = str(input()) ^^^^^^^ EOFError: EOF when reading a line
s785116184
p04030
u963468276
1577723376
Python
PyPy3 (2.4.0)
py
Runtime Error
175
38512
317
def typing(s, ans): for i in range(len(s)): if len(ans) != 0: continue elif s[i] == '0': ans.append('0') elif s[i] == '1': ans.append('1') elif s[i] == 'B': ans.pop() print(''.join(ans)) S = str(input()) ANS = [] typing(S, ANS)
Traceback (most recent call last): File "/tmp/tmpe_eww66w/tmpao7srsrh.py", line 14, in <module> S = str(input()) ^^^^^^^ EOFError: EOF when reading a line
s004833075
p04030
u963468276
1577722949
Python
PyPy3 (2.4.0)
py
Runtime Error
185
38256
320
def typing(s, ans): for i in range(len(s)): if s[i] == '0': ans.append('0') elif s[i] == '1': ans.append('1') elif s[i] == 'B' and ans != '': ans.pop() else: continue print(ans) S = str(input()) ANS = [] typing(S, ANS)
Traceback (most recent call last): File "/tmp/tmpxjimn1yq/tmprt0vk7tj.py", line 14, in <module> S = str(input()) ^^^^^^^ EOFError: EOF when reading a line
s306726512
p04030
u999893056
1577543834
Python
Python (3.4.3)
py
Runtime Error
17
3060
168
s = input() m = [] for i in s: if i == "0": m.append(i) elif i == "1": m.append(i) else: m.pop(-1) answer = "".join(m) print(answer)
Traceback (most recent call last): File "/tmp/tmpnchox_ln/tmpwqk5qo4w.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s019664697
p04030
u999893056
1577540546
Python
Python (3.4.3)
py
Runtime Error
17
2940
170
s = input() answer = [] for i in s: if i == "0": answer.append(0) elif i == "1": answer.append(1) else: answer.pop(-1) print(*answer)
Traceback (most recent call last): File "/tmp/tmpqgerp28z/tmp4dt9i88k.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s726339966
p04030
u025595730
1577298268
Python
Python (3.4.3)
py
Runtime Error
17
2940
380
# coding: utf-8 import sys def main(argv=sys.argv): inputs_ = list(input()) string_ = [] for input_ in inputs_: if input_ == 'B': if not string_ == []: string_.pop(-1) else: string_.append(input_) print(''.join(string_)) return 0 if __name__ == '__main__': sys.exit(main())
File "/tmp/tmp07agctlo/tmpfdvvlosr.py", line 9 string_ = [] IndentationError: unexpected indent
s729705668
p04030
u355137116
1577222720
Python
Python (3.4.3)
py
Runtime Error
17
2940
167
s = input() ans = '' a_s = s[::-1] b = 0 for index, x in enumerate(a_s): if x == 'B': b += 1 elif b == 0: ans.append(x) else: b -= 1 print(ans[::-1])
File "/tmp/tmpihj9ina0/tmpxsimslh6.py", line 9 ans.append(x) TabError: inconsistent use of tabs and spaces in indentation
s472838736
p04030
u198860923
1577143880
Python
Python (3.4.3)
py
Runtime Error
17
2940
162
S = list(input()) final_str = [] for key in S: if key == "B": final_str = final_str[:-1] else: final_str.append(key) print(''.join(final_str)
File "/tmp/tmpc54e0r0k/tmp3i4vw6l7.py", line 8 print(''.join(final_str) ^ SyntaxError: '(' was never closed
s374477817
p04030
u198860923
1577143751
Python
Python (3.4.3)
py
Runtime Error
17
2940
147
S = list(input()) for key in S: if key == "B": final_str = final_str[:-1] else: final_str.append(key) print(''.join(final_str)
File "/tmp/tmp4ee6cox0/tmp_x2htns6.py", line 7 print(''.join(final_str) ^ SyntaxError: '(' was never closed
s165556509
p04030
u906024886
1576707599
Python
Python (3.4.3)
py
Runtime Error
24
2940
182
A = input() AA = list(A) for i in AA: if i = "B": AA.remove(AA[-1]) elif i = "0": AA.appened('0') elif i = "1": AA.appened('1') A = ''.join(AA) print(A)
File "/tmp/tmpxsz5l0iv/tmp42mtmgkv.py", line 4 if i = "B": ^^^^^^^ SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
s972008304
p04030
u774160580
1576641923
Python
Python (3.4.3)
py
Runtime Error
17
2940
186
s = input() ans = [] for i in s: if i != "B": ans.append(i) continue if len(i) == 0: continue elif len(i) != 0: ans.pop() print(*ans, sep="")
Traceback (most recent call last): File "/tmp/tmpjyy1dkm_/tmpsspyn3pe.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s883016269
p04030
u774160580
1576641675
Python
Python (3.4.3)
py
Runtime Error
18
2940
120
s = input() ans = [] for i in s: if i != "B": ans.append(i) else: ans.pop() print(*ans, sep="")
Traceback (most recent call last): File "/tmp/tmpg3m4r48d/tmphm1epkhe.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s273822788
p04030
u202688141
1576293554
Python
Python (3.4.3)
py
Runtime Error
17
2940
243
set = input() words = [] for i in range(len(set)): if set[i] == "0": words.append("0") if set[i] == "1": words.append("1") if set[i] == "B": words.pop(-1) word = "" for i in words: word += i print(word)
Traceback (most recent call last): File "/tmp/tmpnz9mhjg_/tmpl499z5ol.py", line 1, in <module> set = input() ^^^^^^^ EOFError: EOF when reading a line
s000997457
p04030
u328090531
1575738607
Python
Python (3.4.3)
py
Runtime Error
17
2940
133
s = list(input()) ans = '' for x in s: if x == '1' or x == '0': ans += x elif ans: ans[-1].remove print(ans)
Traceback (most recent call last): File "/tmp/tmpk68nzdgr/tmp92qhks3l.py", line 1, in <module> s = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s697141604
p04030
u150603590
1575431557
Python
Python (3.4.3)
py
Runtime Error
17
2940
232
if __name__ == '__main__': INPUT=input() ans=[] for i in INPUT: if i=="0": ans.append("0") elif i=="1": ans.append("1") else: ans.pop() print("".join(ans))
Traceback (most recent call last): File "/tmp/tmpdavlwn3z/tmpsiqy54h1.py", line 3, in <module> INPUT=input() ^^^^^^^ EOFError: EOF when reading a line
s063841284
p04030
u815444398
1575228305
Python
Python (3.4.3)
py
Runtime Error
17
3064
245
s = list(input()) try bs = s.index('B') except: bs=-1 while bs != -1: if bs == 0: del s[bs] else: del s[bs-1] del s[bs-1] try: bs = s.index('B') except: bs = -1 print(''.join(s))
File "/tmp/tmp05tgv2uh/tmpyvesy3wq.py", line 2 try ^ SyntaxError: expected ':'
s994100609
p04030
u815444398
1575228200
Python
Python (3.4.3)
py
Runtime Error
17
2940
219
s = list(input()) bs = s.index('B') while bs != -1: if bs == 0: del s[bs] else: del s[bs-1] del s[bs-1] try: bs = s.index('B') except: bs = -1 print(''.join(s))
Traceback (most recent call last): File "/tmp/tmpiqxt_r8z/tmp_tn82xib.py", line 1, in <module> s = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s256024340
p04030
u799691369
1574964270
Python
Python (3.4.3)
py
Runtime Error
17
2940
238
keys = input() outputs = [] for key in keys: if key == 'B': if outputs is None: pass else: outputs.pop() else: outputs.append(key) for output in outputs: print(output, end='')
Traceback (most recent call last): File "/tmp/tmp7d_ahpbe/tmpmrmojd5w.py", line 1, in <module> keys = input() ^^^^^^^ EOFError: EOF when reading a line
s600032240
p04030
u799691369
1574964160
Python
Python (3.4.3)
py
Runtime Error
17
2940
238
keys = input() outputs = [] for key in keys: if key == 'B': if outputs == None: pass else: outputs.pop() else: outputs.append(key) for output in outputs: print(output, end='')
Traceback (most recent call last): File "/tmp/tmpw1ulrlst/tmpbu776kh_.py", line 1, in <module> keys = input() ^^^^^^^ EOFError: EOF when reading a line
s259907898
p04030
u799691369
1574964108
Python
Python (3.4.3)
py
Runtime Error
17
2940
175
keys = input() outputs = [] for key in keys: if key == 'B': outputs.pop() else: outputs.append(key) for output in outputs: print(output, end='')
Traceback (most recent call last): File "/tmp/tmpr9da616y/tmp7fc4nj5t.py", line 1, in <module> keys = input() ^^^^^^^ EOFError: EOF when reading a line
s455527490
p04030
u055687574
1574917230
Python
Python (3.4.3)
py
Runtime Error
17
2940
172
s = input() ans = [] for i, j in enumerate(s): if j in ["0", "1"]: ans.append(j) else: if len(ans): del ans[i - 1] print("".join(ans))
Traceback (most recent call last): File "/tmp/tmpv9oowy47/tmpa9xcnrwt.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s789958003
p04030
u097317219
1574469226
Python
PyPy3 (2.4.0)
py
Runtime Error
173
38640
198
from collections import deque s = list(str(input())) ans = deque() for i in s: if i == "B": if ans == []: continue else: ans.pop() else: ans.append(i) print("".join(ans))
Traceback (most recent call last): File "/tmp/tmpz1cghhf8/tmp9buzkpmu.py", line 2, in <module> s = list(str(input())) ^^^^^^^ EOFError: EOF when reading a line
s130885100
p04030
u097317219
1574468354
Python
PyPy3 (2.4.0)
py
Runtime Error
173
38256
186
s = list(input()) n = len(s) ans = [] for i in range(n): if i == "B": if ans == []: continue else: ans.remove(ans[-1]) else: ans.appned(i) print("".join(ans))
Traceback (most recent call last): File "/tmp/tmpusql31lf/tmp44ujo6ej.py", line 1, in <module> s = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s717972872
p04030
u097317219
1574468329
Python
PyPy3 (2.4.0)
py
Runtime Error
171
38256
203
s = list(map(str,input().split())) n = len(s) ans = [] for i in range(n): if i == "B": if ans == []: continue else: ans.remove(ans[-1]) else: ans.appned(i) print("".join(ans))
Traceback (most recent call last): File "/tmp/tmpr_6_yda0/tmpajnen9dx.py", line 1, in <module> s = list(map(str,input().split())) ^^^^^^^ EOFError: EOF when reading a line
s818601139
p04030
u340947941
1574438442
Python
Python (3.4.3)
py
Runtime Error
18
2940
291
##### 解けた ##### S=input() A=[""] for s in S: # 入力の文字列1文字ずつ見てゆく if s in ["0","1"]: # もし0か1の場合、それを追加 A.append(s) elif s=="B": # もしバックスペースの場合、1文字削除 A.pop(-1) print("".join(A))
Traceback (most recent call last): File "/tmp/tmp_n9ifejk/tmpbgxd1quh.py", line 3, in <module> S=input() ^^^^^^^ EOFError: EOF when reading a line
s311533267
p04030
u925567828
1573676736
Python
Python (3.4.3)
py
Runtime Error
17
3060
330
s = list(input()) ans_list=[] for i in range(len(s)): if(s[i] == "0"): ans_list.append("0") elif(s[i] == "1"): ans_list.append("1") elif(s[i] == "B"): if(ans_list != 0): ans_list.pop() else: continue for i in range(len(ans_list)): print(ans_list[i],end='')
Traceback (most recent call last): File "/tmp/tmpm1wory5l/tmpyln49ne4.py", line 1, in <module> s = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s831218509
p04030
u991619971
1573611001
Python
Python (3.4.3)
py
Runtime Error
17
3060
254
s=str(input()) x='' list=[] for i in range(len(s)): if s[i]=='1': list.append('1') elif s[i]=='0': list.append('0') elif s[i]=='B' and len(list)!=0: del list[i-1] for i in range(len(list)): x += list[i] print(x)
Traceback (most recent call last): File "/tmp/tmp7s24_zw2/tmpsks67h6j.py", line 1, in <module> s=str(input()) ^^^^^^^ EOFError: EOF when reading a line
s073790043
p04030
u991619971
1573610959
Python
Python (3.4.3)
py
Runtime Error
17
3060
269
s=str(input()) x='' list=[] for i in range(len(s)): if s[i]=='1': list.append('1') elif s[i]=='0': list.append('0') elif s[i]=='B' and len(list)!=0: del list[i-1] print(list) for i in range(len(list)): x += list[i] print(x)
Traceback (most recent call last): File "/tmp/tmpq_c0ylkf/tmp6b29rcl_.py", line 1, in <module> s=str(input()) ^^^^^^^ EOFError: EOF when reading a line
s630675244
p04030
u991619971
1573610887
Python
Python (3.4.3)
py
Runtime Error
17
3060
269
s=str(input()) x='' list=[] for i in range(len(s)): if s[i]=='1': list.append('1') elif s[i]=='0': list.append('0') elif s[i]=='B' and len(list)!=0: del list[i-1] print(list) for i in range(len(list)): x += list[i] print(x)
Traceback (most recent call last): File "/tmp/tmpj71maymj/tmpaotys5_4.py", line 1, in <module> s=str(input()) ^^^^^^^ EOFError: EOF when reading a line
s364324436
p04030
u533713111
1572893293
Python
Python (3.4.3)
py
Runtime Error
18
3060
170
s = input() L = [] for i in range(len(s)): if s[i] == '0': L.append('0') elif s[i] == '1': L.append('1') elif s[i] == 'B': del L[-1] print(''.join(L))
Traceback (most recent call last): File "/tmp/tmpszuf38kv/tmpmhny1bqe.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s359389018
p04030
u557494880
1572555318
Python
Python (3.4.3)
py
Runtime Error
17
3060
211
s = str(input()) n = len(s) a = [] for i in range(n): if s[i] != 'B': a.append(s[i]) else: if len(s) != 0: a.pop(-1) t ='' m = len(a) for j in range(m): t += a[j] print(t)
Traceback (most recent call last): File "/tmp/tmp8449uyy9/tmpvsmau7bj.py", line 1, in <module> s = str(input()) ^^^^^^^ EOFError: EOF when reading a line
s495109615
p04030
u518223105
1571960198
Python
Python (3.4.3)
py
Runtime Error
17
3060
254
# -*- coding: utf-8 -*- s = list(input()) ans = [] for j in range(len(s)): if (s[j]) == "B": l = len(ans) if l == 0: continue else: del ans[j-1] else: ans.append(s[j]) print("".join(ans))
Traceback (most recent call last): File "/tmp/tmpsykfs49h/tmpwchx55f7.py", line 3, in <module> s = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s643584990
p04030
u896741788
1571630909
Python
Python (3.4.3)
py
Runtime Error
17
3060
139
from itertools import groupby as gb ans="" for i,b in gb(input()): if i=="B": s=s[:-len(list(b))] else:s+=i*len(list(b)) print(ans)
Traceback (most recent call last): File "/tmp/tmpbut5h_qg/tmpeltrzodh.py", line 3, in <module> for i,b in gb(input()): ^^^^^^^ EOFError: EOF when reading a line
s553537061
p04030
u578049848
1571411931
Python
Python (3.4.3)
py
Runtime Error
17
3060
419
s = input() j = 0 for i in range(len(s)): #print("i=",i) if s[i-(2*j)] == "B": #print(i-(2*j)) #print(s) if s[0] == "B": s = 'x'+s[1:] #print(s) #print(s[0]) else: #print(i-(2*j)) s = s.replace(s[i-1-(2*j)]+s[i-(2*j)],'') j += 1 s += 'xx' #print(s) ans = s.replace('x','') print(ans)
Traceback (most recent call last): File "/tmp/tmpwp3no3au/tmpn95vup57.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s213376799
p04030
u578049848
1571410374
Python
Python (3.4.3)
py
Runtime Error
17
3064
322
s = input() j = 0 for i in range(len(s)): if s[i-(2*j)] == "B": if s[0] == "B": s = s.replace(s[0],'') s += 'x' else: s = s.replace(s[i-1-(2*j)]+s[i-(2*j)],'') j += 1 s += 'xx' #print(s, i-(2*j)) ans = s.replace('x','') print(ans)
Traceback (most recent call last): File "/tmp/tmp_jz4sfhr/tmprih8v4cw.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s735488866
p04030
u799978560
1571371207
Python
Python (3.4.3)
py
Runtime Error
17
2940
147
s = [str(i) for i in list(str(input()))] x = list() for i in s: if i == "0" or i == "1": x.append(i) else: x.pop(-1) print(x)
Traceback (most recent call last): File "/tmp/tmpwjs6_kgt/tmp_o4090tz.py", line 1, in <module> s = [str(i) for i in list(str(input()))] ^^^^^^^ EOFError: EOF when reading a line
s808516884
p04030
u089376182
1571369782
Python
Python (3.4.3)
py
Runtime Error
17
2940
128
S = input() stack = [] for s in S: if s == 'B': stack.pop() else: stack.append(s) print(*stack, sep = '')
Traceback (most recent call last): File "/tmp/tmpll7qqhez/tmpi5tw0w19.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s022868350
p04030
u517099533
1570924319
Python
Python (3.4.3)
py
Runtime Error
18
3060
270
s = list(input()) ans = "" for i in range(len(s)): if s[i] == "0": ans += "0" elif s[i] == "1": ans += "1" elif s[i] == "B": if len(ans) > 0: ans = ans.replace(ans[i-1], "", 1) else: pass print(ans)
Traceback (most recent call last): File "/tmp/tmpfgeue7rm/tmp4fbtp9ri.py", line 1, in <module> s = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s230271355
p04030
u194496802
1570215474
Python
Python (3.4.3)
py
Runtime Error
17
3064
395
n = input() n_list = list(n) result = [] result2 = '' for i in range(len(n)): if n_list[i] == 'B': if i == 0: pass elif n_list[i-1] == '': pass else: result.pop() elif n_list[i] == '0': result.append('0') elif n_list[i] == '1': result.append('1') result2 = ''.join(result) print(result2)
Traceback (most recent call last): File "/tmp/tmp3nwfxba9/tmp06ob0ues.py", line 1, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s728576959
p04030
u194496802
1570215339
Python
Python (3.4.3)
py
Runtime Error
18
3064
377
n_list = list(n) result = [] result2 = '' for i in range(len(n)): if n_list[i] == 'B': if i == 0: pass elif n_list[i-1] == '': pass else: result.pop() elif n_list[i] == '0': result.append('0') elif n_list[i] == '1': result.append('1') result2 = ''.join(result) print(result2)
Traceback (most recent call last): File "/tmp/tmpchoho3lv/tmpjhindkjr.py", line 1, in <module> n_list = list(n) ^ NameError: name 'n' is not defined
s350772545
p04030
u194496802
1570215279
Python
Python (3.4.3)
py
Runtime Error
17
2940
883
n = input() n_list = list(n) result = [] result2 = '' for i in range(len(n)): if n_list[i] == 'B': if i == 0: pass elif n_list[i-1] == 'B': pass else: result.pop() elif n_list[i] == '0': result.append('0') elif n_list[i] == '1': result.append('1') result2 = ''.join(result) print(result2) n = input() n_list = list(n) result = [] result2 = '' for i in range(len(n)): if n_list[i] == 'B': if i == 0: pass elif n_list[i-1] == '': pass else: result.pop() elif n_list[i] == '0': result.append('0') elif n_list[i] == '1': result.append('1') result2 = ''.join(result) print(result2) 提出情報
File "/tmp/tmpt4k6yv1q/tmpxqxv4osm.py", line 1 n = input() IndentationError: unexpected indent
s066673619
p04030
u194496802
1570215043
Python
Python (3.4.3)
py
Runtime Error
17
3060
350
result = [] result2 = '' for i in range(10): n = input() if n == 'B': if i == 0: pass elif result[i-1] == 'B': pass else: result.pop() elif n == '0': result.append('0') elif n == '1': result.append('1') result2 = ''.join(result) print(result2)
Traceback (most recent call last): File "/tmp/tmpgu_3ele2/tmpys0hd0oj.py", line 5, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s141844782
p04030
u194496802
1570214955
Python
Python (3.4.3)
py
Runtime Error
17
3060
360
i = 0 result = [] result2 = '' while True: n = input() if n == 'B': if i == 0: pass elif result[i-1] == 'B': pass else: result.pop() elif n == '0': result.append('0') elif n == '1': result.append('1') result2 = ''.join(result) print(result2) i += 1
Traceback (most recent call last): File "/tmp/tmpxre4208u/tmp008nmlbv.py", line 6, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s390051030
p04030
u464912173
1569716660
Python
Python (3.4.3)
py
Runtime Error
17
3060
153
s = input() s = input() ans ='' for i in range(len(s)): if i ==1: ans+='1' elif i==0: ans+='0' elif i=='B': ans = ans[:-1] print(ans)
Traceback (most recent call last): File "/tmp/tmpm0j6ww4g/tmphxx3ihf7.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s066398137
p04030
u069129582
1569300806
Python
Python (3.4.3)
py
Runtime Error
17
2940
144
s=input() a=[] for i in s: if i=='0': a.append(i) elif i=='1': a.append(i) else: a.pop(-1) print(''.join(a))
Traceback (most recent call last): File "/tmp/tmpsovk3k4z/tmpngmqsgw0.py", line 1, in <module> s=input() ^^^^^^^ EOFError: EOF when reading a line
s496970838
p04030
u953753178
1569240261
Python
Python (3.4.3)
py
Runtime Error
17
2940
107
res = '' for x in input(): if x = 'B': res = res[:-1] else: res += x print(res)
File "/tmp/tmp450cphg2/tmp8ljl6685.py", line 3 if x = 'B': ^^^^^^^ SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
s844321044
p04030
u661980786
1569179926
Python
Python (3.4.3)
py
Runtime Error
18
2940
210
s = list(input()) len_s = len(s) output = [] for i in range(0,len_s-1): if s[i+1] =="B": output[i] = "D" output.append(s[i]) output2 = [j for j in output if j.isdigit()] print("".join(output2))
Traceback (most recent call last): File "/tmp/tmpyb67whhh/tmpaxgybisg.py", line 1, in <module> s = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s745881104
p04030
u296518383
1569027344
Python
Python (3.4.3)
py
Runtime Error
20
3316
166
import collections S=input() N=len(S) D=collections.deque([]) for i in range(N): if S[i]=="B": D.pop() else: D.append(S[i]) print("".join(list(D)))
Traceback (most recent call last): File "/tmp/tmp3hkiddk4/tmpud6b71zx.py", line 3, in <module> S=input() ^^^^^^^ EOFError: EOF when reading a line
s900577398
p04030
u757584836
1568499394
Python
Python (3.4.3)
py
Runtime Error
17
2940
169
s = input() a = "" for i in range(0, len(s)): if s[i] == "0": a += "0" elif s[i] == "1": a += "1" elif s[i] == "B" and len(a) != 0: a[-1] = "" print(a)
Traceback (most recent call last): File "/tmp/tmpc1vdyik8/tmpjkr_5vy1.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s335928199
p04030
u757584836
1568499082
Python
Python (3.4.3)
py
Runtime Error
17
2940
168
s = input() a = "" for i in range(0, len(s)): if s[i] == "0": a += "0" elif s[i] == "1": a += "1" elif s[i] == "B" and len(a) != 0: del a[-1] print(a)
Traceback (most recent call last): File "/tmp/tmppmcawso5/tmpswfe53jn.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s768480742
p04030
u993161647
1568052625
Python
Python (3.4.3)
py
Runtime Error
17
3060
467
import sys while True: s = input() if s == '': continue elif len(str(s)) >= 10: continue else: s_input = [x for x in s] s_output = [] for n in s_input: if n == '1' or n == '0': s_output.append(n) elif n == 'B': backspace = len(s_output)-1 s_output = s_output[:backspace] if '0' or '1' in s_output: print(''.join(s_output)) break sys.exit()
Traceback (most recent call last): File "/tmp/tmpa9_q9a7f/tmp98q5mmr2.py", line 4, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s825834788
p04030
u224488911
1568001176
Python
Python (3.4.3)
py
Runtime Error
17
2940
148
s = input() ans=[] for i in range(len(s)): if s[i]==0 or s[i]==1: ans.append(i) else: try;ans.pop() except:pass print("".join(ans))
File "/tmp/tmp2ge196qe/tmpij12ac3p.py", line 7 try;ans.pop() ^ SyntaxError: expected ':'
s350807850
p04030
u181195295
1567701277
Python
Python (3.4.3)
py
Runtime Error
17
2940
155
s = list(input()) ans=[] for i in s: if i == "0": ans.append("0") elif i == "1": ans.append("1") else: ans.pop() print(ans,sep ="")
Traceback (most recent call last): File "/tmp/tmpf68_iqii/tmp7v9g867s.py", line 1, in <module> s = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s802184024
p04030
u521866787
1567649759
Python
PyPy3 (2.4.0)
py
Runtime Error
172
38640
133
s = input() ans=[] for i in range(len(s)): if s[i]=='B': ans.pop() else: ans.append(s[i]) print(''.join(ans))
Traceback (most recent call last): File "/tmp/tmpc04jca9d/tmpffz7_lxr.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s398023400
p04030
u919025034
1567320989
Python
Python (3.4.3)
py
Runtime Error
19
3060
171
a = list(input()) ans = [] for b in a: if b == "0": ans.append("0") elif b == "1": ans.append("1") else: ans.pop() print("".join(ans))
Traceback (most recent call last): File "/tmp/tmpxqqdao6r/tmplwobyisa.py", line 1, in <module> a = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s800461108
p04030
u264265458
1567138612
Python
Python (3.4.3)
py
Runtime Error
17
2940
151
a=list(input()) b=[] for i in range(len(a)): if a[i]=="0": b.append("0") elif a[i]=="1": b.append("1") else: b.pop() print(*b,sep="")
Traceback (most recent call last): File "/tmp/tmp7497ous2/tmp38i3o1kj.py", line 1, in <module> a=list(input()) ^^^^^^^ EOFError: EOF when reading a line
s068068085
p04030
u920438243
1567023969
Python
Python (3.4.3)
py
Runtime Error
17
2940
211
lines = list(input()) answers = [] out = "" for line in lines: if line == "0" or line == "1": answers.append(line) else: answers.pop() for answer in answers: out += answer print(out)
Traceback (most recent call last): File "/tmp/tmp3qf0diw3/tmp2sw8mtum.py", line 1, in <module> lines = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s326177470
p04030
u412481017
1566246036
Python
Python (3.4.3)
py
Runtime Error
17
2940
171
S=input() result=[] for s in S: print(result) #if s=="B": if len(result)>0: #print("nBack") result.pop() else: result.append(s) print(*result)
File "/tmp/tmp57tw4b8q/tmpwka5we39.py", line 8 if len(result)>0: IndentationError: unexpected indent
s236831136
p04030
u798316285
1566154208
Python
Python (3.4.3)
py
Runtime Error
17
2940
103
s=list(input()) ans="" for i in range(len(s)): if s[i-1]==B: ans=ans[:-1] else: ans+=s[i-1]
Traceback (most recent call last): File "/tmp/tmpp7o8h731/tmpgrqf08e9.py", line 1, in <module> s=list(input()) ^^^^^^^ EOFError: EOF when reading a line
s862110175
p04030
u037221289
1565980412
Python
Python (3.4.3)
py
Runtime Error
17
2940
94
S = input() L = [] for i in S: if i == 'B': L.pop() else: L.append(i) print(*L)
Traceback (most recent call last): File "/tmp/tmp_ol5o0dc/tmp9iiumn9f.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s879593547
p04030
u248670337
1565893861
Python
Python (3.4.3)
py
Runtime Error
18
3064
94
ans="" for i in input(): if x=="B": if len(t)==0: t=t[a:-1] else:t+=i print(ans)
Traceback (most recent call last): File "/tmp/tmpl3dzpd4e/tmpk2tnxxty.py", line 2, in <module> for i in input(): ^^^^^^^ EOFError: EOF when reading a line
s858143794
p04030
u248670337
1565893764
Python
Python (3.4.3)
py
Runtime Error
17
2940
68
ans="" for i in input(): if x=="B":t=t[:-1] else:t+=i print(ans)
Traceback (most recent call last): File "/tmp/tmpsd55g8mi/tmpeg1otmbk.py", line 2, in <module> for i in input(): ^^^^^^^ EOFError: EOF when reading a line
s859838461
p04030
u248670337
1565893718
Python
Python (3.4.3)
py
Runtime Error
17
2940
61
ans="" for i in input(): if x=="B": t=t[:-1] print(ans)
Traceback (most recent call last): File "/tmp/tmpx_tluzq2/tmpr3rdg8b4.py", line 2, in <module> for i in input(): ^^^^^^^ EOFError: EOF when reading a line
s636578094
p04030
u946424121
1565756277
Python
Python (3.4.3)
py
Runtime Error
17
2940
122
s = input() t = [] for x in s: if x =="B": try:t.pop() except:pass else: t.append(x) print("".joint(t))
Traceback (most recent call last): File "/tmp/tmpwukxeah_/tmpne4bfkhn.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s261747631
p04030
u874741582
1565552857
Python
Python (3.4.3)
py
Runtime Error
17
2940
232
#Bとその前1文字を消せば良い s =list(input()) lis = [] for i in range(len(s)): if s[i] == "B": if len(lis)>1: lis[i-1]="" lis.append("") else: lis.append(s[i]) print("".join(lis))
Traceback (most recent call last): File "/tmp/tmpk7b7llbi/tmphxgvm0cl.py", line 2, in <module> s =list(input()) ^^^^^^^ EOFError: EOF when reading a line
s674465648
p04030
u874741582
1565552505
Python
Python (3.4.3)
py
Runtime Error
18
2940
202
#Bとその前1文字を消せば良い s =list(input()) lis = [] for i in range(len(s)): if s[i] == "B": lis[i-1]="" lis.append("") else: lis.append(s[i]) print("".join(lis))
Traceback (most recent call last): File "/tmp/tmpnomrbb9u/tmp2dwbbyhl.py", line 2, in <module> s =list(input()) ^^^^^^^ EOFError: EOF when reading a line
s178546510
p04030
u134712256
1565494355
Python
Python (3.4.3)
py
Runtime Error
17
3060
320
s = input() str = "" count = 0 for i in range(len(s)): #print("str",str) if s[i] == "0": str += s[i] count += 1 elif s[i] == "1": str += s[i] count += 1 elif s[i] == "B": if count > 0: str = str.rstrip(str[count-1]) count -= 1 print(str)
Traceback (most recent call last): File "/tmp/tmpgh8dd19r/tmpc4sukr4l.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s608211282
p04030
u706929073
1565459515
Python
Python (3.4.3)
py
Runtime Error
17
3064
226
s = input() result = [] for i in range(len(s)): if '0' == i[s]: result.append(0) elif '1' == i[s]: result.append(1) elif 'B' == i[s]: if 0 == len(result): pass else: result.pop() print(result)
Traceback (most recent call last): File "/tmp/tmpg__s9e1i/tmpni_4lmen.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line