node_ids listlengths 4 1.4k | edge_index listlengths 1 2.22k | text listlengths 4 1.4k | source stringlengths 14 427k |
|---|---|---|---|
[
7,
0,
13,
4,
13,
0,
13,
39,
28,
13,
13,
14,
2,
13,
17,
4,
18,
13,
13,
17,
14,
2,
13,
17,
4,
18,
13,
13,
17,
14,
13,
4,
18,
13,
13,
9,
4,
13,
4,
18,
17,
13,
13,
10,
39,
13,
10,
4,
13
] | [
[
47,
2
],
[
44,
6
],
[
10,
9
],
[
48,
9
],
[
9,
13
],
[
45,
17
],
[
9,
22
],
[
45,
26
],
[
45,
33
],
[
45,
42
],
[
44,
45
],
[
47,
48
]
] | [
"s = input()\nans = []\n\nfor c in s:\n if c == '0':\n ans.append('0')\n elif c == '1':\n ans.append('1')\n else:\n if ans:\n ans.pop()\n else:\n continue\n\nprint(''.join(ans))",
"s = input()",
"s",
"input()",
"input",
"ans = []",
"ans",
"[]"... | s = input()
ans = []
for c in s:
if c == '0':
ans.append('0')
elif c == '1':
ans.append('1')
else:
if ans:
ans.pop()
else:
continue
print(''.join(ans))
|
[
7,
0,
13,
4,
13,
0,
13,
39,
28,
13,
13,
14,
2,
13,
17,
14,
40,
13,
9,
4,
18,
13,
13,
4,
18,
13,
13,
13,
4,
13,
4,
18,
17,
13,
13,
10,
4,
13,
10,
39,
13
] | [
[
36,
2
],
[
39,
6
],
[
10,
9
],
[
37,
9
],
[
9,
13
],
[
40,
17
],
[
40,
21
],
[
40,
25
],
[
9,
27
],
[
40,
34
],
[
36,
37
],
[
39,
40
]
] | [
"S = input()\ndisp = []\nfor s in S:\n if s==\"B\":\n if not disp:\n continue\n else:\n disp.pop()\n else:\n disp.append(s)\nprint(\"\".join(disp))",
"S = input()",
"S",
"input()",
"input",
"disp = []",
"disp",
"[]",
"for s in S:\n if s==\"B\":\n ... | S = input()
disp = []
for s in S:
if s=="B":
if not disp:
continue
else:
disp.pop()
else:
disp.append(s)
print("".join(disp)) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
39,
28,
13,
13,
14,
2,
13,
17,
14,
40,
4,
13,
13,
17,
4,
18,
13,
13,
13,
4,
13,
4,
18,
17,
13,
13,
10,
4,
13,
10,
39,
13
] | [
[
36,
2
],
[
39,
8
],
[
12,
11
],
[
37,
11
],
[
11,
15
],
[
40,
21
],
[
40,
25
],
[
11,
27
],
[
40,
34
],
[
36,
37
],
[
39,
40
]
] | [
"s = list(input())\nans = []\nfor i in s:\n if i == 'B':\n if len(ans) != 0: ans.pop()\n else:\n ans.append(i)\nprint(\"\".join(ans))",
"s = list(input())",
"s",
"list(input())",
"list",
"input()",
"input",
"ans = []",
"ans",
"[]",
"for i in s:\n if i == 'B':\n if l... | s = list(input())
ans = []
for i in s:
if i == 'B':
if len(ans) != 0: ans.pop()
else:
ans.append(i)
print("".join(ans)) |
[
7,
0,
13,
4,
13,
42,
40,
4,
18,
13,
13,
17,
17,
14,
2,
18,
13,
17,
17,
0,
13,
18,
13,
39,
17,
0,
13,
4,
18,
13,
13,
17,
0,
13,
2,
18,
13,
39,
2,
13,
17,
18,
13,
39,
2,
13,
17,
4,
13,
13,
10,
2,
13,
10,
4,
1... | [
[
54,
2
],
[
55,
9
],
[
52,
9
],
[
61,
9
],
[
55,
16
],
[
52,
16
],
[
61,
16
],
[
60,
20
],
[
55,
22
],
[
52,
22
],
[
61,
22
],
[
57,
26
],
[
55,
29
],
[
52... | [
"s = input()\n\nwhile s.count(\"B\") != 0:\n if s[0] == \"B\":\n s = s[1:]\n else:\n i = s.index(\"B\")\n s = s[:i-1] + s[i+1:]\nprint(s)",
"s = input()",
"s",
"input()",
"input",
"while s.count(\"B\") != 0:\n if s[0] == \"B\":\n s = s[1:]\n else:\n i = s.ind... | s = input()
while s.count("B") != 0:
if s[0] == "B":
s = s[1:]
else:
i = s.index("B")
s = s[:i-1] + s[i+1:]
print(s) |
[
7,
15,
0,
13,
4,
13,
0,
13,
4,
13,
13,
0,
13,
4,
13,
28,
13,
4,
13,
13,
14,
2,
18,
13,
13,
17,
4,
18,
13,
13,
17,
14,
2,
18,
13,
13,
17,
4,
18,
13,
13,
17,
14,
40,
4,
13,
13,
17,
4,
18,
13,
13,
0,
13,
4,
18... | [
[
69,
3
],
[
72,
7
],
[
70,
10
],
[
63,
12
],
[
17,
16
],
[
73,
19
],
[
70,
23
],
[
16,
24
],
[
64,
28
],
[
70,
34
],
[
16,
35
],
[
64,
39
],
[
64,
46
],
[
... | [
"from collections import deque\nS = input()\nL = len(S)\nd = deque()\nfor i in range(L):\n if S[i] == \"0\":\n d.append(\"0\")\n elif S[i] == \"1\":\n d.append(\"1\")\n else:\n if len(d) != 0:\n d.pop()\n\nans = ''.join(d)\nprint(ans)",
"from collections import deque",
"... | from collections import deque
S = input()
L = len(S)
d = deque()
for i in range(L):
if S[i] == "0":
d.append("0")
elif S[i] == "1":
d.append("1")
else:
if len(d) != 0:
d.pop()
ans = ''.join(d)
print(ans)
|
[
7,
0,
13,
4,
13,
0,
13,
4,
13,
13,
0,
13,
39,
28,
13,
13,
14,
2,
13,
17,
4,
18,
13,
13,
13,
14,
2,
13,
17,
4,
18,
13,
13,
13,
14,
2,
13,
39,
9,
4,
18,
13,
13,
28,
13,
13,
4,
13,
13,
0,
13,
17,
10,
4,
13,
10... | [
[
59,
2
],
[
53,
6
],
[
60,
9
],
[
56,
11
],
[
15,
14
],
[
54,
14
],
[
14,
18
],
[
57,
22
],
[
14,
24
],
[
14,
27
],
[
57,
31
],
[
14,
33
],
[
57,
36
],
[
5... | [
"s = input()\n\ni = list(s)\n\nanswer = []\n\nfor num in i:\n if num == '0':\n answer.append(num)\n elif num == '1':\n answer.append(num)\n else:\n if answer == []:\n continue\n else:\n answer.pop()\n\nfor num in answer:\n print(num,end='')",
"s = inpu... | s = input()
i = list(s)
answer = []
for num in i:
if num == '0':
answer.append(num)
elif num == '1':
answer.append(num)
else:
if answer == []:
continue
else:
answer.pop()
for num in answer:
print(num,end='') |
[
7,
0,
13,
4,
13,
0,
13,
39,
28,
13,
13,
14,
2,
2,
13,
17,
2,
13,
17,
4,
18,
13,
13,
13,
14,
2,
4,
13,
13,
17,
4,
18,
13,
13,
17,
4,
13,
4,
18,
17,
13,
13,
10,
4,
13,
10,
39,
13
] | [
[
43,
2
],
[
46,
6
],
[
10,
9
],
[
44,
9
],
[
9,
14
],
[
9,
17
],
[
47,
21
],
[
9,
23
],
[
47,
28
],
[
47,
32
],
[
47,
41
],
[
43,
44
],
[
46,
47
]
] | [
"S = input()\nans = []\nfor s in S:\n if s == '0' or s == '1':\n ans.append(s)\n else:\n if len(ans) > 0:\n ans.pop(-1)\nprint(''.join(ans))",
"S = input()",
"S",
"input()",
"input",
"ans = []",
"ans",
"[]",
"for s in S:\n if s == '0' or s == '1':\n ans.appen... | S = input()
ans = []
for s in S:
if s == '0' or s == '1':
ans.append(s)
else:
if len(ans) > 0:
ans.pop(-1)
print(''.join(ans)) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
39,
28,
13,
4,
13,
4,
13,
13,
14,
2,
18,
13,
13,
17,
14,
40,
4,
13,
13,
17,
24,
18,
13,
2,
4,
13,
13,
17,
4,
18,
13,
13,
18,
13,
13,
0,
13,
17,
28,
13,
4,
13,
4,
13,
13,
0,
13... | [
[
69,
2
],
[
72,
8
],
[
12,
11
],
[
70,
16
],
[
70,
20
],
[
11,
21
],
[
73,
27
],
[
73,
31
],
[
73,
35
],
[
73,
39
],
[
70,
42
],
[
11,
43
],
[
63,
45
],
[
... | [
"s = list(input())\nword = []\nfor i in range(len(s)):\n if s[i] == \"B\":\n if len(word) != 0:\n del word[len(word)-1]\n else:\n word.append(s[i])\nAns = \"\"\nfor i in range(len(word)):\n Ans += word[i]\nprint(Ans)",
"s = list(input())",
"s",
"list(input())",
"list",
"i... | s = list(input())
word = []
for i in range(len(s)):
if s[i] == "B":
if len(word) != 0:
del word[len(word)-1]
else:
word.append(s[i])
Ans = ""
for i in range(len(word)):
Ans += word[i]
print(Ans) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
39,
28,
13,
13,
14,
40,
13,
17,
4,
18,
13,
13,
13,
14,
40,
4,
13,
13,
17,
24,
18,
13,
17,
4,
13,
4,
18,
17,
13,
13,
10,
39,
13,
10,
4,
13
] | [
[
43,
2
],
[
40,
8
],
[
12,
11
],
[
44,
11
],
[
11,
15
],
[
41,
19
],
[
11,
21
],
[
41,
26
],
[
41,
30
],
[
41,
38
],
[
40,
41
],
[
43,
44
]
] | [
"S=list(input())\n\nans = [] #答え用意\n\nfor s in S:\n if s != 'B':\n ans.append(s) #末尾に要素追加\n elif len(ans) != 0: #長さ\n del ans[-1] #指定した位置(今回は末尾:-1)の要素を削除\n \nprint(\"\".join(ans))",
"S=list(input())",
"S",
"list(input())",
"list",
"input()",
"input",
"ans = []",
"ans",
"[]",
"for s in... | S=list(input())
ans = [] #答え用意
for s in S:
if s != 'B':
ans.append(s) #末尾に要素追加
elif len(ans) != 0: #長さ
del ans[-1] #指定した位置(今回は末尾:-1)の要素を削除
print("".join(ans)) |
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
2,
13,
17,
0,
13,
13,
14,
2,
13,
17,
0,
13,
13,
14,
2,
13,
17,
14,
40,
13,
17,
0,
13,
18,
13,
39,
17,
4,
13,
13,
10,
18,
13,
10,
4,
13,
10,
17,
13,
10,
13,
13,
10,
... | [
[
46,
2
],
[
49,
6
],
[
10,
9
],
[
47,
9
],
[
9,
13
],
[
52,
16
],
[
9,
17
],
[
9,
20
],
[
55,
23
],
[
9,
24
],
[
9,
27
],
[
50,
31
],
[
44,
31
],
[
56,
... | [
"S = input ()\ns = ''\nfor i in S:\n if i == '0':\n s += i\n elif i == '1':\n s += i\n elif i == 'B':\n if s != '':\n s = s[:-1]\nprint (s)",
"S = input ()",
"S",
"input ()",
"input",
"s = ''",
"s",
"''",
"for i in S:\n if i == '0':\n s += i\n elif i == '1':\n s += i\n elif... | S = input ()
s = ''
for i in S:
if i == '0':
s += i
elif i == '1':
s += i
elif i == 'B':
if s != '':
s = s[:-1]
print (s) |
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
4,
13,
4,
13,
13,
14,
2,
18,
13,
13,
17,
0,
13,
17,
14,
2,
18,
13,
13,
17,
0,
13,
17,
14,
40,
13,
17,
0,
13,
18,
13,
39,
17,
4,
13,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
... | [
[
53,
2
],
[
50,
6
],
[
10,
9
],
[
54,
14
],
[
54,
18
],
[
9,
19
],
[
47,
22
],
[
54,
27
],
[
9,
28
],
[
59,
31
],
[
51,
35
],
[
57,
35
],
[
60,
35
],
[
48,... | [
"s = input()\nans = ''\nfor i in range(len(s)):\n\tif s[i] == '0':\n\t\tans += '0' \n\telif s[i] == '1':\n\t\tans += '1' \n\telse:\n\t\tif ans != '':\n\t\t\tans = ans[:-1] \nprint(ans)",
"s = input()",
"s",
"input()",
"input",
"ans = ''",
"ans",
"''",
"for i in range(len(s)):\n\tif s[i] == ... | s = input()
ans = ''
for i in range(len(s)):
if s[i] == '0':
ans += '0'
elif s[i] == '1':
ans += '1'
else:
if ans != '':
ans = ans[:-1]
print(ans) |
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
2,
13,
17,
14,
2,
4,
13,
13,
17,
0,
13,
18,
13,
39,
17,
0,
13,
2,
13,
13,
4,
13,
13,
10,
2,
13,
10,
18,
13,
10,
17,
13,
10,
4,
13
] | [
[
45,
2
],
[
42,
6
],
[
10,
9
],
[
46,
9
],
[
9,
13
],
[
43,
19
],
[
37,
19
],
[
40,
19
],
[
39,
22
],
[
43,
24
],
[
37,
24
],
[
40,
24
],
[
36,
28
],
[
43,... | [
"s = input()\n\nans = \"\"\nfor c in s:\n if c == 'B':\n if len(ans) > 0:\n ans = ans[:-1]\n else:\n ans = ans + c\nprint(ans)",
"s = input()",
"s",
"input()",
"input",
"ans = \"\"",
"ans",
"\"\"",
"for c in s:\n if c == 'B':\n if len(ans) > 0:\n ans = ans[:-1]\n else:\n an... | s = input()
ans = ""
for c in s:
if c == 'B':
if len(ans) > 0:
ans = ans[:-1]
else:
ans = ans + c
print(ans)
|
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
2,
13,
17,
14,
13,
0,
13,
18,
13,
39,
17,
0,
13,
13,
4,
13,
13,
10,
18,
13,
10,
17,
13,
10,
4,
13,
10,
13,
13
] | [
[
36,
2
],
[
33,
6
],
[
10,
9
],
[
37,
9
],
[
9,
13
],
[
30,
18
],
[
34,
20
],
[
40,
20
],
[
31,
20
],
[
39,
24
],
[
9,
25
],
[
40,
28
],
[
31,
28
],
[
34,
... | [
"arr = input()\nnew = \"\"\nfor x in arr:\n if x == \"B\":\n if new:\n new = new[:-1]\n else:\n new += x\nprint(new)",
"arr = input()",
"arr",
"input()",
"input",
"new = \"\"",
"new",
"\"\"",
"for x in arr:\n if x == \"B\":\n if new:\n new = new[:-... | arr = input()
new = ""
for x in arr:
if x == "B":
if new:
new = new[:-1]
else:
new += x
print(new)
|
[
7,
0,
13,
4,
13,
28,
13,
4,
13,
4,
13,
13,
0,
13,
4,
18,
13,
13,
17,
17,
0,
13,
4,
18,
13,
13,
17,
17,
0,
13,
4,
18,
13,
13,
17,
17,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13
] | [
[
49,
2
],
[
7,
6
],
[
50,
11
],
[
40,
13
],
[
50,
16
],
[
44,
16
],
[
41,
16
],
[
43,
21
],
[
41,
24
],
[
50,
24
],
[
44,
24
],
[
46,
29
],
[
44,
32
],
[
4... | [
"s = input()\nfor i in range(len(s)):\n s=s.replace('0B', '')\n s=s.replace('1B', '')\ns=s.replace('B', '')\nprint(s)",
"s = input()",
"s",
"input()",
"input",
"for i in range(len(s)):\n s=s.replace('0B', '')\n s=s.replace('1B', '')",
"i",
"range(len(s))",
"range",
"len(s)",
"len",
... | s = input()
for i in range(len(s)):
s=s.replace('0B', '')
s=s.replace('1B', '')
s=s.replace('B', '')
print(s) |
[
7,
0,
13,
4,
13,
0,
13,
39,
28,
13,
4,
13,
4,
13,
13,
14,
2,
18,
13,
13,
17,
4,
18,
13,
13,
17,
14,
2,
18,
13,
13,
17,
4,
18,
13,
13,
17,
14,
2,
2,
18,
13,
13,
17,
2,
4,
13,
13,
17,
4,
18,
13,
13,
17,
4,
13... | [
[
65,
2
],
[
62,
6
],
[
10,
9
],
[
66,
14
],
[
66,
18
],
[
9,
19
],
[
63,
23
],
[
66,
29
],
[
9,
30
],
[
63,
34
],
[
66,
41
],
[
9,
42
],
[
63,
47
],
[
63,
... | [
"s = input()\nx = []\nfor i in range(len(s)):\n if s[i] == \"0\":\n x.append(\"0\")\n elif s[i] == \"1\":\n x.append(\"1\")\n elif s[i] == \"B\" and len(x) > 0 :\n x.pop(-1)\nprint(\"\".join(x))",
"s = input()",
"s",
"input()",
"input",
"x = []",
"x",
"[]",
"for i in ra... | s = input()
x = []
for i in range(len(s)):
if s[i] == "0":
x.append("0")
elif s[i] == "1":
x.append("1")
elif s[i] == "B" and len(x) > 0 :
x.pop(-1)
print("".join(x)) |
[
7,
0,
13,
4,
13,
0,
13,
39,
28,
13,
13,
14,
2,
13,
17,
14,
40,
4,
13,
13,
17,
4,
18,
13,
13,
4,
18,
13,
13,
13,
4,
13,
4,
18,
17,
13,
13,
10,
39,
13,
10,
4,
13
] | [
[
41,
2
],
[
38,
6
],
[
10,
9
],
[
42,
9
],
[
9,
13
],
[
39,
19
],
[
39,
23
],
[
39,
27
],
[
9,
29
],
[
39,
36
],
[
38,
39
],
[
41,
42
]
] | [
"s = input()\n\nt = []\nfor c in s:\n if c == \"B\":\n if len(t) != 0:\n t.pop()\n else:\n t.append(c)\nprint(\"\".join(t))\n",
"s = input()",
"s",
"input()",
"input",
"t = []",
"t",
"[]",
"for c in s:\n if c == \"B\":\n if len(t) != 0:\n t.pop()\n... | s = input()
t = []
for c in s:
if c == "B":
if len(t) != 0:
t.pop()
else:
t.append(c)
print("".join(t))
|
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
2,
13,
17,
14,
2,
4,
13,
13,
17,
0,
13,
18,
13,
39,
17,
0,
13,
13,
4,
13,
13,
10,
4,
13,
10,
18,
13,
10,
13,
13,
10,
17,
13
] | [
[
34,
2
],
[
43,
6
],
[
10,
9
],
[
35,
9
],
[
9,
13
],
[
44,
19
],
[
41,
19
],
[
38,
19
],
[
37,
22
],
[
44,
24
],
[
41,
24
],
[
38,
24
],
[
40,
28
],
[
9,
... | [
"s = input()\n\nans = \"\"\nfor c in s:\n if c == \"B\":\n if len(ans) > 0:\n ans = ans[:-1]\n else:\n ans += c\n\nprint(ans)",
"s = input()",
"s",
"input()",
"input",
"ans = \"\"",
"ans",
"\"\"",
"for c in s:\n if c == \"B\":\n if len(ans) > 0:\n ... | s = input()
ans = ""
for c in s:
if c == "B":
if len(ans) > 0:
ans = ans[:-1]
else:
ans += c
print(ans)
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
39,
28,
13,
4,
13,
4,
13,
13,
14,
2,
18,
13,
13,
17,
4,
18,
13,
13,
17,
14,
2,
18,
13,
13,
17,
4,
18,
13,
13,
17,
14,
13,
4,
18,
13,
13,
4,
13,
4,
18,
17,
13,
13,
10,
39,
13,
... | [
[
56,
2
],
[
53,
8
],
[
12,
11
],
[
57,
16
],
[
57,
20
],
[
11,
21
],
[
54,
25
],
[
57,
31
],
[
11,
32
],
[
54,
36
],
[
54,
43
],
[
54,
51
],
[
53,
54
],
[
... | [
"s = str(input())\nans = []\nfor i in range(len(s)):\n if s[i] == '0':\n ans.append('0')\n elif s[i] == '1':\n ans.append('1')\n else:\n if ans:\n ans.pop()\nprint(''.join(ans))",
"s = str(input())",
"s",
"str(input())",
"str",
"input()",
"input",
"ans = []",
... | s = str(input())
ans = []
for i in range(len(s)):
if s[i] == '0':
ans.append('0')
elif s[i] == '1':
ans.append('1')
else:
if ans:
ans.pop()
print(''.join(ans))
|
[
7,
0,
13,
4,
13,
0,
13,
39,
28,
13,
13,
14,
2,
13,
17,
14,
4,
13,
13,
0,
13,
18,
13,
39,
17,
9,
4,
18,
13,
13,
4,
13,
13,
28,
13,
13,
4,
13,
13,
0,
13,
17,
4,
13,
10,
18,
13,
10,
4,
13,
10,
39,
13
] | [
[
48,
2
],
[
51,
6
],
[
10,
9
],
[
49,
9
],
[
9,
13
],
[
52,
18
],
[
46,
18
],
[
45,
20
],
[
52,
22
],
[
46,
22
],
[
52,
28
],
[
46,
28
],
[
9,
32
],
[
35,
... | [
"s = input()\nlis = []\nfor c in s:\n if c == 'B':\n if len(lis):\n lis = lis[:-1]\n else:\n continue\n else:\n lis.append(int(c))\n\nfor i in lis:\n print(i, end=\"\")\nprint()",
"s = input()",
"s",
"input()",
"input",
"lis = []",
"lis",
"[]",
"fo... | s = input()
lis = []
for c in s:
if c == 'B':
if len(lis):
lis = lis[:-1]
else:
continue
else:
lis.append(int(c))
for i in lis:
print(i, end="")
print() |
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
40,
13,
17,
0,
13,
13,
0,
13,
18,
13,
39,
2,
4,
13,
13,
17,
4,
13,
13,
10,
17,
13,
10,
13,
13,
10,
18,
13,
10,
4,
13
] | [
[
41,
2
],
[
32,
6
],
[
10,
9
],
[
42,
9
],
[
9,
13
],
[
35,
16
],
[
9,
17
],
[
38,
19
],
[
33,
21
],
[
39,
21
],
[
36,
21
],
[
33,
26
],
[
39,
26
],
[
36,
... | [
"line = input()\nansw = ''\nfor s in line:\n if s != 'B':\n answ += s\n else:\n answ = answ[:len(answ)-1]\nprint(answ)",
"line = input()",
"line",
"input()",
"input",
"answ = ''",
"answ",
"''",
"for s in line:\n if s != 'B':\n answ += s\n else:\n answ = answ[:... | line = input()
answ = ''
for s in line:
if s != 'B':
answ += s
else:
answ = answ[:len(answ)-1]
print(answ)
|
[
7,
0,
13,
4,
13,
0,
13,
39,
28,
13,
13,
14,
2,
2,
13,
17,
13,
4,
18,
13,
13,
14,
40,
13,
17,
4,
18,
13,
13,
13,
4,
13,
4,
18,
17,
13,
13,
10,
39,
13,
10,
4,
13
] | [
[
41,
2
],
[
38,
6
],
[
10,
9
],
[
42,
9
],
[
9,
14
],
[
39,
16
],
[
39,
19
],
[
9,
23
],
[
39,
27
],
[
9,
29
],
[
39,
36
],
[
38,
39
],
[
41,
42
]
] | [
"s = input()\nstack = []\n\nfor i in s:\n if i == 'B' and stack:\n stack.pop()\n elif i != 'B':\n stack.append(i)\nprint(''.join(stack))",
"s = input()",
"s",
"input()",
"input",
"stack = []",
"stack",
"[]",
"for i in s:\n if i == 'B' and stack:\n stack.pop()\n elif i != 'B':\n stack... | s = input()
stack = []
for i in s:
if i == 'B' and stack:
stack.pop()
elif i != 'B':
stack.append(i)
print(''.join(stack)) |
[
7,
0,
13,
4,
13,
0,
13,
39,
0,
13,
17,
28,
13,
13,
14,
2,
2,
13,
17,
2,
13,
17,
4,
18,
13,
13,
13,
0,
13,
17,
14,
2,
13,
17,
4,
18,
13,
13,
0,
13,
17,
28,
13,
13,
4,
13,
13,
0,
13,
17,
10,
4,
13,
10,
17,
13... | [
[
51,
2
],
[
57,
6
],
[
54,
9
],
[
13,
12
],
[
52,
12
],
[
12,
17
],
[
12,
20
],
[
58,
24
],
[
12,
26
],
[
60,
28
],
[
55,
32
],
[
64,
32
],
[
61,
32
],
[
5... | [
"x = input()\nli = []\nsz = 0\nfor i in x:\n if (i == '0') or (i == '1'):\n li.append(i)\n sz += 1\n else:\n if sz > 0:\n li.pop()\n sz -= 1\n\nfor i in li:\n print(i, end=\"\")",
"x = input()",
"x",
"input()",
"input",
"li = []",
"li",
"[]",
"sz =... | x = input()
li = []
sz = 0
for i in x:
if (i == '0') or (i == '1'):
li.append(i)
sz += 1
else:
if sz > 0:
li.pop()
sz -= 1
for i in li:
print(i, end="")
|
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
4,
13,
4,
13,
13,
14,
2,
18,
13,
13,
17,
0,
13,
2,
13,
17,
14,
2,
18,
13,
13,
17,
0,
13,
2,
13,
17,
14,
2,
18,
13,
13,
17,
14,
40,
13,
17,
0,
13,
18,
13,
39,
17,
4,
13,
1... | [
[
66,
2
],
[
63,
6
],
[
10,
9
],
[
67,
14
],
[
67,
18
],
[
9,
19
],
[
69,
22
],
[
64,
24
],
[
61,
24
],
[
58,
24
],
[
70,
24
],
[
67,
29
],
[
9,
30
],
[
57,... | [
"#入力\ninput = input()\n\ntext = ''\n\n#操作\nfor i in range(len(input)):\n if input[i] == '0':\n text = text + '0'\n elif input[i] == '1':\n text = text + '1'\n elif input[i] == 'B':\n if text != '':\n text = text[:-1]\n\n#出力\nprint(text)",
"input = input()",
"input",
"input()",
"... | #入力
input = input()
text = ''
#操作
for i in range(len(input)):
if input[i] == '0':
text = text + '0'
elif input[i] == '1':
text = text + '1'
elif input[i] == 'B':
if text != '':
text = text[:-1]
#出力
print(text) |
[
7,
0,
13,
17,
28,
13,
4,
13,
14,
2,
13,
17,
4,
13,
13,
10,
17,
13
] | [
[
16,
2
],
[
6,
5
],
[
5,
10
],
[
17,
14
],
[
16,
17
]
] | [
"buf=''\nfor c in input():\n if c=='B': buf=buf[:-1]\n else: buf += c\nprint(buf)",
"buf=''",
"buf",
"''",
"for c in input():\n if c=='B': buf=buf[:-1]\n else: buf += c",
"c",
"input()",
"input",
"if c=='B': buf=buf[:-1]\n else: buf += c",
"c=='B'",
"c",
"'B'",
"print(buf)",
"print",
... | buf=''
for c in input():
if c=='B': buf=buf[:-1]
else: buf += c
print(buf) |
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
4,
13,
4,
13,
13,
14,
2,
18,
13,
13,
17,
0,
13,
17,
14,
2,
18,
13,
13,
17,
0,
13,
17,
14,
40,
4,
13,
13,
17,
0,
13,
18,
13,
39,
17,
4,
13,
13,
10,
17,
13,
10,
17,
13,
10,
... | [
[
55,
2
],
[
49,
6
],
[
10,
9
],
[
56,
14
],
[
56,
18
],
[
9,
19
],
[
52,
22
],
[
56,
27
],
[
9,
28
],
[
61,
31
],
[
50,
37
],
[
59,
37
],
[
62,
37
],
[
53,... | [
"s = input()\nans = \"\"\nfor i in range(len(s)):\n if s[i] == \"0\":\n ans += \"0\"\n elif s[i] == \"1\":\n ans += \"1\"\n else:\n if len(ans) >= 1:\n ans = ans[:-1]\nprint(ans)",
"s = input()",
"s",
"input()",
"input",
"ans = \"\"",
"ans",
"\"\"",
"for i in range(len(s)):\n if s[... | s = input()
ans = ""
for i in range(len(s)):
if s[i] == "0":
ans += "0"
elif s[i] == "1":
ans += "1"
else:
if len(ans) >= 1:
ans = ans[:-1]
print(ans) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
39,
28,
13,
13,
14,
2,
13,
17,
4,
18,
13,
13,
17,
14,
2,
13,
17,
4,
18,
13,
13,
17,
14,
2,
13,
17,
14,
2,
13,
39,
4,
18,
13,
13,
4,
13,
4,
18,
17,
13,
13,
10,
39,
13,
10,
4,
1... | [
[
54,
2
],
[
51,
8
],
[
12,
11
],
[
55,
11
],
[
11,
15
],
[
52,
19
],
[
11,
24
],
[
52,
28
],
[
11,
33
],
[
52,
37
],
[
52,
41
],
[
52,
49
],
[
51,
52
],
[
... | [
"S = list(input())\nS_after = []\nfor i in S:\n if i == '1':\n S_after.append('1')\n elif i == '0':\n S_after.append('0')\n elif i == 'B':\n if S_after == []:\n pass\n else:\n S_after.pop()\nprint(''.join(S_after))",
"S = list(input())",
"S",
"list(in... | S = list(input())
S_after = []
for i in S:
if i == '1':
S_after.append('1')
elif i == '0':
S_after.append('0')
elif i == 'B':
if S_after == []:
pass
else:
S_after.pop()
print(''.join(S_after)) |
[
7,
12,
13,
0,
13,
4,
13,
15,
0,
13,
4,
13,
28,
13,
13,
14,
2,
13,
17,
14,
13,
4,
18,
13,
13,
4,
18,
13,
13,
13,
4,
13,
4,
18,
17,
13,
4,
13,
13,
14,
2,
13,
17,
4,
13,
10,
12,
13
] | [
[
5,
4
],
[
10,
9
],
[
14,
13
],
[
4,
13
],
[
13,
17
],
[
9,
23
],
[
9,
27
],
[
13,
29
],
[
9,
38
],
[
47,
44
]
] | [
"def main():\n s = input()\n from collections import deque\n c = deque()\n for i in s:\n if i == 'B':\n if c:\n c.pop()\n else:\n c.append(i)\n print(''.join(list(c)))\n\nif __name__ == '__main__':\n main()",
"def main():\n s = input()\n f... | def main():
s = input()
from collections import deque
c = deque()
for i in s:
if i == 'B':
if c:
c.pop()
else:
c.append(i)
print(''.join(list(c)))
if __name__ == '__main__':
main()
|
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
2,
13,
17,
0,
13,
17,
14,
2,
13,
17,
0,
13,
17,
14,
2,
4,
13,
13,
17,
0,
13,
18,
13,
39,
17,
4,
13,
13,
10,
18,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13
] | [
[
47,
2
],
[
44,
6
],
[
10,
9
],
[
48,
9
],
[
9,
13
],
[
53,
16
],
[
9,
20
],
[
50,
23
],
[
45,
29
],
[
42,
29
],
[
51,
29
],
[
54,
29
],
[
41,
32
],
[
45,
... | [
"s=input()\nans=\"\"\nfor i in s:\n if i==\"0\":\n ans+=\"0\"\n elif i==\"1\":\n ans+=\"1\"\n else:\n if len(ans)>0:\n ans=ans[:-1]\nprint(ans)",
"s=input()",
"s",
"input()",
"input",
"ans=\"\"",
"ans",
"\"\"",
"for i in s:\n if i==\"0\":\n ans+=\"0... | s=input()
ans=""
for i in s:
if i=="0":
ans+="0"
elif i=="1":
ans+="1"
else:
if len(ans)>0:
ans=ans[:-1]
print(ans) |
[
7,
0,
13,
4,
13,
0,
13,
4,
13,
13,
0,
13,
39,
28,
13,
4,
13,
13,
14,
2,
18,
13,
13,
17,
4,
18,
13,
13,
17,
14,
2,
18,
13,
13,
17,
4,
18,
13,
13,
17,
14,
13,
4,
18,
13,
13,
4,
13,
4,
18,
17,
13,
13,
10,
4,
1... | [
[
54,
2
],
[
60,
6
],
[
55,
9
],
[
57,
11
],
[
15,
14
],
[
61,
17
],
[
55,
21
],
[
14,
22
],
[
58,
26
],
[
55,
32
],
[
14,
33
],
[
58,
37
],
[
58,
44
],
[
5... | [
"s = input()\nn = len(s)\n\nans = []\nfor i in range(n):\n if s[i] == \"0\":\n ans.append(\"0\")\n elif s[i] == \"1\":\n ans.append(\"1\")\n else:\n if ans:\n ans.pop()\n \nprint(\"\".join(ans))",
"s = input()",
"s",
"input()",
"input",
"n = len(s)",
"n",
"len(s)",
"len",
"s"... | s = input()
n = len(s)
ans = []
for i in range(n):
if s[i] == "0":
ans.append("0")
elif s[i] == "1":
ans.append("1")
else:
if ans:
ans.pop()
print("".join(ans)) |
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
2,
13,
17,
0,
13,
18,
13,
39,
17,
0,
13,
13,
4,
13,
13,
10,
4,
13,
10,
13,
13,
10,
17,
13,
10,
18,
13
] | [
[
28,
2
],
[
34,
6
],
[
10,
9
],
[
29,
9
],
[
9,
13
],
[
37,
16
],
[
35,
18
],
[
32,
18
],
[
38,
18
],
[
31,
22
],
[
9,
23
],
[
32,
26
],
[
38,
26
],
[
35,
... | [
"s = input()\nres = ''\nfor elem in s:\n if elem == 'B':\n res = res[:-1]\n else:\n res += elem\nprint(res)",
"s = input()",
"s",
"input()",
"input",
"res = ''",
"res",
"''",
"for elem in s:\n if elem == 'B':\n res = res[:-1]\n else:\n res += elem",
"elem",
"s",
"if elem == 'B'... | s = input()
res = ''
for elem in s:
if elem == 'B':
res = res[:-1]
else:
res += elem
print(res) |
[
7,
0,
13,
4,
13,
0,
13,
4,
13,
13,
0,
13,
17,
12,
13,
14,
2,
13,
17,
29,
13,
0,
13,
18,
13,
39,
17,
2,
4,
13,
13,
17,
29,
13,
23,
13,
28,
13,
4,
13,
4,
13,
13,
14,
40,
2,
18,
13,
13,
17,
0,
13,
18,
13,
13,
... | [
[
70,
2
],
[
64,
6
],
[
71,
9
],
[
73,
11
],
[
35,
17
],
[
35,
20
],
[
23,
22
],
[
35,
24
],
[
35,
30
],
[
22,
33
],
[
35,
33
],
[
35,
35
],
[
38,
37
],
[
7... | [
"S=input()\nList = list(S)\nres=\"\"\n\ndef responseB(moji):\n if moji == \"\":\n return moji\n else:\n moji = moji[0:len(moji)-1]\n return moji\n\nfor i in range(len(S)):\n if not List[i] == \"B\":\n res += List[i]\n else:\n res = responseB(res)\nprint(res)",
"S=input()",
"S",
"input()",
... | S=input()
List = list(S)
res=""
def responseB(moji):
if moji == "":
return moji
else:
moji = moji[0:len(moji)-1]
return moji
for i in range(len(S)):
if not List[i] == "B":
res += List[i]
else:
res = responseB(res)
print(res) |
[
7,
15,
0,
13,
18,
13,
13,
0,
13,
4,
18,
4,
13,
13,
0,
13,
17,
28,
13,
13,
14,
2,
13,
17,
14,
40,
13,
17,
0,
13,
18,
13,
39,
17,
0,
13,
2,
13,
13,
4,
13,
13,
10,
4,
13,
10,
18,
13,
10,
2,
13,
10,
17,
13,
10,
... | [
[
55,
3
],
[
43,
8
],
[
56,
12
],
[
52,
15
],
[
19,
18
],
[
44,
18
],
[
18,
22
],
[
53,
26
],
[
50,
26
],
[
47,
26
],
[
46,
29
],
[
53,
31
],
[
50,
31
],
[
... | [
"from sys import stdin\ninput = stdin.readline\n\nS = input().strip()\nP = ''\nfor s in S:\n if s == 'B':\n if P != '':\n P = P[:-1]\n else:\n P = P + s\nprint(P)",
"from sys import stdin",
"input = stdin.readline",
"input",
"stdin.readline",
"stdin",
"readline",
"S = in... | from sys import stdin
input = stdin.readline
S = input().strip()
P = ''
for s in S:
if s == 'B':
if P != '':
P = P[:-1]
else:
P = P + s
print(P) |
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
2,
13,
17,
0,
13,
17,
14,
2,
13,
17,
0,
13,
17,
14,
2,
4,
13,
13,
17,
0,
13,
18,
13,
39,
17,
4,
13,
13,
10,
4,
13,
10,
18,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13
] | [
[
41,
2
],
[
47,
6
],
[
10,
9
],
[
42,
9
],
[
9,
13
],
[
50,
16
],
[
9,
20
],
[
53,
23
],
[
48,
29
],
[
45,
29
],
[
54,
29
],
[
51,
29
],
[
44,
32
],
[
48,
... | [
"S = input()\n\nans = ''\nfor s in S:\n if s == '0':\n ans+='0'\n elif s == '1':\n ans += '1'\n else:\n if len(ans)>0:\n ans = ans[:-1]\nprint(ans)",
"S = input()",
"S",
"input()",
"input",
"ans = ''",
"ans",
"''",
"for s in S:\n if s == '0':\n ans+... | S = input()
ans = ''
for s in S:
if s == '0':
ans+='0'
elif s == '1':
ans += '1'
else:
if len(ans)>0:
ans = ans[:-1]
print(ans)
|
[
7,
0,
13,
4,
13,
0,
13,
39,
28,
13,
13,
14,
2,
13,
17,
4,
18,
13,
13,
17,
14,
2,
13,
17,
4,
18,
13,
13,
17,
14,
2,
2,
13,
17,
2,
4,
13,
13,
17,
24,
18,
13,
2,
4,
13,
13,
17,
28,
13,
13,
4,
13,
17,
0,
13,
17... | [
[
62,
2
],
[
59,
6
],
[
10,
9
],
[
63,
9
],
[
9,
13
],
[
60,
17
],
[
9,
22
],
[
60,
26
],
[
9,
32
],
[
60,
37
],
[
60,
41
],
[
60,
45
],
[
49,
48
],
[
60,
... | [
"S = input()\nl = []\nfor i in S:\n if i == \"0\":\n l.append(\"0\")\n if i == \"1\":\n l.append(\"1\")\n if i == \"B\" and len(l) > 0:\n del l[len(l) - 1]\n\nfor i in l:\n print(f\"{i}\", end=\"\")\nprint()",
"S = input()",
"S",
"input()",
"input",
"l = []",
"l",
"[]"... | S = input()
l = []
for i in S:
if i == "0":
l.append("0")
if i == "1":
l.append("1")
if i == "B" and len(l) > 0:
del l[len(l) - 1]
for i in l:
print(f"{i}", end="")
print()
|
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
4,
13,
4,
13,
13,
0,
13,
18,
13,
13,
14,
2,
13,
17,
0,
13,
17,
14,
2,
13,
17,
0,
13,
17,
14,
40,
4,
13,
13,
17,
0,
13,
18,
13,
39,
17,
4,
13,
13,
10,
18,
13,
10,
4,
13,
1... | [
[
53,
2
],
[
59,
6
],
[
10,
9
],
[
54,
14
],
[
50,
16
],
[
54,
18
],
[
9,
19
],
[
51,
22
],
[
62,
25
],
[
51,
29
],
[
56,
32
],
[
60,
38
],
[
66,
38
],
[
57... | [
"s=input()\nans=\"\"\nfor i in range(len(s)):\n x=s[i]\n if x==\"0\":\n ans+=\"0\"\n elif x==\"1\":\n ans+=\"1\"\n else:\n if len(ans)!=0:\n ans=ans[:-1]\nprint(ans)",
"s=input()",
"s",
"input()",
"input",
"ans=\"\"",
"ans",
"\"\"",
"for i in range(len(s))... | s=input()
ans=""
for i in range(len(s)):
x=s[i]
if x=="0":
ans+="0"
elif x=="1":
ans+="1"
else:
if len(ans)!=0:
ans=ans[:-1]
print(ans)
|
[
7,
15,
0,
13,
4,
13,
12,
13,
0,
13,
4,
13,
28,
13,
4,
13,
4,
13,
13,
14,
2,
18,
13,
13,
17,
4,
18,
13,
13,
17,
9,
14,
2,
18,
13,
13,
17,
4,
18,
13,
13,
17,
9,
14,
2,
18,
13,
13,
17,
14,
2,
4,
13,
13,
17,
4,... | [
[
83,
3
],
[
10,
9
],
[
14,
13
],
[
78,
18
],
[
78,
22
],
[
13,
23
],
[
9,
27
],
[
78,
34
],
[
13,
35
],
[
9,
39
],
[
78,
46
],
[
13,
47
],
[
9,
53
],
[
9,
... | [
"from collections import deque\nS = input()\n\ndef calculate(s):\n q = deque()\n for i in range(len(s)):\n\n if s[i] == \"0\":\n q.append(\"0\")\n continue\n\n if s[i] == \"1\":\n q.append(\"1\")\n continue\n\n if s[i] == \"B\":\n if ... | from collections import deque
S = input()
def calculate(s):
q = deque()
for i in range(len(s)):
if s[i] == "0":
q.append("0")
continue
if s[i] == "1":
q.append("1")
continue
if s[i] == "B":
if len(q) > 0:
q.p... |
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
2,
13,
17,
14,
13,
0,
13,
18,
13,
39,
17,
17,
0,
13,
13,
4,
13,
13,
10,
17,
13,
10,
18,
13,
10,
13,
13,
10,
4,
13
] | [
[
40,
2
],
[
31,
6
],
[
10,
9
],
[
41,
9
],
[
9,
13
],
[
34,
18
],
[
32,
20
],
[
38,
20
],
[
35,
20
],
[
37,
25
],
[
9,
26
],
[
38,
29
],
[
35,
29
],
[
32,
... | [
"s=input()\nans=\"\"\nfor c in s:\n if c=='B':\n if ans:\n ans=ans[0:-1]\n else:\n ans+=c\nprint(ans)",
"s=input()",
"s",
"input()",
"input",
"ans=\"\"",
"ans",
"\"\"",
"for c in s:\n if c=='B':\n if ans:\n ans=ans[0:-1]\n else:\n ans+=c",
"c",
"s",
"if c=='B':\n i... | s=input()
ans=""
for c in s:
if c=='B':
if ans:
ans=ans[0:-1]
else:
ans+=c
print(ans) |
[
7,
0,
13,
4,
13,
0,
13,
39,
28,
13,
13,
14,
2,
13,
17,
4,
18,
13,
13,
17,
14,
2,
13,
17,
4,
18,
13,
13,
17,
14,
2,
4,
13,
13,
17,
24,
18,
13,
17,
4,
13,
4,
18,
17,
13,
13,
10,
4,
13,
10,
39,
13
] | [
[
47,
2
],
[
50,
6
],
[
10,
9
],
[
48,
9
],
[
9,
13
],
[
51,
17
],
[
9,
22
],
[
51,
26
],
[
51,
33
],
[
51,
37
],
[
51,
45
],
[
47,
48
],
[
50,
51
]
] | [
"s = input()\n\nres = []\nfor c in s:\n if c == '0':\n res.append('0')\n elif c == '1':\n res.append('1')\n else:\n if len(res) > 0:\n del res[-1]\n\nprint(''.join(res))",
"s = input()",
"s",
"input()",
"input",
"res = []",
"res",
"[]",
"for c in s:\n if c... | s = input()
res = []
for c in s:
if c == '0':
res.append('0')
elif c == '1':
res.append('1')
else:
if len(res) > 0:
del res[-1]
print(''.join(res)) |
[
7,
0,
13,
4,
13,
0,
13,
39,
28,
13,
4,
13,
4,
13,
13,
14,
2,
18,
13,
13,
17,
4,
18,
13,
13,
17,
14,
2,
18,
13,
13,
17,
4,
18,
13,
13,
17,
14,
2,
4,
13,
13,
17,
24,
18,
13,
17,
0,
13,
17,
28,
13,
13,
0,
13,
... | [
[
69,
2
],
[
63,
6
],
[
10,
9
],
[
70,
14
],
[
70,
18
],
[
9,
19
],
[
64,
23
],
[
70,
29
],
[
9,
30
],
[
64,
34
],
[
64,
41
],
[
64,
45
],
[
60,
48
],
[
52,... | [
"S = input()\nans = []\nfor i in range(len(S)):\n if S[i] == \"0\":\n ans.append(\"0\")\n elif S[i] == \"1\":\n ans.append(\"1\")\n else:\n if len(ans) > 0:\n del ans[-1]\nans_ = \"\"\nfor s in ans:\n ans_ += s\nprint(ans_)",
"S = input()",
"S",
"input()",
"input"... | S = input()
ans = []
for i in range(len(S)):
if S[i] == "0":
ans.append("0")
elif S[i] == "1":
ans.append("1")
else:
if len(ans) > 0:
del ans[-1]
ans_ = ""
for s in ans:
ans_ += s
print(ans_) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
2,
13,
17,
0,
13,
2,
13,
17,
14,
2,
13,
17,
0,
13,
2,
13,
17,
14,
2,
13,
17,
14,
2,
13,
17,
9,
0,
13,
18,
13,
39,
17,
4,
13,
13,
10,
2,
13,
10,
4,
13,
10,
... | [
[
53,
2
],
[
56,
8
],
[
12,
11
],
[
54,
11
],
[
11,
15
],
[
50,
18
],
[
57,
20
],
[
63,
20
],
[
60,
20
],
[
51,
20
],
[
11,
24
],
[
59,
27
],
[
57,
29
],
[
... | [
"input_str = list(input())\nans = ''\nfor i in input_str:\n if i == '0':\n ans = ans +'0'\n elif i == '1':\n ans = ans + '1'\n elif i == 'B':\n if ans == None:\n continue\n else:\n ans = ans[:-1]\nprint(ans)",
"input_str = list(input())",
"input_str",
... | input_str = list(input())
ans = ''
for i in input_str:
if i == '0':
ans = ans +'0'
elif i == '1':
ans = ans + '1'
elif i == 'B':
if ans == None:
continue
else:
ans = ans[:-1]
print(ans) |
[
7,
41,
28,
13,
4,
13,
4,
13,
4,
13,
0,
13,
13,
0,
13,
39,
28,
13,
13,
14,
2,
2,
13,
17,
2,
13,
17,
4,
18,
13,
13,
13,
14,
2,
4,
13,
13,
17,
4,
18,
13,
13,
17,
4,
13,
4,
18,
17,
13,
13,
10,
13,
13,
10,
39,
1... | [
[
4,
3
],
[
3,
9
],
[
51,
11
],
[
54,
14
],
[
18,
17
],
[
52,
17
],
[
17,
22
],
[
17,
25
],
[
55,
29
],
[
17,
31
],
[
55,
36
],
[
55,
40
],
[
55,
49
],
[
51... | [
"s = [ss for ss in str(input())]\nans = []\nfor i in s:\n if i == \"0\" or i == \"1\":\n ans.append(i)\n elif len(ans) > 0:\n ans.pop(-1)\nprint(\"\".join(ans))",
"ss for ss in str(input())",
"for ss in str(input())",
"ss",
"str(input())",
"str",
"input()",
"input",
"for ss in st... | s = [ss for ss in str(input())]
ans = []
for i in s:
if i == "0" or i == "1":
ans.append(i)
elif len(ans) > 0:
ans.pop(-1)
print("".join(ans)) |
[
7,
0,
13,
4,
13,
0,
13,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
13,
14,
2,
18,
13,
13,
17,
0,
13,
17,
14,
2,
18,
13,
13,
17,
0,
13,
17,
14,
2,
13,
17,
0,
13,
18,
13,
39,
17,
4,
13,
13,
10,
17,
13,
10,
17,
13,
... | [
[
59,
2
],
[
62,
6
],
[
60,
9
],
[
56,
11
],
[
15,
14
],
[
63,
17
],
[
60,
21
],
[
14,
22
],
[
50,
25
],
[
60,
30
],
[
14,
31
],
[
53,
34
],
[
57,
38
],
[
6... | [
"#!/usr/bin/env python3\ns = input()\nlen_s = len(s)\n\ntext = ''\nfor i in range(len_s):\n if s[i] == '0':\n text += '0'\n elif s[i] == '1':\n text += '1'\n else:\n if text == '':\n pass\n else:\n text = text[:-1]\nprint(text)",
"s = input()",
"s",
"... | #!/usr/bin/env python3
s = input()
len_s = len(s)
text = ''
for i in range(len_s):
if s[i] == '0':
text += '0'
elif s[i] == '1':
text += '1'
else:
if text == '':
pass
else:
text = text[:-1]
print(text)
|
[
7,
12,
13,
0,
13,
4,
13,
4,
13,
0,
13,
39,
28,
13,
13,
14,
2,
2,
13,
17,
2,
13,
39,
14,
2,
2,
13,
17,
40,
13,
39,
4,
18,
13,
13,
17,
4,
18,
13,
13,
13,
0,
13,
17,
28,
13,
13,
0,
13,
2,
13,
13,
4,
13,
13,
14... | [
[
5,
4
],
[
11,
10
],
[
14,
13
],
[
4,
13
],
[
13,
18
],
[
10,
21
],
[
13,
26
],
[
10,
29
],
[
10,
33
],
[
10,
38
],
[
13,
40
],
[
43,
42
],
[
46,
45
],
[
1... | [
"def main():\n s = str(input())\n\n ans = []\n for val in s :\n if val == \"B\" and ans == [] :\n pass\n elif val == \"B\" and ans != [] :\n ans.pop(-1)\n else :\n ans.append(val)\n\n ans_str = \"\"\n for val in ans :\n ans_str = ans_str + ... | def main():
s = str(input())
ans = []
for val in s :
if val == "B" and ans == [] :
pass
elif val == "B" and ans != [] :
ans.pop(-1)
else :
ans.append(val)
ans_str = ""
for val in ans :
ans_str = ans_str + val
print(ans_str)
... |
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
2,
2,
13,
17,
2,
13,
17,
0,
13,
13,
14,
13,
0,
13,
18,
13,
39,
17,
4,
13,
13,
10,
4,
13,
10,
17,
13,
10,
13,
13,
10,
18,
13
] | [
[
34,
2
],
[
37,
6
],
[
10,
9
],
[
35,
9
],
[
9,
14
],
[
9,
17
],
[
40,
20
],
[
9,
21
],
[
43,
25
],
[
38,
27
],
[
44,
27
],
[
41,
27
],
[
44,
32
],
[
41,
... | [
"s = input()\na = \"\"\nfor i in s:\n if i == \"1\" or i == \"0\":\n a += i\n else:\n if a:\n a = a[:-1]\nprint(a)",
"s = input()",
"s",
"input()",
"input",
"a = \"\"",
"a",
"\"\"",
"for i in s:\n if i == \"1\" or i == \"0\":\n a += i\n else:\n if a:\n a = a[:-1]",
"i",
... | s = input()
a = ""
for i in s:
if i == "1" or i == "0":
a += i
else:
if a:
a = a[:-1]
print(a) |
[
7,
12,
13,
14,
2,
13,
17,
29,
13,
29,
18,
13,
39,
17,
23,
13,
0,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
2,
13,
17,
0,
13,
4,
13,
13,
0,
13,
13,
4,
13,
13,
10,
4,
13,
10,
13,
13,
10,
4,
13,
10,
17,
13,
10,
12,
... | [
[
15,
5
],
[
15,
8
],
[
15,
11
],
[
15,
15
],
[
42,
17
],
[
51,
21
],
[
25,
24
],
[
43,
24
],
[
24,
28
],
[
48,
31
],
[
55,
33
],
[
52,
34
],
[
46,
34
],
[
... | [
"def bs(s):\n if s == \"\":\n return s\n else:\n return s[:-1]\n \ns = input()\nans = \"\"\nfor c in s:\n if c == \"B\":\n ans = bs(ans)\n else:\n ans += c\nprint(ans)",
"def bs(s):\n if s == \"\":\n return s\n else:\n return s[:-1]\n ",
"bs",
"if s == \"\":\n return s\n else:\n ... | def bs(s):
if s == "":
return s
else:
return s[:-1]
s = input()
ans = ""
for c in s:
if c == "B":
ans = bs(ans)
else:
ans += c
print(ans) |
[
7,
12,
13,
0,
13,
39,
28,
13,
13,
14,
2,
2,
13,
17,
2,
13,
17,
4,
18,
13,
13,
4,
13,
13,
14,
4,
13,
13,
4,
18,
13,
13,
29,
4,
18,
17,
13,
13,
23,
13,
12,
13,
0,
13,
4,
13,
4,
13,
4,
13,
13,
29,
14,
2,
13,
1... | [
[
5,
4
],
[
8,
7
],
[
39,
7
],
[
7,
12
],
[
7,
15
],
[
4,
19
],
[
7,
23
],
[
4,
27
],
[
4,
30
],
[
4,
37
],
[
39,
39
],
[
44,
43
],
[
60,
49
],
[
43,
50... | [
"#!/usr/bin/env python3\n\ndef solve(s):\n l = []\n for c in s:\n if c == \"0\" or c == \"1\":\n l.append(str(c))\n elif len(l):\n l.pop()\n return \"\".join(l)\n\n\n\n\ndef main():\n s = input()\n print(solve(s))\n return\n\nif __name__ == '__main__':\n main()",
"def solve(s):\n l = []\n ... | #!/usr/bin/env python3
def solve(s):
l = []
for c in s:
if c == "0" or c == "1":
l.append(str(c))
elif len(l):
l.pop()
return "".join(l)
def main():
s = input()
print(solve(s))
return
if __name__ == '__main__':
main()
|
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
4,
13,
4,
13,
13,
14,
2,
18,
13,
13,
17,
0,
13,
17,
14,
2,
18,
13,
13,
17,
0,
13,
17,
14,
2,
4,
13,
13,
17,
0,
13,
18,
13,
39,
17,
4,
13,
13,
10,
17,
13,
10,
17,
13,
10,
... | [
[
55,
2
],
[
49,
6
],
[
10,
9
],
[
56,
14
],
[
56,
18
],
[
9,
19
],
[
52,
22
],
[
56,
27
],
[
9,
28
],
[
61,
31
],
[
56,
37
],
[
58,
40
],
[
50,
42
],
[
59,... | [
"a = input()\ntest = ''\nfor i in range(len(a)):\n if a[i] == '0':\n test += '0'\n elif a[i] == '1':\n test += '1'\n else:\n if len(a) == 0:\n pass\n else:\n test = test[:-1]\n \nprint(test)",
"a = input()",
"a",
"input()",
"input",
"test = ''",
"test",
"''",
"for i in ra... | a = input()
test = ''
for i in range(len(a)):
if a[i] == '0':
test += '0'
elif a[i] == '1':
test += '1'
else:
if len(a) == 0:
pass
else:
test = test[:-1]
print(test) |
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
40,
13,
17,
0,
13,
13,
14,
2,
13,
17,
0,
13,
18,
13,
39,
17,
4,
13,
13,
10,
4,
13,
10,
18,
13,
10,
13,
13,
10,
17,
13
] | [
[
32,
2
],
[
41,
6
],
[
10,
9
],
[
33,
9
],
[
9,
13
],
[
38,
16
],
[
9,
17
],
[
9,
20
],
[
35,
23
],
[
42,
25
],
[
36,
25
],
[
39,
25
],
[
36,
30
],
[
39,
... | [
"s=input()\noutput=''\nfor i in s:\n if i!='B':\n output+=i\n elif i=='B':\n output=output[:-1]\nprint(output)",
"s=input()",
"s",
"input()",
"input",
"output=''",
"output",
"''",
"for i in s:\n if i!='B':\n output+=i\n elif i=='B':\n output=output[:-1]",
"i... | s=input()
output=''
for i in s:
if i!='B':
output+=i
elif i=='B':
output=output[:-1]
print(output)
|
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
2,
2,
13,
17,
2,
13,
17,
0,
13,
2,
13,
13,
14,
2,
13,
17,
0,
13,
18,
13,
39,
17,
4,
13,
13,
10,
18,
13,
10,
2,
13,
10,
17,
13,
10,
4,
13
] | [
[
47,
2
],
[
44,
6
],
[
10,
9
],
[
48,
9
],
[
9,
14
],
[
9,
17
],
[
41,
20
],
[
45,
22
],
[
39,
22
],
[
42,
22
],
[
9,
23
],
[
9,
26
],
[
38,
29
],
[
42,
... | [
"n = input()\nstr = ''\nfor i in n:\n if i == '0' or i == '1':\n str = str + i\n if i == 'B':\n str = str[:-1]\n \nprint(str)",
"n = input()",
"n",
"input()",
"input",
"str = ''",
"str",
"''",
"for i in n:\n if i == '0' or i == '1':\n str = str + i\n if i == 'B':\n str = str[:-1]\... | n = input()
str = ''
for i in n:
if i == '0' or i == '1':
str = str + i
if i == 'B':
str = str[:-1]
print(str) |
[
7,
0,
13,
4,
13,
0,
13,
39,
28,
13,
13,
14,
40,
13,
17,
4,
18,
13,
13,
13,
14,
13,
4,
18,
13,
13,
4,
13,
31,
13,
0,
13,
17,
10,
39,
13,
10,
4,
13
] | [
[
37,
2
],
[
34,
6
],
[
10,
9
],
[
38,
9
],
[
9,
13
],
[
35,
17
],
[
9,
19
],
[
35,
24
],
[
35,
29
],
[
32,
31
],
[
34,
35
],
[
37,
38
]
] | [
"s = input()\na = []\nfor i in s:\n if i != \"B\":\n a.append(i)\n else:\n if a:\n a.pop()\nprint(*a, sep = \"\")",
"s = input()",
"s",
"input()",
"input",
"a = []",
"a",
"[]",
"for i in s:\n if i != \"B\":\n a.append(i)\n else:\n if a:\n ... | s = input()
a = []
for i in s:
if i != "B":
a.append(i)
else:
if a:
a.pop()
print(*a, sep = "") |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
17,
28,
13,
4,
13,
4,
13,
13,
14,
2,
2,
18,
13,
13,
17,
2,
18,
13,
13,
17,
0,
13,
18,
13,
13,
0,
13,
18,
13,
39,
17,
4,
13,
13,
10,
18,
13,
10,
4,
13,
10,
17,
13,
10,
18,
13
] | [
[
47,
2
],
[
50,
8
],
[
12,
11
],
[
48,
16
],
[
48,
21
],
[
11,
22
],
[
48,
26
],
[
11,
27
],
[
44,
30
],
[
48,
32
],
[
11,
33
],
[
53,
35
],
[
51,
37
],
[
... | [
"S=str(input())\nT=''\nfor i in range(len(S)):\n if S[i]=='0' or S[i]=='1':\n T+=S[i]\n else:\n T=T[:-1]\nprint(T)",
"S=str(input())",
"S",
"str(input())",
"str",
"input()",
"input",
"T=''",
"T",
"''",
"for i in range(len(S)):\n if S[i]=='0' or S[i]=='1':\n T+=S[i]\... | S=str(input())
T=''
for i in range(len(S)):
if S[i]=='0' or S[i]=='1':
T+=S[i]
else:
T=T[:-1]
print(T) |
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
2,
13,
17,
14,
2,
13,
17,
0,
13,
4,
13,
13,
0,
13,
18,
13,
39,
17,
2,
13,
17,
0,
13,
13,
4,
13,
13,
10,
17,
13,
10,
4,
13,
10,
18,
13,
10,
13,
13,
10,
4,
13
] | [
[
43,
2
],
[
40,
6
],
[
10,
9
],
[
44,
9
],
[
9,
13
],
[
41,
17
],
[
50,
17
],
[
47,
17
],
[
52,
20
],
[
41,
23
],
[
50,
23
],
[
47,
23
],
[
46,
25
],
[
41,... | [
"s = input()\nans = \"\"\nfor char in s:\n if char == 'B':\n if ans == \"\":\n pass\n else:\n l = len(ans)\n ans = ans[0:l-1]\n else:\n ans += char\nprint(ans)",
"s = input()",
"s",
"input()",
"input",
"ans = \"\"",
"ans",
"\"\"",
"for char... | s = input()
ans = ""
for char in s:
if char == 'B':
if ans == "":
pass
else:
l = len(ans)
ans = ans[0:l-1]
else:
ans += char
print(ans)
|
[
7,
0,
13,
4,
13,
0,
13,
39,
0,
13,
39,
17,
17,
0,
13,
39,
17,
0,
13,
4,
13,
13,
28,
13,
13,
14,
2,
13,
13,
4,
18,
13,
13,
13,
14,
2,
13,
13,
14,
40,
4,
13,
13,
17,
4,
18,
13,
13,
0,
13,
4,
18,
17,
13,
13,
4... | [
[
71,
2
],
[
65,
6
],
[
68,
9
],
[
59,
14
],
[
62,
18
],
[
72,
21
],
[
24,
23
],
[
63,
23
],
[
23,
27
],
[
69,
28
],
[
66,
31
],
[
23,
33
],
[
23,
36
],
[
6... | [
"# -*- coding: utf-8 -*-\n# B - バイナリハックイージー\n\ns = input()\nlistAns = []\n\nset1 = ['0', '1']\nset2 = ['B']\n\nlistS = list(s)\n\n# print(listS)\n\nfor i in listS:\n if i in set1:\n listAns.append(i)\n\n elif i in set2:\n if len(listAns) != 0:\n listAns.pop()\n\nans = \"\".join(listAn... | # -*- coding: utf-8 -*-
# B - バイナリハックイージー
s = input()
listAns = []
set1 = ['0', '1']
set2 = ['B']
listS = list(s)
# print(listS)
for i in listS:
if i in set1:
listAns.append(i)
elif i in set2:
if len(listAns) != 0:
listAns.pop()
ans = "".join(listAns)
print(ans) |
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
4,
13,
4,
13,
13,
14,
2,
18,
13,
13,
17,
0,
13,
17,
14,
2,
18,
13,
13,
17,
0,
13,
17,
14,
2,
18,
13,
13,
17,
0,
13,
18,
13,
39,
17,
2,
4,
13,
13,
17,
4,
13,
13,
10,
4,
13... | [
[
54,
2
],
[
66,
6
],
[
10,
9
],
[
55,
14
],
[
55,
18
],
[
9,
19
],
[
60,
22
],
[
55,
27
],
[
9,
28
],
[
63,
31
],
[
55,
36
],
[
9,
37
],
[
57,
40
],
[
67,
... | [
"input = input()\noutput = \"\"\n\nfor i in range(len(input)):\n if input[i] == \"0\":\n output += \"0\"\n elif input[i] == \"1\":\n output += \"1\"\n elif input[i] == \"B\":\n output = output[0:len(output)-1]\n else:\n pass\n\nprint(output)",
"input = input()",
"input",
... | input = input()
output = ""
for i in range(len(input)):
if input[i] == "0":
output += "0"
elif input[i] == "1":
output += "1"
elif input[i] == "B":
output = output[0:len(output)-1]
else:
pass
print(output) |
[
7,
0,
13,
4,
13,
0,
13,
39,
28,
13,
4,
13,
4,
13,
13,
14,
2,
18,
13,
13,
17,
4,
18,
13,
13,
17,
14,
2,
18,
13,
13,
17,
4,
18,
13,
13,
17,
14,
40,
4,
13,
13,
17,
4,
18,
13,
13,
9,
4,
13,
4,
18,
17,
13,
13,
1... | [
[
56,
2
],
[
59,
6
],
[
10,
9
],
[
57,
14
],
[
57,
18
],
[
9,
19
],
[
60,
23
],
[
57,
29
],
[
9,
30
],
[
60,
34
],
[
60,
41
],
[
60,
45
],
[
60,
54
],
[
56,... | [
"s = input()\n\nst = []\n\nfor i in range(len(s)):\n if s[i] == \"0\":\n st.append(\"0\")\n elif s[i] == \"1\":\n st.append(\"1\")\n else:\n if len(st) != 0:\n st.pop()\n else:\n continue\n\nprint(\"\".join(st))",
"s = input()",
"s",
"input()",
"inp... | s = input()
st = []
for i in range(len(s)):
if s[i] == "0":
st.append("0")
elif s[i] == "1":
st.append("1")
else:
if len(st) != 0:
st.pop()
else:
continue
print("".join(st))
|
[
7,
15,
13,
12,
13,
0,
13,
4,
13,
0,
13,
39,
28,
13,
13,
14,
40,
13,
17,
4,
18,
13,
13,
13,
14,
40,
4,
13,
13,
17,
24,
18,
13,
17,
4,
13,
4,
18,
17,
13,
13,
10,
4,
13,
10,
12,
13,
10,
39,
13
] | [
[
42,
6
],
[
46,
8
],
[
48,
10
],
[
14,
13
],
[
43,
13
],
[
13,
17
],
[
49,
21
],
[
13,
23
],
[
49,
28
],
[
49,
32
],
[
49,
40
],
[
42,
43
],
[
48,
49
]
] | [
"import sys\ndef LS2(): return list(sys.stdin.readline().rstrip()) #空白なし\n\ns = LS2()\nans = []\nfor a in s:\n if a != 'B':\n ans.append(a)\n else:\n if len(ans) != 0:\n del ans[-1]\n\nprint(''.join(ans))",
"import sys",
"sys",
"def LS2(): return list(sys.stdin.readline().rstri... | import sys
def LS2(): return list(sys.stdin.readline().rstrip()) #空白なし
s = LS2()
ans = []
for a in s:
if a != 'B':
ans.append(a)
else:
if len(ans) != 0:
del ans[-1]
print(''.join(ans)) |
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
4,
13,
4,
13,
13,
14,
2,
18,
13,
13,
17,
0,
13,
18,
13,
39,
17,
0,
13,
18,
13,
13,
4,
13,
13,
10,
18,
13,
10,
17,
13,
10,
18,
13,
10,
4,
13
] | [
[
45,
2
],
[
39,
6
],
[
10,
9
],
[
46,
14
],
[
46,
18
],
[
9,
19
],
[
42,
22
],
[
40,
24
],
[
37,
24
],
[
43,
24
],
[
36,
28
],
[
46,
30
],
[
9,
31
],
[
37,... | [
"s = input()\n\nans = ''\nfor i in range(len(s)):\n if s[i] == 'B':\n ans = ans[:-1]\n else:\n ans += s[i]\n\nprint(ans)",
"s = input()",
"s",
"input()",
"input",
"ans = ''",
"ans",
"''",
"for i in range(len(s)):\n if s[i] == 'B':\n ans = ans[:-1]\n else:\n an... | s = input()
ans = ''
for i in range(len(s)):
if s[i] == 'B':
ans = ans[:-1]
else:
ans += s[i]
print(ans) |
[
7,
0,
13,
4,
13,
0,
13,
39,
28,
13,
13,
14,
2,
40,
13,
40,
13,
17,
4,
18,
13,
13,
13,
14,
2,
13,
17,
14,
13,
4,
18,
13,
13,
13,
4,
13,
4,
18,
17,
13,
13,
10,
4,
13,
10,
39,
13
] | [
[
42,
2
],
[
45,
6
],
[
10,
9
],
[
43,
9
],
[
46,
14
],
[
9,
16
],
[
46,
20
],
[
9,
22
],
[
9,
25
],
[
46,
31
],
[
9,
33
],
[
46,
40
],
[
42,
43
],
[
45,
... | [
"S = input()\n\nstack = []\n\nfor s in S:\n if not stack and s!=\"B\":\n stack.append(s)\n elif s==\"B\":\n if stack:stack.pop()\n else:continue\n else:\n stack.append(s)\nprint(\"\".join(stack))",
"S = input()",
"S",
"input()",
"input",
"stack = []",
"stack",
"[]"... | S = input()
stack = []
for s in S:
if not stack and s!="B":
stack.append(s)
elif s=="B":
if stack:stack.pop()
else:continue
else:
stack.append(s)
print("".join(stack)) |
[
7,
15,
0,
13,
4,
13,
0,
13,
4,
13,
28,
13,
4,
13,
4,
13,
13,
14,
2,
18,
13,
13,
17,
14,
2,
4,
13,
13,
17,
4,
18,
13,
13,
4,
18,
13,
13,
18,
13,
13,
4,
13,
4,
18,
17,
13,
4,
13,
13,
10,
4,
13,
10,
4,
13
] | [
[
50,
3
],
[
53,
7
],
[
12,
11
],
[
51,
16
],
[
51,
20
],
[
11,
21
],
[
54,
27
],
[
54,
31
],
[
54,
35
],
[
51,
38
],
[
11,
39
],
[
54,
48
],
[
50,
51
],
[
... | [
"from collections import deque\ns = input()\nlst = deque()\nfor i in range(len(s)):\n if s[i] == 'B':\n if len(lst) > 0:\n lst.pop()\n else:\n pass\n else:\n lst.append(s[i])\nprint(''.join(list(lst)))",
"from collections import deque",
"s = input()",
"s",
"input()",
"input",
"lst =... | from collections import deque
s = input()
lst = deque()
for i in range(len(s)):
if s[i] == 'B':
if len(lst) > 0:
lst.pop()
else:
pass
else:
lst.append(s[i])
print(''.join(list(lst))) |
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
2,
2,
13,
17,
2,
13,
17,
0,
13,
13,
0,
13,
18,
13,
39,
17,
4,
13,
13,
10,
17,
13,
10,
13,
13,
10,
18,
13,
10,
4,
13
] | [
[
41,
2
],
[
32,
6
],
[
10,
9
],
[
42,
9
],
[
9,
14
],
[
9,
17
],
[
35,
20
],
[
9,
21
],
[
38,
23
],
[
33,
25
],
[
39,
25
],
[
36,
25
],
[
39,
30
],
[
36,
... | [
"S = input()\nes =''\nfor s in S:\n if s == '1' or s == '0':\n es+=s\n else:\n #if es != '':\n es=es[:-1]\nprint(es)",
"S = input()",
"S",
"input()",
"input",
"es =''",
"es",
"''",
"for s in S:\n if s == '1' or s == '0':\n es+=s\n else:\n #if es != '':\... | S = input()
es =''
for s in S:
if s == '1' or s == '0':
es+=s
else:
#if es != '':
es=es[:-1]
print(es) |
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
2,
13,
17,
0,
13,
17,
14,
2,
13,
17,
0,
13,
17,
14,
40,
13,
17,
0,
13,
18,
13,
39,
17,
4,
13,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
18,
13
] | [
[
42,
2
],
[
45,
6
],
[
10,
9
],
[
43,
9
],
[
9,
13
],
[
48,
16
],
[
9,
20
],
[
39,
23
],
[
46,
27
],
[
52,
27
],
[
40,
27
],
[
49,
27
],
[
51,
30
],
[
46,
... | [
"s=input()\n\nans=''\nfor i in s:\n if i=='0':\n ans+='0'\n elif i=='1':\n ans+='1'\n else:\n if ans!='':\n ans=ans[:-1]\n\nprint(ans)",
"s=input()",
"s",
"input()",
"input",
"ans=''",
"ans",
"''",
"for i in s:\n if i=='0':\n ans+='0'\n elif i=='1':\n ans+='1'\n else:\n ... | s=input()
ans=''
for i in s:
if i=='0':
ans+='0'
elif i=='1':
ans+='1'
else:
if ans!='':
ans=ans[:-1]
print(ans) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
2,
13,
17,
0,
13,
18,
13,
39,
2,
4,
13,
13,
17,
0,
13,
13,
4,
13,
13,
10,
13,
13,
10,
18,
13,
10,
4,
13,
10,
17,
13
] | [
[
40,
2
],
[
43,
8
],
[
12,
11
],
[
41,
11
],
[
11,
15
],
[
37,
18
],
[
44,
20
],
[
35,
20
],
[
38,
20
],
[
44,
25
],
[
35,
25
],
[
38,
25
],
[
34,
28
],
[
... | [
"S = list(input())\nans = \"\"\n\nfor s in S:\n if s == \"B\":\n ans = ans[:len(ans) - 1]\n else:\n ans += s\n \nprint(ans)",
"S = list(input())",
"S",
"list(input())",
"list",
"input()",
"input",
"ans = \"\"",
"ans",
"\"\"",
"for s in S:\n if s == \"B\":\n a... | S = list(input())
ans = ""
for s in S:
if s == "B":
ans = ans[:len(ans) - 1]
else:
ans += s
print(ans) |
[
7,
0,
13,
4,
13,
0,
13,
39,
28,
13,
13,
14,
40,
13,
17,
4,
18,
13,
13,
13,
14,
40,
13,
9,
4,
18,
13,
13,
4,
13,
4,
18,
17,
13,
13,
10,
39,
13,
10,
4,
13
] | [
[
39,
2
],
[
36,
6
],
[
10,
9
],
[
40,
9
],
[
9,
13
],
[
37,
17
],
[
9,
19
],
[
37,
22
],
[
37,
26
],
[
37,
34
],
[
36,
37
],
[
39,
40
]
] | [
"s=input()\nstack =[]\nfor i in s:\n if i != \"B\":\n stack.append(i)\n else:\n if not stack:\n continue\n else:\n stack.pop()\nprint(\"\".join(stack))",
"s=input()",
"s",
"input()",
"input",
"stack =[]",
"stack",
"[]",
"for i in s:\n if i != \"B\"... | s=input()
stack =[]
for i in s:
if i != "B":
stack.append(i)
else:
if not stack:
continue
else:
stack.pop()
print("".join(stack)) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
39,
28,
13,
13,
14,
2,
13,
17,
14,
40,
13,
39,
4,
18,
13,
13,
4,
18,
13,
13,
13,
4,
13,
4,
18,
17,
13,
13,
10,
39,
13,
10,
4,
13
] | [
[
41,
2
],
[
38,
8
],
[
12,
11
],
[
42,
11
],
[
11,
15
],
[
39,
19
],
[
39,
23
],
[
39,
27
],
[
11,
29
],
[
39,
36
],
[
38,
39
],
[
41,
42
]
] | [
"s = list(input())\nout = []\n\nfor s1 in s:\n\tif s1 == 'B':\n\t\tif out != []:\n\t\t\tout.pop()\n\telse:\n\t\tout.append(s1)\nprint(''.join(out))",
"s = list(input())",
"s",
"list(input())",
"list",
"input()",
"input",
"out = []",
"out",
"[]",
"for s1 in s:\n\tif s1 == 'B':\n\t\tif out != []:\... | s = list(input())
out = []
for s1 in s:
if s1 == 'B':
if out != []:
out.pop()
else:
out.append(s1)
print(''.join(out)) |
[
7,
0,
13,
4,
13,
0,
13,
17,
0,
13,
17,
28,
13,
18,
13,
39,
17,
14,
2,
13,
17,
0,
13,
17,
9,
14,
13,
0,
13,
17,
9,
0,
13,
13,
4,
13,
18,
13,
39,
17,
10,
13,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
... | [
[
44,
2
],
[
53,
6
],
[
56,
9
],
[
13,
12
],
[
45,
14
],
[
12,
19
],
[
47,
22
],
[
50,
28
],
[
41,
32
],
[
12,
33
],
[
42,
37
],
[
54,
37
],
[
12,
41
],
[
4... | [
"S = input()\nans = \"\"\nflag = 0\nfor s in S[::-1]:\n if s == \"B\":\n flag += 1\n continue\n if flag:\n flag -= 1\n continue\n ans += s\nprint(ans[::-1])",
"S = input()",
"S",
"input()",
"input",
"ans = \"\"",
"ans",
"\"\"",
"flag = 0",
"flag",
"0",
"for s in S[::-1]:\n if s... | S = input()
ans = ""
flag = 0
for s in S[::-1]:
if s == "B":
flag += 1
continue
if flag:
flag -= 1
continue
ans += s
print(ans[::-1]) |
[
7,
0,
13,
4,
13,
0,
13,
39,
28,
13,
13,
14,
2,
13,
17,
4,
18,
13,
13,
17,
14,
2,
13,
17,
4,
18,
13,
13,
17,
14,
40,
4,
13,
13,
17,
4,
18,
13,
13,
17,
4,
13,
31,
13,
0,
13,
17,
10,
39,
13,
10,
4,
13
] | [
[
51,
2
],
[
48,
6
],
[
10,
9
],
[
52,
9
],
[
9,
13
],
[
49,
17
],
[
9,
22
],
[
49,
26
],
[
49,
33
],
[
49,
37
],
[
49,
43
],
[
46,
45
],
[
48,
49
],
[
51,
... | [
"s = input()\nans = []\nfor i in s:\n if i == \"0\":\n ans.append(0)\n elif i == \"1\":\n ans.append(1)\n else:\n if len(ans) != 0:\n ans.pop(-1)\nprint(*ans,sep=\"\")",
"s = input()",
"s",
"input()",
"input",
"ans = []",
"ans",
"[]",
"for i in s:\n if i == \"0\":\n ans.append(0... | s = input()
ans = []
for i in s:
if i == "0":
ans.append(0)
elif i == "1":
ans.append(1)
else:
if len(ans) != 0:
ans.pop(-1)
print(*ans,sep="") |
[
7,
0,
13,
4,
13,
0,
13,
39,
28,
13,
13,
14,
2,
13,
17,
14,
13,
4,
18,
13,
13,
4,
18,
13,
13,
13,
4,
13,
4,
18,
17,
13,
13,
10,
4,
13,
10,
39,
13
] | [
[
34,
2
],
[
37,
6
],
[
10,
9
],
[
35,
9
],
[
9,
13
],
[
38,
19
],
[
38,
23
],
[
9,
25
],
[
38,
32
],
[
34,
35
],
[
37,
38
]
] | [
"S = input()\nans = []\nfor c in S:\n if c == \"B\":\n if ans:\n ans.pop()\n else:\n ans.append(c)\nprint(\"\".join(ans))",
"S = input()",
"S",
"input()",
"input",
"ans = []",
"ans",
"[]",
"for c in S:\n if c == \"B\":\n if ans:\n ans.pop()\n el... | S = input()
ans = []
for c in S:
if c == "B":
if ans:
ans.pop()
else:
ans.append(c)
print("".join(ans))
|
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
2,
2,
13,
17,
2,
13,
17,
0,
13,
13,
0,
13,
4,
13,
13,
14,
2,
13,
17,
0,
13,
18,
13,
39,
2,
13,
17,
4,
13,
13,
10,
4,
13,
10,
4,
13,
10,
18,
13,
10,
17,
13,
10,
13... | [
[
46,
2
],
[
52,
6
],
[
10,
9
],
[
47,
9
],
[
9,
14
],
[
9,
17
],
[
55,
20
],
[
9,
21
],
[
43,
23
],
[
53,
26
],
[
50,
26
],
[
56,
26
],
[
44,
29
],
[
49,
... | [
"S = input()\noutput = ''\nfor s in S:\n if s == '0' or s == '1':\n output += s\n else:\n l = len(output)\n if l > 0:\n output = output[:l-1]\nprint(output)",
"S = input()",
"S",
"input()",
"input",
"output = ''",
"output",
"''",
"for s in S:\n if s == '0' or... | S = input()
output = ''
for s in S:
if s == '0' or s == '1':
output += s
else:
l = len(output)
if l > 0:
output = output[:l-1]
print(output)
|
[
7,
12,
13,
0,
13,
4,
13,
4,
13,
0,
13,
39,
28,
13,
13,
14,
2,
2,
4,
13,
13,
17,
2,
13,
17,
9,
14,
2,
13,
17,
4,
18,
13,
13,
17,
4,
18,
13,
13,
13,
4,
13,
4,
18,
17,
13,
13,
14,
2,
13,
17,
4,
13,
10,
12,
13
... | [
[
5,
4
],
[
11,
10
],
[
14,
13
],
[
4,
13
],
[
10,
20
],
[
13,
23
],
[
13,
28
],
[
10,
32
],
[
10,
37
],
[
13,
39
],
[
10,
46
],
[
55,
52
]
] | [
"# B - バイナリハックイージー\ndef main():\n s = list(input())\n val = []\n\n for i in s:\n if len(val) == 0 and i == 'B':\n continue\n elif i == 'B':\n val.pop(-1)\n else:\n val.append(i)\n else:\n print(''.join(val))\n \n \nif __name__ == \"__main_... | # B - バイナリハックイージー
def main():
s = list(input())
val = []
for i in s:
if len(val) == 0 and i == 'B':
continue
elif i == 'B':
val.pop(-1)
else:
val.append(i)
else:
print(''.join(val))
if __name__ == "__main__":
main() |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
13,
0,
13,
39,
28,
13,
4,
13,
4,
13,
13,
14,
40,
18,
13,
13,
17,
4,
18,
13,
13,
18,
13,
13,
14,
2,
2,
18,
13,
13,
17,
40,
4,
13,
13,
17,
4,
18,
13,
13,
4,
13,
4,
18,
17... | [
[
62,
2
],
[
65,
8
],
[
63,
11
],
[
59,
13
],
[
17,
16
],
[
66,
21
],
[
66,
25
],
[
16,
26
],
[
60,
30
],
[
66,
33
],
[
16,
34
],
[
66,
39
],
[
16,
40
],
[
... | [
"s=str(input())\nC= list(s)\nlist=[]\nfor I in range(len(C)):\n if C[I]!='B':\n list.append(C[I])\n elif C[I]=='B' and len(list)!=0:\n list.pop()\n \nprint(\"\".join(list))",
"s=str(input())",
"s",
"str(input())",
"str",
"input()",
"input",
"C= list(s)",
"C",
"list(s)",
"list... | s=str(input())
C= list(s)
list=[]
for I in range(len(C)):
if C[I]!='B':
list.append(C[I])
elif C[I]=='B' and len(list)!=0:
list.pop()
print("".join(list)) |
[
7,
0,
13,
4,
13,
0,
13,
39,
28,
13,
13,
14,
2,
2,
13,
17,
2,
13,
17,
4,
18,
13,
13,
13,
14,
2,
13,
17,
14,
13,
4,
18,
13,
13,
17,
4,
13,
4,
18,
17,
13,
13,
10,
39,
13,
10,
4,
13
] | [
[
46,
2
],
[
43,
6
],
[
10,
9
],
[
47,
9
],
[
9,
14
],
[
9,
17
],
[
44,
21
],
[
9,
23
],
[
9,
26
],
[
44,
32
],
[
44,
41
],
[
43,
44
],
[
46,
47
]
] | [
"S = input()\nans = []\nfor s in S:\n if s == \"0\" or s == \"1\":\n ans.append(s)\n if s == \"B\":\n if ans:\n ans.pop(-1)\nprint(\"\".join(ans))",
"S = input()",
"S",
"input()",
"input",
"ans = []",
"ans",
"[]",
"for s in S:\n if s == \"0\" or s == \"1\":\n ... | S = input()
ans = []
for s in S:
if s == "0" or s == "1":
ans.append(s)
if s == "B":
if ans:
ans.pop(-1)
print("".join(ans)) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
13,
0,
13,
39,
28,
13,
4,
13,
13,
14,
2,
18,
13,
13,
17,
4,
18,
13,
13,
17,
14,
2,
18,
13,
13,
17,
4,
18,
13,
13,
17,
14,
2,
18,
13,
13,
17,
14,
2,
13,
39,
9,
4,
18,
13... | [
[
78,
2
],
[
75,
8
],
[
79,
11
],
[
72,
13
],
[
17,
16
],
[
76,
19
],
[
79,
23
],
[
16,
24
],
[
73,
28
],
[
79,
34
],
[
16,
35
],
[
73,
39
],
[
79,
45
],
[
... | [
"s = list(input())\nx = len(s)\na = []\n\nfor i in range(x):\n if s[i] == '0':\n a.append('0')\n elif s[i] == '1':\n a.append('1')\n elif s[i] == 'B':\n if a == []:\n continue\n else:\n a.pop(-1)\nb = ''.join(a)\nprint(b)",
"s = list(input())",
"s",
"list(input())",
"list",
"input... | s = list(input())
x = len(s)
a = []
for i in range(x):
if s[i] == '0':
a.append('0')
elif s[i] == '1':
a.append('1')
elif s[i] == 'B':
if a == []:
continue
else:
a.pop(-1)
b = ''.join(a)
print(b) |
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
2,
2,
13,
17,
2,
13,
17,
0,
13,
13,
14,
2,
4,
13,
13,
17,
0,
13,
18,
13,
39,
17,
17,
4,
13,
13,
10,
13,
13,
10,
4,
13,
10,
18,
13,
10,
17,
13
] | [
[
42,
2
],
[
48,
6
],
[
10,
9
],
[
43,
9
],
[
9,
14
],
[
9,
17
],
[
39,
20
],
[
9,
21
],
[
49,
26
],
[
46,
26
],
[
40,
26
],
[
45,
29
],
[
49,
31
],
[
46,
... | [
"s=input()\nans=\"\"\nfor i in s:\n if i == \"1\"or i==\"0\":\n ans+=i\n else:\n if len(ans)>0:\n ans=ans[0:-1]\nprint(ans)",
"s=input()",
"s",
"input()",
"input",
"ans=\"\"",
"ans",
"\"\"",
"for i in s:\n if i == \"1\"or i==\"0\":\n ans+=i\n else:\n if len(ans)>0:\n ans=an... | s=input()
ans=""
for i in s:
if i == "1"or i=="0":
ans+=i
else:
if len(ans)>0:
ans=ans[0:-1]
print(ans) |
[
7,
0,
13,
4,
13,
0,
13,
39,
28,
13,
13,
14,
2,
13,
17,
4,
18,
13,
13,
17,
14,
2,
13,
17,
4,
18,
13,
13,
17,
14,
40,
4,
13,
13,
17,
24,
18,
13,
17,
4,
13,
4,
18,
17,
13,
13,
10,
4,
13,
10,
39,
13
] | [
[
47,
2
],
[
50,
6
],
[
10,
9
],
[
48,
9
],
[
9,
13
],
[
51,
17
],
[
9,
22
],
[
51,
26
],
[
51,
33
],
[
51,
37
],
[
51,
45
],
[
47,
48
],
[
50,
51
]
] | [
"s = input()\nL = []\nfor x in s:\n if x == \"0\":\n L.append(\"0\")\n elif x == \"1\":\n L.append(\"1\")\n else:\n if len(L) >= 1:\n del L[-1]\nprint(\"\".join(L))",
"s = input()",
"s",
"input()",
"input",
"L = []",
"L",
"[]",
"for x in s:\n if x == \"0\"... | s = input()
L = []
for x in s:
if x == "0":
L.append("0")
elif x == "1":
L.append("1")
else:
if len(L) >= 1:
del L[-1]
print("".join(L)) |
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
4,
13,
17,
4,
13,
13,
14,
2,
18,
13,
13,
17,
0,
13,
2,
13,
17,
14,
2,
18,
13,
13,
17,
0,
13,
2,
13,
17,
14,
2,
18,
13,
13,
17,
14,
2,
4,
13,
13,
17,
0,
13,
18,
13,
39,
17... | [
[
65,
2
],
[
71,
6
],
[
10,
9
],
[
66,
15
],
[
66,
19
],
[
9,
20
],
[
68,
23
],
[
72,
25
],
[
75,
25
],
[
78,
25
],
[
69,
25
],
[
66,
30
],
[
9,
31
],
[
77,... | [
"s = input()\nresult = ''\nfor i in range(0, len(s)):\n if(s[i] == '0'):\n \tresult = result + '0'\n elif(s[i] == '1'):\n result = result + '1'\n elif(s[i] == 'B'):\n if(len(result) > 0):\n \tresult = result[ 0 : len(result)-1 ]\nprint(result)",
"s = input()",
"s",
"input()",
"input",
"result... | s = input()
result = ''
for i in range(0, len(s)):
if(s[i] == '0'):
result = result + '0'
elif(s[i] == '1'):
result = result + '1'
elif(s[i] == 'B'):
if(len(result) > 0):
result = result[ 0 : len(result)-1 ]
print(result) |
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
2,
2,
13,
17,
2,
13,
17,
0,
13,
13,
14,
40,
13,
17,
0,
13,
18,
13,
39,
17,
4,
13,
13,
10,
4,
13,
10,
17,
13,
10,
18,
13,
10,
13,
13
] | [
[
36,
2
],
[
39,
6
],
[
10,
9
],
[
37,
9
],
[
9,
14
],
[
9,
17
],
[
45,
20
],
[
9,
21
],
[
40,
24
],
[
43,
24
],
[
46,
24
],
[
42,
27
],
[
40,
29
],
[
43,
... | [
"S = input()\nes =''\nfor s in S:\n if s == '1' or s == '0':\n es+=s\n else:\n if es != '':\n es=es[:-1]\nprint(es)",
"S = input()",
"S",
"input()",
"input",
"es =''",
"es",
"''",
"for s in S:\n if s == '1' or s == '0':\n es+=s\n else:\n if es != ''... | S = input()
es =''
for s in S:
if s == '1' or s == '0':
es+=s
else:
if es != '':
es=es[:-1]
print(es) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
39,
28,
13,
13,
14,
2,
13,
17,
4,
18,
13,
13,
17,
14,
2,
13,
17,
4,
18,
13,
13,
17,
14,
2,
2,
13,
17,
2,
4,
13,
13,
17,
4,
18,
13,
13,
17,
4,
13,
4,
18,
17,
13,
13,
10,
4,
13,... | [
[
54,
2
],
[
57,
8
],
[
12,
11
],
[
55,
11
],
[
11,
15
],
[
58,
19
],
[
11,
24
],
[
58,
28
],
[
11,
34
],
[
58,
39
],
[
58,
43
],
[
58,
52
],
[
54,
55
],
[
... | [
"s=list(input())\nans=[]\nfor i in s:\n if i==\"0\":\n ans.append(\"0\")\n if i==\"1\":\n ans.append(\"1\")\n if i==\"B\" and len(ans)>0:\n ans.pop(-1)\nprint(\"\".join(ans))",
"s=list(input())",
"s",
"list(input())",
"list",
"input()",
"input",
"ans=[]",
"ans",
"[]",... | s=list(input())
ans=[]
for i in s:
if i=="0":
ans.append("0")
if i=="1":
ans.append("1")
if i=="B" and len(ans)>0:
ans.pop(-1)
print("".join(ans)) |
[
7,
15,
13,
15,
13,
15,
13,
15,
13,
15,
13,
15,
13,
15,
13,
15,
0,
13,
12,
4,
18,
4,
18,
18,
13,
13,
13,
13,
0,
13,
12,
4,
18,
4,
18,
18,
13,
13,
13,
13,
0,
13,
12,
4,
13,
4,
18,
18,
13,
13,
13,
0,
13,
12,
4,
... | [
[
161,
17
],
[
143,
29
],
[
131,
41
],
[
140,
52
],
[
137,
67
],
[
146,
84
],
[
149,
89
],
[
158,
96
],
[
162,
98
],
[
152,
100
],
[
104,
103
],
[
159,
103
],
[
103,
... | [
"import sys\nimport math\nimport itertools\nimport collections\nimport heapq\nimport re\nimport numpy as np\nfrom functools import reduce\n\nrr = lambda: sys.stdin.readline().rstrip()\nrs = lambda: sys.stdin.readline().split()\nri = lambda: int(sys.stdin.readline())\nrm = lambda: map(int, sys.stdin.readline().split... | import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce
rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: ... |
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
2,
13,
17,
14,
40,
2,
13,
17,
0,
13,
18,
13,
39,
17,
0,
13,
13,
4,
13,
13,
10,
18,
13,
10,
4,
13,
10,
13,
13,
10,
17,
13
] | [
[
36,
2
],
[
42,
6
],
[
10,
9
],
[
37,
9
],
[
9,
13
],
[
43,
18
],
[
40,
18
],
[
34,
18
],
[
33,
21
],
[
43,
23
],
[
40,
23
],
[
34,
23
],
[
39,
27
],
[
9,
... | [
"s = input()\na = \"\"\nfor i in s:\n if i == \"B\":\n if not(a == \"\"):\n a = a[:-1]\n else:\n a += i\nprint(a)",
"s = input()",
"s",
"input()",
"input",
"a = \"\"",
"a",
"\"\"",
"for i in s:\n if i == \"B\":\n if not(a == \"\"):\n a = a[:-1]\n else:\n a += i",
"i",
"... | s = input()
a = ""
for i in s:
if i == "B":
if not(a == ""):
a = a[:-1]
else:
a += i
print(a) |
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
4,
13,
4,
13,
13,
14,
40,
18,
13,
13,
17,
0,
13,
18,
13,
13,
9,
14,
4,
13,
13,
0,
13,
18,
13,
39,
17,
4,
13,
13,
10,
18,
13,
10,
4,
13,
10,
18,
13,
10,
17,
13
] | [
[
44,
2
],
[
50,
6
],
[
10,
9
],
[
45,
14
],
[
45,
18
],
[
9,
19
],
[
47,
22
],
[
45,
24
],
[
9,
25
],
[
51,
30
],
[
42,
30
],
[
48,
30
],
[
41,
32
],
[
51,... | [
"s=input()\n\nout=''\nfor i in range(len(s)):\n if s[i] != 'B':\n out += s[i]\n continue\n else:\n if len(out):\n out = out[:-1]\n \nprint(out)",
"s=input()",
"s",
"input()",
"input",
"out=''",
"out",
"''",
"for i in range(len(s)):\n if s[i] != 'B':\n out += s[i]\n contin... | s=input()
out=''
for i in range(len(s)):
if s[i] != 'B':
out += s[i]
continue
else:
if len(out):
out = out[:-1]
print(out) |
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
2,
13,
17,
14,
40,
13,
17,
0,
13,
13,
4,
13,
13,
10,
17,
13,
10,
4,
13,
10,
13,
13
] | [
[
29,
2
],
[
26,
6
],
[
10,
9
],
[
30,
9
],
[
9,
13
],
[
27,
17
],
[
33,
17
],
[
32,
20
],
[
9,
21
],
[
33,
24
],
[
27,
24
],
[
26,
27
],
[
29,
30
],
[
9,
... | [
"s = input()\nans = \"\"\nfor i in s:\n if i == \"B\":\n if ans != \"\": ans = ans[:-1]\n else:\n ans += i\nprint(ans)",
"s = input()",
"s",
"input()",
"input",
"ans = \"\"",
"ans",
"\"\"",
"for i in s:\n if i == \"B\":\n if ans != \"\": ans = ans[:-1]\n else:\n ... | s = input()
ans = ""
for i in s:
if i == "B":
if ans != "": ans = ans[:-1]
else:
ans += i
print(ans) |
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
2,
2,
13,
17,
40,
4,
13,
13,
17,
0,
13,
18,
13,
39,
17,
2,
4,
13,
13,
17,
14,
40,
13,
17,
0,
13,
13,
4,
13,
13,
10,
13,
13,
10,
4,
13,
10,
17,
13,
10,
18,
13
] | [
[
46,
2
],
[
49,
6
],
[
10,
9
],
[
47,
9
],
[
9,
14
],
[
50,
19
],
[
44,
19
],
[
53,
19
],
[
52,
22
],
[
50,
24
],
[
44,
24
],
[
53,
24
],
[
50,
30
],
[
44,... | [
"s = input()\noutput_s = \"\"\n\nfor i in s:\n if i == \"B\" and len( output_s) != 0:\n output_s = output_s[0:len( output_s)-1]\n elif i != \"B\":\n output_s += i\n \nprint(output_s)",
"s = input()",
"s",
"input()",
"input",
"output_s = \"\"",
"output_s",
"\"\"",
"for i in s:\n if i == \"B... | s = input()
output_s = ""
for i in s:
if i == "B" and len( output_s) != 0:
output_s = output_s[0:len( output_s)-1]
elif i != "B":
output_s += i
print(output_s) |
[
7,
15,
13,
12,
13,
0,
13,
39,
28,
13,
13,
14,
2,
13,
17,
14,
13,
4,
18,
13,
13,
4,
18,
13,
13,
13,
29,
4,
18,
17,
13,
13,
23,
13,
12,
13,
12,
13,
28,
13,
18,
13,
13,
28,
13,
4,
18,
13,
13,
27,
13,
0,
13,
4,
1... | [
[
7,
6
],
[
10,
9
],
[
33,
9
],
[
9,
13
],
[
6,
19
],
[
6,
23
],
[
9,
25
],
[
6,
31
],
[
33,
33
],
[
40,
39
],
[
45,
44
],
[
39,
47
],
[
44,
50
],
[
53,
... | [
"#!/usr/bin/env python3\nimport sys\n\n\ndef solve(s: str):\n a = []\n for c in s:\n if c == \"B\":\n if a:\n a.pop()\n else:\n a.append(c)\n return \"\".join(a)\n\n\n# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools\ndef main():\n d... | #!/usr/bin/env python3
import sys
def solve(s: str):
a = []
for c in s:
if c == "B":
if a:
a.pop()
else:
a.append(c)
return "".join(a)
# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools
def main():
def iterate_tokens():
... |
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
2,
13,
17,
14,
2,
13,
17,
4,
13,
13,
10,
4,
13,
10,
17,
13
] | [
[
23,
2
],
[
26,
6
],
[
10,
9
],
[
24,
9
],
[
9,
13
],
[
9,
17
],
[
27,
21
],
[
23,
24
],
[
26,
27
]
] | [
"s = input()\nans = ''\nfor si in s:\n if si=='0': ans+='0'\n elif si=='1': ans+='1'\n else: ans=ans[:-1]\nprint(ans)",
"s = input()",
"s",
"input()",
"input",
"ans = ''",
"ans",
"''",
"for si in s:\n if si=='0': ans+='0'\n elif si=='1': ans+='1'\n else: ans=ans[:-1]",
"si",
"s",
"if si=... | s = input()
ans = ''
for si in s:
if si=='0': ans+='0'
elif si=='1': ans+='1'
else: ans=ans[:-1]
print(ans) |
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
2,
13,
17,
0,
13,
17,
14,
2,
13,
17,
0,
13,
17,
0,
13,
18,
13,
39,
17,
4,
13,
13,
10,
4,
13,
10,
17,
13,
10,
18,
13,
10,
17,
13,
10,
17,
13
] | [
[
35,
2
],
[
38,
6
],
[
10,
9
],
[
36,
9
],
[
9,
13
],
[
47,
16
],
[
9,
20
],
[
44,
23
],
[
41,
26
],
[
39,
28
],
[
42,
28
],
[
45,
28
],
[
48,
28
],
[
42,
... | [
"s = input()\nans = ''\n\nfor si in s:\n if si == '0':\n ans += '0'\n elif si == '1':\n ans += '1'\n else:\n ans = ans[:-1]\nprint(ans)",
"s = input()",
"s",
"input()",
"input",
"ans = ''",
"ans",
"''",
"for si in s:\n if si == '0':\n ans += '0'\n elif si =... | s = input()
ans = ''
for si in s:
if si == '0':
ans += '0'
elif si == '1':
ans += '1'
else:
ans = ans[:-1]
print(ans) |
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
40,
13,
17,
0,
13,
13,
14,
2,
13,
17,
9,
0,
13,
18,
13,
39,
17,
4,
13,
13,
10,
4,
13,
10,
18,
13,
10,
13,
13,
10,
17,
13
] | [
[
33,
2
],
[
42,
6
],
[
10,
9
],
[
34,
9
],
[
9,
13
],
[
39,
16
],
[
9,
17
],
[
43,
20
],
[
37,
20
],
[
40,
20
],
[
36,
24
],
[
43,
26
],
[
37,
26
],
[
40,
... | [
"s = input()\n\nout =''\nfor x in s:\n if x != 'B':\n out += x\n else:\n if out == '':\n continue\n else:\n out = out[:-1]\nprint(out)",
"s = input()",
"s",
"input()",
"input",
"out =''",
"out",
"''",
"for x in s:\n if x != 'B':\n out += x\n... | s = input()
out =''
for x in s:
if x != 'B':
out += x
else:
if out == '':
continue
else:
out = out[:-1]
print(out) |
[
7,
0,
13,
4,
13,
4,
13,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
40,
13,
17,
0,
13,
13,
0,
13,
18,
13,
39,
17,
4,
13,
13,
10,
4,
13,
10,
13,
13,
10,
17,
13,
10,
18,
13
] | [
[
33,
2
],
[
39,
11
],
[
15,
14
],
[
34,
14
],
[
14,
18
],
[
36,
21
],
[
14,
22
],
[
42,
24
],
[
40,
26
],
[
43,
26
],
[
37,
26
],
[
43,
31
],
[
37,
31
],
[
... | [
"s = list(map(str, input()))\nt = ''\nfor i in s:\n if i != 'B':\n t += i\n else:\n t = t[:-1]\nprint(t)",
"s = list(map(str, input()))",
"s",
"list(map(str, input()))",
"list",
"map(str, input())",
"map",
"str",
"input()",
"input",
"t = ''",
"t",
"''",
"for i in s:\n ... | s = list(map(str, input()))
t = ''
for i in s:
if i != 'B':
t += i
else:
t = t[:-1]
print(t)
|
[
7,
0,
13,
39,
0,
13,
4,
13,
4,
13,
28,
13,
13,
14,
2,
13,
17,
4,
18,
13,
13,
17,
14,
2,
13,
17,
4,
18,
13,
13,
17,
14,
2,
2,
13,
17,
13,
4,
18,
13,
13,
2,
4,
13,
13,
17,
4,
13,
4,
18,
17,
13,
13,
10,
39,
13... | [
[
54,
2
],
[
57,
5
],
[
12,
11
],
[
58,
11
],
[
11,
15
],
[
55,
19
],
[
11,
24
],
[
55,
28
],
[
11,
34
],
[
55,
36
],
[
55,
39
],
[
55,
44
],
[
55,
52
],
[
... | [
"strs = []\ns = list(input())\nfor num in s:\n if num == \"0\":\n strs.append(\"0\")\n elif num == \"1\":\n strs.append(\"1\")\n elif num == \"B\" and strs:\n strs.pop(len(strs)-1)\n\nprint(\"\".join(strs))",
"strs = []",
"strs",
"[]",
"s = list(input())",
"s",
"list(input(... | strs = []
s = list(input())
for num in s:
if num == "0":
strs.append("0")
elif num == "1":
strs.append("1")
elif num == "B" and strs:
strs.pop(len(strs)-1)
print("".join(strs)) |
[
7,
15,
13,
12,
13,
12,
13,
0,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
40,
13,
17,
0,
13,
13,
14,
40,
13,
17,
0,
13,
18,
13,
39,
17,
4,
13,
13,
14,
2,
13,
17,
4,
13,
10,
12,
13,
10,
12,
13
] | [
[
9,
8
],
[
48,
10
],
[
13,
12
],
[
16,
15
],
[
8,
15
],
[
15,
19
],
[
23,
22
],
[
15,
23
],
[
12,
26
],
[
29,
26
],
[
22,
26
],
[
30,
29
],
[
12,
31
],
[
2... | [
"import sys\ndef input(): return sys.stdin.readline().strip()\n\ndef main():\n s = input()\n ans = \"\"\n for c in s:\n if c != 'B':\n ans += c\n elif ans != \"\":\n ans = ans[:-1]\n print(ans)\n\nif __name__ == \"__main__\":\n main()",
"import sys",
"sys",
"... | import sys
def input(): return sys.stdin.readline().strip()
def main():
s = input()
ans = ""
for c in s:
if c != 'B':
ans += c
elif ans != "":
ans = ans[:-1]
print(ans)
if __name__ == "__main__":
main()
|
[
7,
0,
13,
4,
13,
0,
13,
18,
13,
39,
17,
0,
13,
17,
0,
13,
17,
28,
13,
4,
13,
4,
13,
13,
14,
2,
18,
13,
13,
17,
0,
13,
17,
14,
2,
13,
17,
0,
13,
18,
13,
13,
0,
13,
17,
4,
13,
18,
13,
39,
17,
10,
17,
13,
10,
... | [
[
67,
2
],
[
58,
6
],
[
68,
8
],
[
61,
12
],
[
64,
15
],
[
19,
18
],
[
59,
23
],
[
68,
23
],
[
59,
27
],
[
68,
27
],
[
18,
28
],
[
70,
31
],
[
65,
35
],
[
5... | [
"s = input()\ns = s[::-1]\nnews = \"\"\nc = 0\nfor i in range(len(s)):\n if s[i] == \"B\":\n c += 1\n elif c == 0:\n news += s[i]\n else:\n c -= 1\nprint(news[::-1])",
"s = input()",
"s",
"input()",
"input",
"s = s[::-1]",
"s",
"s[::-1]",
"s",
"::-1",
"-1",
"news ... | s = input()
s = s[::-1]
news = ""
c = 0
for i in range(len(s)):
if s[i] == "B":
c += 1
elif c == 0:
news += s[i]
else:
c -= 1
print(news[::-1]) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
39,
28,
13,
13,
14,
2,
13,
17,
4,
18,
13,
13,
17,
14,
2,
13,
17,
4,
18,
13,
13,
17,
14,
40,
4,
13,
13,
17,
24,
18,
13,
17,
0,
13,
4,
18,
17,
13,
13,
4,
13,
13,
10,
4,
13,
10,
... | [
[
52,
2
],
[
55,
8
],
[
12,
11
],
[
53,
11
],
[
11,
15
],
[
56,
19
],
[
11,
24
],
[
56,
28
],
[
56,
35
],
[
56,
39
],
[
58,
42
],
[
56,
47
],
[
59,
50
],
[
... | [
"S = list(input())\nans_list = []\nfor i in S:\n if i == \"0\":\n ans_list.append(\"0\")\n elif i == \"1\":\n ans_list.append(\"1\")\n else:\n if len(ans_list) != 0:\n del ans_list[-1]\nans = \"\".join(ans_list) \nprint(ans)",
"S = list(input())",
"S",
"list(input())",
"list",
"input()... | S = list(input())
ans_list = []
for i in S:
if i == "0":
ans_list.append("0")
elif i == "1":
ans_list.append("1")
else:
if len(ans_list) != 0:
del ans_list[-1]
ans = "".join(ans_list)
print(ans) |
[
7,
12,
13,
0,
13,
4,
13,
0,
13,
17,
28,
13,
4,
13,
4,
13,
13,
14,
2,
18,
13,
13,
17,
14,
40,
4,
13,
13,
17,
0,
13,
18,
13,
39,
17,
17,
0,
13,
18,
13,
13,
4,
13,
13,
4,
13,
10,
12,
13
] | [
[
5,
4
],
[
9,
8
],
[
12,
11
],
[
4,
16
],
[
4,
20
],
[
11,
21
],
[
8,
27
],
[
37,
27
],
[
30,
27
],
[
31,
30
],
[
8,
32
],
[
37,
32
],
[
30,
32
],
[
38,
... | [
"def resolve():\n s = input()\n display_str = \"\"\n for i in range(len(s)):\n if s[i] == \"B\":\n if len(display_str) != 0:\n display_str = display_str[0:-1]\n else:\n display_str += s[i]\n print(display_str)\n\nresolve()",
"def resolve():\n s = i... | def resolve():
s = input()
display_str = ""
for i in range(len(s)):
if s[i] == "B":
if len(display_str) != 0:
display_str = display_str[0:-1]
else:
display_str += s[i]
print(display_str)
resolve() |
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
2,
13,
17,
0,
13,
18,
13,
39,
17,
0,
13,
13,
4,
13,
13,
10,
17,
13,
10,
18,
13,
10,
13,
13,
10,
4,
13
] | [
[
37,
2
],
[
28,
6
],
[
10,
9
],
[
38,
9
],
[
9,
13
],
[
31,
16
],
[
29,
18
],
[
35,
18
],
[
32,
18
],
[
34,
22
],
[
9,
23
],
[
35,
26
],
[
32,
26
],
[
29,
... | [
"s = input()\nans = \"\"\nfor ss in s:\n if ss == \"B\":\n ans = ans[:-1]\n else:\n ans += ss\nprint(ans)",
"s = input()",
"s",
"input()",
"input",
"ans = \"\"",
"ans",
"\"\"",
"for ss in s:\n if ss == \"B\":\n ans = ans[:-1]\n else:\n ans += ss",
"ss",
"s... | s = input()
ans = ""
for ss in s:
if ss == "B":
ans = ans[:-1]
else:
ans += ss
print(ans) |
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
13,
14,
2,
2,
13,
17,
2,
13,
17,
0,
13,
13,
14,
2,
4,
13,
13,
17,
0,
13,
18,
13,
39,
17,
4,
13,
13,
10,
4,
13,
10,
18,
13,
10,
13,
13,
10,
17,
13
] | [
[
38,
2
],
[
47,
6
],
[
10,
9
],
[
39,
9
],
[
9,
14
],
[
9,
17
],
[
44,
20
],
[
9,
21
],
[
48,
26
],
[
42,
26
],
[
45,
26
],
[
41,
29
],
[
48,
31
],
[
42,
... | [
"S = input()\nans = ''\nfor s in S:\n if s == '0' or s == '1':\n ans += s\n else:\n if len(ans) > 0:\n ans = ans[:-1]\nprint(ans)",
"S = input()",
"S",
"input()",
"input",
"ans = ''",
"ans",
"''",
"for s in S:\n if s == '0' or s == '1':\n ans += s\n else:\... | S = input()
ans = ''
for s in S:
if s == '0' or s == '1':
ans += s
else:
if len(ans) > 0:
ans = ans[:-1]
print(ans) |
[
7,
0,
13,
4,
13,
0,
13,
17,
28,
13,
4,
13,
4,
13,
13,
14,
2,
18,
13,
13,
17,
14,
2,
4,
13,
13,
17,
9,
0,
13,
18,
13,
39,
17,
0,
13,
18,
13,
13,
4,
13,
13,
10,
18,
13,
10,
4,
13,
10,
18,
13,
10,
17,
13
] | [
[
46,
2
],
[
52,
6
],
[
10,
9
],
[
47,
14
],
[
47,
18
],
[
9,
19
],
[
53,
25
],
[
44,
25
],
[
50,
25
],
[
49,
29
],
[
53,
31
],
[
44,
31
],
[
50,
31
],
[
43... | [
"s=input()\n\nans=\"\"\nfor i in range(len(s)):\n if s[i]==\"B\":\n if len(ans)==0:\n continue\n ans=ans[:-1]\n else:\n ans+=s[i]\nprint(ans)",
"s=input()",
"s",
"input()",
"input",
"ans=\"\"",
"ans",
"\"\"",
"for i in range(len(s)):\n if s[i]==\"B\":\n ... | s=input()
ans=""
for i in range(len(s)):
if s[i]=="B":
if len(ans)==0:
continue
ans=ans[:-1]
else:
ans+=s[i]
print(ans)
|
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
39,
28,
13,
4,
13,
4,
13,
13,
14,
2,
18,
13,
13,
17,
14,
2,
4,
13,
13,
17,
4,
18,
13,
13,
4,
18,
13,
13,
18,
13,
13,
4,
13,
4,
18,
17,
13,
13,
10,
4,
13,
10,
39,
13
] | [
[
48,
2
],
[
51,
8
],
[
12,
11
],
[
49,
16
],
[
49,
20
],
[
11,
21
],
[
52,
27
],
[
52,
31
],
[
52,
35
],
[
49,
38
],
[
11,
39
],
[
52,
46
],
[
48,
49
],
[
... | [
"x = str(input())\nlst = []\n\nfor i in range(len(x)):\n if x[i] == 'B': \n if len(lst) >0:\n lst.pop()\n else:\n lst.append(x[i])\nprint(\"\".join(lst))",
"x = str(input())",
"x",
"str(input())",
"str",
"input()",
"input",
"lst = []",
"lst",
"[]",
"for i in range(len(x)):\n if x[... | x = str(input())
lst = []
for i in range(len(x)):
if x[i] == 'B':
if len(lst) >0:
lst.pop()
else:
lst.append(x[i])
print("".join(lst)) |
[
7,
0,
13,
4,
13,
0,
13,
39,
28,
13,
13,
14,
2,
2,
13,
17,
2,
13,
17,
4,
18,
13,
13,
13,
14,
40,
13,
39,
4,
18,
13,
13,
17,
4,
13,
4,
18,
17,
13,
13,
10,
4,
13,
10,
39,
13
] | [
[
41,
2
],
[
44,
6
],
[
10,
9
],
[
42,
9
],
[
9,
14
],
[
9,
17
],
[
45,
21
],
[
9,
23
],
[
45,
26
],
[
45,
30
],
[
45,
39
],
[
41,
42
],
[
44,
45
]
] | [
"s = input()\nans = []\nfor i in s:\n if i == \"0\" or i == \"1\":\n ans.append(i)\n elif ans != []:\n ans.pop(-1)\nprint(\"\".join(ans))",
"s = input()",
"s",
"input()",
"input",
"ans = []",
"ans",
"[]",
"for i in s:\n if i == \"0\" or i == \"1\":\n ans.append(i)\n ... | s = input()
ans = []
for i in s:
if i == "0" or i == "1":
ans.append(i)
elif ans != []:
ans.pop(-1)
print("".join(ans)) |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
39,
28,
13,
13,
14,
2,
13,
17,
4,
18,
13,
13,
17,
14,
2,
13,
17,
4,
18,
13,
13,
17,
14,
2,
13,
17,
14,
2,
4,
13,
13,
17,
4,
18,
13,
13,
0,
13,
4,
18,
17,
13,
13,
4,
13,
13,
10... | [
[
62,
2
],
[
59,
8
],
[
12,
11
],
[
63,
11
],
[
11,
15
],
[
60,
19
],
[
11,
24
],
[
60,
28
],
[
11,
33
],
[
60,
39
],
[
60,
43
],
[
56,
46
],
[
60,
51
],
[
... | [
"com = list(input())\nans = []\nfor c in com:\n if c == '0':\n ans.append(\"0\")\n elif c == '1':\n ans.append(\"1\")\n elif c == 'B':\n if len(ans) == 0:\n pass\n else:\n ans.pop()\na = \"\".join(ans)\nprint(a)",
"com = list(input())",
"com",
"list(i... | com = list(input())
ans = []
for c in com:
if c == '0':
ans.append("0")
elif c == '1':
ans.append("1")
elif c == 'B':
if len(ans) == 0:
pass
else:
ans.pop()
a = "".join(ans)
print(a) |
[
7,
0,
13,
4,
13,
0,
13,
39,
28,
13,
13,
14,
2,
2,
13,
17,
2,
13,
17,
4,
18,
13,
13,
13,
14,
2,
4,
13,
13,
17,
4,
18,
13,
13,
4,
13,
4,
18,
17,
13,
13,
10,
4,
13,
10,
39,
13
] | [
[
42,
2
],
[
45,
6
],
[
10,
9
],
[
43,
9
],
[
9,
14
],
[
9,
17
],
[
46,
21
],
[
9,
23
],
[
46,
28
],
[
46,
32
],
[
46,
40
],
[
42,
43
],
[
45,
46
]
] | [
"S = input()\nstack = []\nfor c in S:\n if c == '0' or c == '1':\n stack.append(c)\n elif len(stack) > 0:\n stack.pop()\nprint(\"\".join(stack))",
"S = input()",
"S",
"input()",
"input",
"stack = []",
"stack",
"[]",
"for c in S:\n if c == '0' or c == '1':\n stack.append... | S = input()
stack = []
for c in S:
if c == '0' or c == '1':
stack.append(c)
elif len(stack) > 0:
stack.pop()
print("".join(stack)) |
[
7,
0,
13,
4,
13,
0,
13,
4,
13,
13,
0,
13,
4,
13,
13,
0,
13,
39,
28,
13,
4,
13,
13,
14,
2,
2,
18,
13,
13,
17,
2,
18,
13,
13,
17,
4,
18,
13,
13,
18,
13,
13,
14,
40,
4,
13,
13,
17,
24,
18,
13,
17,
28,
13,
4,
1... | [
[
77,
2
],
[
68,
6
],
[
78,
9
],
[
74,
11
],
[
69,
14
],
[
71,
16
],
[
20,
19
],
[
75,
22
],
[
69,
27
],
[
19,
28
],
[
69,
32
],
[
19,
33
],
[
72,
37
],
[
6... | [
"str_line = input()\nstr_line2 = list(str_line)\n#print(str_line2)\nlength = len(str_line2)\nline = []\n\nfor i in range(length):\n if (str_line2[i] == \"1\")or(str_line2[i] == \"0\"):\n line.append(str_line2[i])\n #print(line)\n \n else:\n if len(line) != 0:\n del line[... | str_line = input()
str_line2 = list(str_line)
#print(str_line2)
length = len(str_line2)
line = []
for i in range(length):
if (str_line2[i] == "1")or(str_line2[i] == "0"):
line.append(str_line2[i])
#print(line)
else:
if len(line) != 0:
del line[-1]
#print... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.