s_id
stringlengths
10
10
p_id
stringlengths
6
6
u_id
stringlengths
10
10
date
stringlengths
10
10
language
stringclasses
1 value
original_language
stringclasses
11 values
filename_ext
stringclasses
1 value
status
stringclasses
1 value
cpu_time
stringlengths
1
5
memory
stringlengths
1
7
code_size
stringlengths
1
6
code
stringlengths
1
539k
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)
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)
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)
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)
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]
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)
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()
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)
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)
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()
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)
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))
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))
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="")
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))
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)
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='')
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 = ''
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)
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))
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))
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))
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))
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))
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))
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))
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))
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)
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="")
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))
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)
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))
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)
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)
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)
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)
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())
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])
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)
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)
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)
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="")
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="")
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)
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)
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))
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))
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))
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='')
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='')
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='')
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))
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))
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))
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))
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))
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='')
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)
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)
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)
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))
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)
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))
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)
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)
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)
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)
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 = '')
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)
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)
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)
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) 提出情報
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)
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
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)
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))
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)
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))
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)))
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)
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)
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()
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))
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 ="")
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))
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))
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="")
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)
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)
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]
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)
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)
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)
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)
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))
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))
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))
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)
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)