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, 17, 28, 13, 13, 0, 13, 2, 13, 13, 14, 2, 2, 13, 17, 2, 13, 17, 0, 13, 17, 14, 2, 13, 17, 0, 13, 18, 13, 39, 2, 4, 13, 13, 17, 4, 13, 13, 10, 17, 13, 10, 18, 13, 10, 4, 13, 10, 17, 13...
[ [ 51, 2 ], [ 45, 6 ], [ 10, 9 ], [ 52, 9 ], [ 57, 12 ], [ 46, 14 ], [ 49, 14 ], [ 55, 14 ], [ 58, 14 ], [ 9, 15 ], [ 9, 19 ], [ 58, 22 ], [ 46, 22 ], [ 49, ...
[ "# Sの入力受付\nS = input()\n# Sを順に読み込みBがあったとき直前の文字と一緒に消去\nSTR = \"\"\nfor i in S:\n STR = STR + i\n if i == \"B\" and STR == \"\":\n STR = \"\"\n elif i == \"B\":\n STR = STR[:len(STR) - 2]\nprint(STR)", "S = input()", "S", "input()", "input", "STR = \"\"", "STR", "\"\"", "for i i...
# Sの入力受付 S = input() # Sを順に読み込みBがあったとき直前の文字と一緒に消去 STR = "" for i in S: STR = STR + i if i == "B" and STR == "": STR = "" elif i == "B": STR = STR[:len(STR) - 2] print(STR)
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 28, 13, 13, 14, 2, 13, 17, 14, 13, 4, 18, 13, 13, 9, 4, 18, 13, 13, 13, 4, 13, 4, 18, 17, 13, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 36, 2 ], [ 39, 6 ], [ 11, 10 ], [ 37, 10 ], [ 10, 14 ], [ 40, 20 ], [ 40, 25 ], [ 10, 27 ], [ 40, 34 ], [ 36, 37 ], [ 39, 40 ] ]
[ "str = input()\nans = list()\nfor s in str:\n if s == 'B':\n if ans:\n ans.pop()\n continue\n else:\n ans.append(s)\nprint(\"\".join(ans))", "str = input()", "str", "input()", "input", "ans = list()", "ans", "list()", "list", "for s in str:\n if s == 'B':\n...
str = input() ans = list() for s in str: if s == 'B': if ans: ans.pop() continue else: ans.append(s) print("".join(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, 14, 40, 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 ]
[ [ 45, 2 ], [ 51, 6 ], [ 10, 9 ], [ 46, 9 ], [ 9, 13 ], [ 42, 16 ], [ 9, 20 ], [ 48, 23 ], [ 52, 27 ], [ 40, 27 ], [ 49, 27 ], [ 43, 27 ], [ 39, 30 ], [ 52, ...
[ "s = input()\na = \"\"\nfor i in s:\n if i == \"0\":\n a+=\"0\"\n elif i == \"1\":\n a+=\"1\"\n else:\n if a!=\"\":\n a=a[:-1]\n \nprint(a)", "s = input()", "s", "input()", "input", "a = \"\"", "a", "\"\"", "for i in s:\n if i == \"0\":\n a+=...
s = input() a = "" for i in s: if i == "0": a+="0" elif i == "1": a+="1" else: if a!="": a=a[:-1] print(a)
[ 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, 17, 13, 10, 18, 13, 10, 4, 13, 10, 13, 13 ]
[ [ 36, 2 ], [ 30, 6 ], [ 10, 9 ], [ 37, 9 ], [ 9, 13 ], [ 33, 18 ], [ 31, 20 ], [ 40, 20 ], [ 34, 20 ], [ 39, 24 ], [ 9, 25 ], [ 40, 28 ], [ 34, 28 ], [ 31, ...
[ "S=input()\n\nT=\"\"\nfor s in S:\n if s==\"B\":\n if T:\n T=T[:-1]\n else:\n T+=s\nprint(T)", "S=input()", "S", "input()", "input", "T=\"\"", "T", "\"\"", "for s in S:\n if s==\"B\":\n if T:\n T=T[:-1]\n else:\n T+=s", "s", "S", "i...
S=input() T="" for s in S: if s=="B": if T: T=T[:-1] else: T+=s print(T)
[ 7, 15, 13, 12, 13, 17, 41, 28, 13, 4, 13, 4, 13, 0, 13, 4, 18, 13, 13, 13, 0, 13, 4, 18, 13, 13, 42, 13, 38, 5, 0, 13, 4, 18, 13, 13, 14, 2, 13, 17, 4, 18, 13, 13, 4, 18, 13, 13, 13, 4, 13, 4, 18, 17, 13, 4...
[ [ 9, 8 ], [ 8, 12 ], [ 15, 14 ], [ 22, 21 ], [ 32, 31 ], [ 14, 34 ], [ 31, 38 ], [ 21, 42 ], [ 21, 46 ], [ 31, 48 ], [ 21, 57 ], [ 66, 63 ] ]
[ "import collections\n\ndef resolve():\n '''\n code here\n '''\n s = collections.deque([item for item in input()])\n que = collections.deque()\n\n while s:\n try:\n temp = s.popleft()\n if temp == 'B':\n que.pop()\n else:\n que.a...
import collections def resolve(): ''' code here ''' s = collections.deque([item for item in input()]) que = collections.deque() while s: try: temp = s.popleft() if temp == 'B': que.pop() else: que.append(temp) ...
[ 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, 2, 13, 13, 4, 13, 13, 10, 2, 13, 10, 4, 13, 10, 17, 13, 10, 18, 13 ]
[ [ 38, 2 ], [ 41, 6 ], [ 10, 9 ], [ 39, 9 ], [ 9, 13 ], [ 42, 18 ], [ 36, 18 ], [ 45, 18 ], [ 44, 21 ], [ 42, 23 ], [ 36, 23 ], [ 45, 23 ], [ 35, 27 ], [ 42,...
[ "s = input()\nans = \"\"\n\nfor i in s:\n if i == \"B\":\n if not ans == \"\":\n ans = ans[:-1]\n else:\n ans = ans + i\n\nprint(ans)", "s = input()", "s", "input()", "input", "ans = \"\"", "ans", "\"\"", "for i in s:\n if i == \"B\":\n if not ans == \"\":\n ...
s = input() ans = "" for i in s: if i == "B": if not ans == "": ans = ans[:-1] else: ans = ans + i print(ans)
[ 7, 0, 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, 4, 13, 4, 18, 17, 13, 4, 13, 13, 13, 10, 39, 13, ...
[ [ 56, 2 ], [ 53, 6 ], [ 10, 9 ], [ 57, 14 ], [ 57, 18 ], [ 9, 19 ], [ 54, 25 ], [ 54, 29 ], [ 54, 33 ], [ 54, 37 ], [ 57, 40 ], [ 9, 41 ], [ 54, 51 ], [ 53,...
[ "S=input()\nans = []\nfor i in range(len(S)):\n if S[i] == \"B\":\n if len(ans) != 0:\n del ans[len(ans)-1]\n else:\n ans.append(S[i])\nprint(\"\".join(map(str,ans)))", "S=input()", "S", "input()", "input", "ans = []", "ans", "[]", "for i in range(len(S)):\n if S[i] == \"B\":\n if l...
S=input() ans = [] for i in range(len(S)): if S[i] == "B": if len(ans) != 0: del ans[len(ans)-1] else: ans.append(S[i]) print("".join(map(str,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, 4, 13, 13, 17, 9, 24, 18, 13, 17, 28, 13, 13, 4, 13, 13, 0, 13, 17, 10, 4, 13, 10, 3...
[ [ 52, 2 ], [ 55, 8 ], [ 12, 11 ], [ 53, 11 ], [ 11, 15 ], [ 56, 19 ], [ 11, 24 ], [ 56, 28 ], [ 56, 35 ], [ 56, 40 ], [ 44, 43 ], [ 56, 43 ], [ 43, 47 ], [ ...
[ "s = list(input())\nans = []\nfor i in s:\n if i == \"1\":\n ans.append(1)\n elif i == \"0\":\n ans.append(0)\n else:\n if len(ans) == 0:\n continue\n else:\n del ans[-1]\nfor i in ans:\n print(i,end = \"\")", "s = list(input())", "s", "list(input(...
s = list(input()) ans = [] for i in s: if i == "1": ans.append(1) elif i == "0": ans.append(0) else: if len(ans) == 0: continue else: del ans[-1] for i in ans: print(i,end = "")
[ 7, 0, 13, 4, 13, 0, 13, 39, 28, 13, 4, 13, 4, 13, 13, 14, 2, 2, 18, 13, 13, 17, 2, 18, 13, 13, 17, 4, 18, 13, 13, 18, 13, 13, 0, 13, 18, 13, 39, 17, 4, 13, 4, 18, 17, 13, 13, 10, 4, 13, 10, 39, 13, 10, 18, ...
[ [ 48, 2 ], [ 51, 6 ], [ 10, 9 ], [ 49, 14 ], [ 49, 19 ], [ 9, 20 ], [ 49, 24 ], [ 9, 25 ], [ 52, 29 ], [ 55, 29 ], [ 49, 32 ], [ 9, 33 ], [ 54, 35 ], [ 52, ...
[ "s = input()\nans = []\n\nfor i in range(len(s)):\n if s[i] == '0' or s[i]=='1':\n ans.append(s[i])\n else:\n ans = ans[:-1]\nprint(''.join(ans))\n", "s = input()", "s", "input()", "input", "ans = []", "ans", "[]", "for i in range(len(s)):\n if s[i] == '0' or s[i]=='1':\n ...
s = input() ans = [] for i in range(len(s)): if s[i] == '0' or s[i]=='1': ans.append(s[i]) else: ans = ans[:-1] print(''.join(ans))
[ 7, 0, 13, 4, 13, 0, 13, 39, 28, 13, 13, 14, 2, 2, 13, 17, 2, 13, 17, 4, 18, 13, 13, 13, 0, 13, 18, 13, 39, 2, 4, 13, 13, 17, 4, 13, 31, 13, 0, 13, 17, 10, 18, 13, 10, 39, 13, 10, 4, 13 ]
[ [ 48, 2 ], [ 45, 6 ], [ 10, 9 ], [ 49, 9 ], [ 9, 14 ], [ 9, 17 ], [ 46, 21 ], [ 43, 21 ], [ 9, 23 ], [ 42, 25 ], [ 46, 27 ], [ 43, 27 ], [ 46, 32 ], [ 43, ...
[ "S = input()\nA = []\n\nfor s in S:\n if s==\"0\" or s==\"1\":\n A.append(s)\n else:\n A = A[:len(A)-1]\n \nprint(*A,sep=\"\")", "S = input()", "S", "input()", "input", "A = []", "A", "[]", "for s in S:\n if s==\"0\" or s==\"1\":\n A.append(s)\n else:\n A = A[:len(A)-1]\n ", ...
S = input() A = [] for s in S: if s=="0" or s=="1": A.append(s) else: A = A[:len(A)-1] print(*A,sep="")
[ 7, 12, 13, 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, 18, 13, 13, 17, 14, 2, 13, 39, 9, 4, 18, 13, 13, 17, ...
[ [ 5, 4 ], [ 9, 8 ], [ 12, 11 ], [ 4, 16 ], [ 4, 20 ], [ 11, 21 ], [ 8, 25 ], [ 4, 31 ], [ 11, 32 ], [ 8, 36 ], [ 4, 42 ], [ 11, 43 ], [ 8, 47 ], [ 8, 52...
[ "def main():\n s=input()\n a=[]\n for i in range(len(s)):\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)\n print(''.join(a))\n \n \nif __name__=='__main__':\n main()", "def main():...
def main(): s=input() a=[] for i in range(len(s)): 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) print(''.join(a)) if __name__=='__main__': main()
[ 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, 40, 13, 9, 4, 18, 13, 13, 4, 13, 4, 18, 17, 13, 13, 10, 39, 13, 10, 4, 13 ]
[ [ 47, 2 ], [ 44, 6 ], [ 10, 9 ], [ 48, 9 ], [ 9, 14 ], [ 9, 17 ], [ 45, 21 ], [ 9, 23 ], [ 9, 26 ], [ 45, 30 ], [ 45, 34 ], [ 45, 42 ], [ 44, 45 ], [ 47, ...
[ "S = input()\n\nstack = []\nfor s in S:\n if s == '0' or s == '1':\n stack.append(s)\n if s == 'B':\n if not stack:\n continue\n else:\n stack.pop()\n\nprint(''.join(stack))", "S = input()", "S", "input()", "input", "stack = []", "stack", "[]", "for s...
S = input() stack = [] for s in S: if s == '0' or s == '1': stack.append(s) if s == 'B': if not stack: continue else: stack.pop() print(''.join(stack))
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 39, 28, 13, 13, 14, 40, 13, 17, 4, 18, 13, 13, 13, 14, 40, 13, 39, 4, 18, 13, 13, 4, 13, 4, 18, 17, 13, 13, 10, 4, 13, 10, 4, 13, 10, 39, 13 ]
[ [ 41, 2 ], [ 44, 6 ], [ 42, 9 ], [ 47, 11 ], [ 15, 14 ], [ 42, 14 ], [ 14, 18 ], [ 48, 22 ], [ 14, 24 ], [ 48, 27 ], [ 48, 31 ], [ 48, 39 ], [ 41, 42 ], [ 4...
[ "s = input()\nn = len(s)\n\nans = []\n\nfor i in s:\n if i != \"B\":\n ans.append(i)\n else:\n if ans != []:\n ans.pop()\nprint(\"\".join(ans))", "s = input()", "s", "input()", "input", "n = len(s)", "n", "len(s)", "len", "s", "ans = []", "ans", "[]", "for i ...
s = input() n = len(s) ans = [] for i in s: if i != "B": ans.append(i) 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, 17, 14, 2, 13, 17, 0, 13, 17, 14, 2, 13, 17, 0, 13, 18, 13, 39, 17, 4, 13, 13, 10, 17, 13, 10, 18, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 45, 2 ], [ 51, 6 ], [ 10, 9 ], [ 46, 9 ], [ 9, 13 ], [ 48, 16 ], [ 9, 20 ], [ 39, 23 ], [ 9, 27 ], [ 42, 30 ], [ 40, 32 ], [ 49, 32 ], [ 52, 32 ], [ 43, ...
[ "s = input()\nans = ''\n\nfor char in s:\n if char == '0':\n ans += '0'\n if char == '1':\n ans += '1'\n if char == 'B':\n ans = ans[:-1]\nprint(ans)", "s = input()", "s", "input()", "input", "ans = ''", "ans", "''", "for char in s:\n if char == '0':\n ans += ...
s = input() ans = '' for char in s: if char == '0': ans += '0' if char == '1': ans += '1' if char == 'B': ans = ans[:-1] print(ans)
[ 7, 41, 28, 13, 4, 13, 4, 13, 0, 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, 38, 5, 9, 4, 18, 13, 13, 4, 13, 4, 18, 17, 13, 13, 10, 13, 13, 10, 39, 13 ]
[ [ 4, 3 ], [ 3, 7 ], [ 49, 9 ], [ 52, 12 ], [ 16, 15 ], [ 50, 20 ], [ 50, 24 ], [ 15, 25 ], [ 53, 29 ], [ 50, 32 ], [ 15, 33 ], [ 53, 39 ], [ 53, 47 ], [ 49,...
[ "S=[x for x in input()]\nans=[]\nfor i in range(len(S)):\n if S[i]!='B':\n ans.append(S[i])\n else:\n try:\n ans.pop()\n except:\n continue\nprint(''.join(ans))", "x for x in input()", "for x in input()", "x", "input()", "input", "for x in input()", "x", "S=[x for x in input()]"...
S=[x for x in input()] ans=[] for i in range(len(S)): if S[i]!='B': ans.append(S[i]) else: try: ans.pop() except: continue print(''.join(ans))
[ 7, 0, 13, 4, 13, 0, 13, 39, 28, 13, 13, 14, 2, 13, 17, 14, 2, 13, 39, 9, 24, 18, 13, 17, 0, 13, 13, 4, 13, 4, 18, 17, 13, 13, 10, 39, 13, 10, 13, 13, 10, 4, 13 ]
[ [ 41, 2 ], [ 35, 6 ], [ 10, 9 ], [ 42, 9 ], [ 9, 13 ], [ 36, 17 ], [ 39, 17 ], [ 36, 22 ], [ 39, 22 ], [ 38, 25 ], [ 9, 26 ], [ 39, 33 ], [ 36, 33 ], [ 35, ...
[ "s = input()\nans =[]\nfor i in s:\n if i == \"B\":\n if ans ==[]:\n continue\n else:\n del ans[-1]\n else:\n ans += i\nprint(\"\".join(ans))", "s = input()", "s", "input()", "input", "ans =[]", "ans", "[]", "for i in s:\n if i == \"B\":\n if ans ==[]:\n continue\n e...
s = input() ans =[] for i in s: if i == "B": if ans ==[]: continue else: del ans[-1] else: ans += i print("".join(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, 40, 13, 39, 4, 18, 13, 13, 17, 0, 13, 4, 13, 13, 28, ...
[ [ 83, 2 ], [ 86, 6 ], [ 84, 9 ], [ 77, 11 ], [ 15, 14 ], [ 87, 17 ], [ 84, 21 ], [ 14, 22 ], [ 78, 26 ], [ 84, 32 ], [ 14, 33 ], [ 78, 37 ], [ 78, 42 ], [ 7...
[ "s = input()\nl = len(s)\nans = []\nfor i in range(l):\n\tif s[i]=='0':\n\t\tans.append('0')\n\telif s[i]=='1':\n\t\tans.append('1')\n\telse:\n\t\tif ans!=[]:\n\t\t\tans.pop(-1)\n\nn = len(ans)\nfor i in range(n-1):\n\tprint(ans[i], end=\"\")\nprint(ans[n-1])", "s = input()", "s", "input()", "input", "l =...
s = input() l = len(s) ans = [] for i in range(l): if s[i]=='0': ans.append('0') elif s[i]=='1': ans.append('1') else: if ans!=[]: ans.pop(-1) n = len(ans) for i in range(n-1): print(ans[i], end="") print(ans[n-1])
[ 7, 0, 13, 4, 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, 0, 13, 18, 13, 39, 17, 4, 13, 13, 10, 18, 13, 10, 4, 13, 10, 2, 13, 10,...
[ [ 50, 2 ], [ 56, 10 ], [ 14, 13 ], [ 51, 13 ], [ 13, 17 ], [ 59, 20 ], [ 57, 22 ], [ 48, 22 ], [ 54, 22 ], [ 60, 22 ], [ 13, 26 ], [ 53, 29 ], [ 57, 31 ], [ ...
[ "s = list(str(input()))\nanswer = \"\"\n\nfor i in s:\n if i == \"0\":\n answer = answer + \"0\"\n\n elif i == \"1\":\n answer = answer + \"1\"\n\n elif i == \"B\":\n answer = answer[:-1]\n\nprint(answer)", "s = list(str(input()))", "s", "list(str(input()))", "list", "str(inp...
s = list(str(input())) answer = "" for i in s: if i == "0": answer = answer + "0" elif i == "1": answer = answer + "1" elif i == "B": answer = answer[:-1] print(answer)
[ 7, 0, 13, 4, 13, 0, 13, 39, 28, 13, 13, 14, 2, 13, 17, 4, 18, 13, 13, 13, 14, 13, 4, 18, 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, 17 ], [ 9, 19 ], [ 38, 24 ], [ 38, 32 ], [ 34, 35 ], [ 37, 38 ] ]
[ "s=input()\nstk=[]\nfor c in s:\n if c in '01':\n stk.append(c)\n elif stk:\n stk.pop()\n \nprint(''.join(stk))", "s=input()", "s", "input()", "input", "stk=[]", "stk", "[]", "for c in s:\n if c in '01':\n stk.append(c)\n elif stk:\n stk.pop()\n ", "c", "s...
s=input() stk=[] for c in s: if c in '01': stk.append(c) elif stk: stk.pop() print(''.join(stk))
[ 7, 0, 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 ]
[ [ 28, 2 ], [ 34, 6 ], [ 10, 9 ], [ 29, 9 ], [ 9, 13 ], [ 31, 16 ], [ 9, 17 ], [ 37, 19 ], [ 35, 21 ], [ 38, 21 ], [ 32, 21 ], [ 38, 26 ], [ 32, 26 ], [ 35, ...
[ "i = input()\nans = \"\"\nfor s in i:\n if s != \"B\":\n ans += s\n else:\n ans = ans[:-1]\n \nprint(ans)", "i = input()", "i", "input()", "input", "ans = \"\"", "ans", "\"\"", "for s in i:\n if s != \"B\":\n ans += s\n else:\n ans = ans[:-1]\n ", "s", "i", "if s != \"B\":\n ...
i = input() ans = "" for s in i: if s != "B": ans += s else: ans = ans[:-1] print(ans)
[ 7, 15, 0, 13, 4, 13, 0, 13, 39, 0, 13, 4, 13, 13, 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, 4, 13, 4, 18, 17, 13, 13, 10, 4, 13, 1...
[ [ 53, 3 ], [ 56, 7 ], [ 59, 10 ], [ 57, 13 ], [ 16, 15 ], [ 54, 15 ], [ 15, 19 ], [ 60, 23 ], [ 57, 23 ], [ 15, 28 ], [ 60, 32 ], [ 57, 32 ], [ 60, 39 ], [ ...
[ "from collections import deque\nS=input()\nans=[]\nans=deque(ans)\nfor letter in S:\n if letter=='0':\n ans.append('0')\n elif letter=='1':\n ans.append('1')\n else:\n if len(ans)!=0:\n ans.pop()\n\nprint(''.join(ans))", "from collections import deque", "S=input()", "S...
from collections import deque S=input() ans=[] ans=deque(ans) for letter in S: if letter=='0': ans.append('0') elif letter=='1': ans.append('1') else: if len(ans)!=0: ans.pop() print(''.join(ans))
[ 7, 15, 0, 13, 4, 13, 0, 13, 4, 13, 39, 28, 13, 13, 14, 2, 2, 13, 17, 40, 4, 13, 13, 17, 4, 18, 13, 13, 14, 2, 2, 13, 17, 2, 13, 17, 4, 18, 13, 13, 13, 4, 13, 4, 18, 17, 13, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 52, 3 ], [ 49, 7 ], [ 13, 12 ], [ 53, 12 ], [ 12, 17 ], [ 50, 22 ], [ 50, 26 ], [ 12, 31 ], [ 12, 34 ], [ 50, 38 ], [ 12, 40 ], [ 50, 47 ], [ 49, 50 ], [ ...
[ "#33 B - バイナリハックイージー\nfrom collections import deque\nS = input()\n\nans = deque([])\nfor s in S:\n if s == 'B' and len(ans) >= 1:\n ans.pop()\n elif s == '0' or s == '1':\n ans.append(s)\nprint(''.join(ans)) ", "from collections import deque", "S = input()", "S", "input()", "input", ...
#33 B - バイナリハックイージー from collections import deque S = input() ans = deque([]) for s in S: if s == 'B' and len(ans) >= 1: ans.pop() elif s == '0' or s == '1': ans.append(s) 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, 17, 14, 2, 18, 13, 13, 17, 0, 13, 17, 14, 2, 13, 17, 9, 0, 13, 18, 13, 39, 17, 4, 13, 13, 10, 17, 13, 10, 18, 13, 10, 4, 1...
[ [ 54, 2 ], [ 48, 6 ], [ 10, 9 ], [ 55, 14 ], [ 55, 18 ], [ 9, 19 ], [ 60, 22 ], [ 55, 27 ], [ 9, 28 ], [ 57, 31 ], [ 49, 35 ], [ 52, 35 ], [ 58, 35 ], [ 61,...
[ "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 ans == '':\n continue\n else:\n ans = ans[:-1]\nprint(ans)", "s = input()", "s", "input()", "input", "ans = ''", "ans", ...
s = input() ans = '' for i in range(len(s)): if s[i] == '0': ans += '0' elif s[i] == '1': ans += '1' else: if ans == '': continue else: ans = ans[:-1] print(ans)
[ 7, 0, 13, 4, 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, 4, 13, 13, 17, 0, 13, 18, 13, 39, 17, 28, 13, 4, 13, 4, 13, 13, 4, 13, 18, 13, 13, 0, 13, 17, ...
[ [ 62, 2 ], [ 59, 6 ], [ 10, 9 ], [ 63, 14 ], [ 63, 18 ], [ 9, 19 ], [ 60, 23 ], [ 57, 23 ], [ 63, 26 ], [ 9, 27 ], [ 60, 32 ], [ 57, 32 ], [ 56, 35 ], [ 60,...
[ "#k = int(input())\n#s = input()\n#a, b = map(int, input().split())\n#s, t = map(str, input().split())\n#l = list(map(int, input().split()))\n#l = [list(map(int,input().split())) for i in range(n)]\n\n\ns = input()\n\nans = []\n\nfor i in range(len(s)):\n if s[i] != \"B\":\n ans.append(s[i])\n else:\n ...
#k = int(input()) #s = input() #a, b = map(int, input().split()) #s, t = map(str, input().split()) #l = list(map(int, input().split())) #l = [list(map(int,input().split())) for i in range(n)] s = input() ans = [] for i in range(len(s)): if s[i] != "B": ans.append(s[i]) else: if (len(ans) > 0...
[ 7, 15, 15, 15, 13, 15, 13, 12, 13, 29, 4, 13, 4, 13, 12, 13, 29, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 12, 13, 29, 4, 13, 12, 13, 29, 4, 18, 4, 13, 13, 0, 13, 4, 13, 28, 13, 4, 13, 14, 2, 13, 17, 4, 18, 13, 1...
[ [ 92, 41 ], [ 46, 45 ], [ 45, 50 ], [ 93, 54 ], [ 45, 59 ], [ 93, 63 ], [ 93, 70 ], [ 93, 78 ], [ 82, 81 ], [ 92, 93 ] ]
[ "from collections import defaultdict\nfrom collections import deque\nimport itertools\nimport math\n\ndef readInt():\n return int(input())\ndef readInts():\n return list(map(int, input().split()))\ndef readChar():\n return input()\ndef readChars():\n return input().split()\n\nd = deque()\n\nfor i in input():\n ...
from collections import defaultdict from collections import deque import itertools import math def readInt(): return int(input()) def readInts(): return list(map(int, input().split())) def readChar(): return input() def readChars(): return input().split() d = deque() for i in input(): if i=="0": d.appe...
[ 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, 4, 18, 13, 13, 4, 13, 31, 13, 0, 13, 17, 10, 39, 13, 10, 4, 13 ]
[ [ 50, 2 ], [ 47, 6 ], [ 10, 9 ], [ 51, 9 ], [ 9, 13 ], [ 48, 17 ], [ 9, 22 ], [ 48, 26 ], [ 48, 33 ], [ 48, 37 ], [ 48, 42 ], [ 45, 44 ], [ 47, 48 ], [ 50, ...
[ "s = input()\nt = []\n\nfor x in s:\n if x == \"0\":\n t.append(\"0\")\n elif x == \"1\":\n t.append(\"1\")\n else:\n if len(t) > 0:\n t.pop()\nprint(*t,sep='')", "s = input()", "s", "input()", "input", "t = []", "t", "[]", "for x in s:\n if x == \"0\":\n ...
s = input() t = [] for x in s: if x == "0": t.append("0") elif x == "1": t.append("1") else: if len(t) > 0: t.pop() print(*t,sep='')
[ 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, 13, 13, 10, 18, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 41, 2 ], [ 38, 6 ], [ 10, 9 ], [ 42, 9 ], [ 9, 14 ], [ 9, 17 ], [ 32, 20 ], [ 9, 21 ], [ 35, 23 ], [ 39, 25 ], [ 36, 25 ], [ 33, 25 ], [ 36, 30 ], [ 33, ...
[ "s = input()\nnew_s = \"\"\n\nfor i in s:\n if i == \"0\" or i == \"1\":\n new_s += i\n else:\n new_s = new_s[:-1]\nprint(new_s)", "s = input()", "s", "input()", "input", "new_s = \"\"", "new_s", "\"\"", "for i in s:\n if i == \"0\" or i == \"1\":\n new_s += i\n else...
s = input() new_s = "" for i in s: if i == "0" or i == "1": new_s += i else: new_s = new_s[:-1] print(new_s)
[ 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, 14, 40, 13, 39, 4, 18, 13, 13, 17, 4, 18, 13, 13, 18, 13, 13, 0, 13, 17, 28, 13, 13, 0, 13, 2, 13, 13, 4, 13, 1...
[ [ 57, 2 ], [ 63, 8 ], [ 58, 11 ], [ 66, 13 ], [ 17, 16 ], [ 64, 19 ], [ 58, 23 ], [ 16, 24 ], [ 67, 28 ], [ 67, 32 ], [ 67, 37 ], [ 58, 40 ], [ 16, 41 ], [ ...
[ "s = list(input())\nw_len = len(s)\nword = []\nfor x in range(w_len):\n if s[x] == 'B':\n if word != []:\n word.pop(-1)\n else:\n word.append(s[x])\nresult = ''\nfor y in word:\n result = result+y\nprint(result)", "s = list(input())", "s", "list(input())", "list", "input()", "input", "w_...
s = list(input()) w_len = len(s) word = [] for x in range(w_len): if s[x] == 'B': if word != []: word.pop(-1) else: word.append(s[x]) result = '' for y in word: result = result+y print(result)
[ 7, 15, 0, 13, 4, 13, 0, 13, 4, 13, 28, 13, 13, 14, 2, 2, 13, 17, 40, 4, 13, 13, 17, 4, 18, 13, 13, 14, 2, 2, 13, 17, 2, 13, 17, 4, 18, 13, 13, 13, 4, 13, 4, 18, 17, 13, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 51, 3 ], [ 48, 7 ], [ 12, 11 ], [ 52, 11 ], [ 11, 16 ], [ 49, 21 ], [ 49, 25 ], [ 11, 30 ], [ 11, 33 ], [ 49, 37 ], [ 11, 39 ], [ 49, 46 ], [ 48, 49 ], [ ...
[ "from collections import deque\n\nS=input()\nt = deque()\n\nfor s in S:\n if s == 'B' and len(t) !=0:\n t.pop()\n elif s == '1' or s == '0':\n t.append(s)\nprint(''.join(t))", "from collections import deque", "S=input()", "S", "input()", "input", "t = deque()", "t", "deque()", ...
from collections import deque S=input() t = deque() for s in S: if s == 'B' and len(t) !=0: t.pop() elif s == '1' or s == '0': t.append(s) print(''.join(t))
[ 7, 0, 13, 4, 13, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 14, 40, 4, 13, 13, 17, 0, 13, 18, 13, 39, 17, 0, 13, 13, 4, 13, 13, 10, 13, 13, 10, 18, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 40, 2 ], [ 43, 6 ], [ 10, 9 ], [ 41, 9 ], [ 9, 13 ], [ 44, 19 ], [ 35, 19 ], [ 38, 19 ], [ 37, 22 ], [ 44, 24 ], [ 35, 24 ], [ 38, 24 ], [ 34, 28 ], [ 9, ...
[ "S = input()\nans = ''\nfor s in S:\n\tif s == 'B':\n\t\tif len(ans) != 0:\n\t\t\tans = ans[:-1]\n\telse:\n\t\tans += s\nprint(ans)", "S = input()", "S", "input()", "input", "ans = ''", "ans", "''", "for s in S:\n\tif s == 'B':\n\t\tif len(ans) != 0:\n\t\t\tans = ans[:-1]\n\telse:\n\t\tans += s", ...
S = input() ans = '' for s in S: if s == 'B': if len(ans) != 0: ans = ans[:-1] else: ans += s print(ans)
[ 7, 15, 13, 13, 13, 13, 13, 13, 15, 13, 12, 13, 12, 13, 12, 13, 12, 13, 12, 13, 0, 13, 4, 13, 42, 2, 17, 13, 0, 13, 4, 18, 13, 13, 17, 14, 2, 13, 17, 0, 13, 4, 18, 13, 13, 17, 17, 17, 0, 13, 18, 13, 2, 13, 17,...
[ [ 22, 21 ], [ 76, 23 ], [ 21, 27 ], [ 61, 27 ], [ 40, 27 ], [ 30, 29 ], [ 21, 32 ], [ 61, 32 ], [ 40, 32 ], [ 29, 33 ], [ 29, 37 ], [ 41, 40 ], [ 21, 43 ], [ ...
[ "import bisect,collections,copy,itertools,math,string\nimport sys\ndef I(): return int(sys.stdin.readline().rstrip())\ndef LI(): return list(map(int,sys.stdin.readline().rstrip().split()))\ndef S(): return sys.stdin.readline().rstrip()\ndef LS(): return list(sys.stdin.readline().rstrip().split())\ndef main():\n ...
import bisect,collections,copy,itertools,math,string import sys def I(): return int(sys.stdin.readline().rstrip()) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def S(): return sys.stdin.readline().rstrip() def LS(): return list(sys.stdin.readline().rstrip().split()) def main(): s = S() ...
[ 7, 0, 13, 4, 13, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 14, 2, 13, 17, 9, 0, 13, 18, 13, 39, 17, 0, 13, 13, 4, 13, 13, 10, 18, 13, 10, 13, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 42, 2 ], [ 39, 6 ], [ 10, 9 ], [ 43, 9 ], [ 9, 13 ], [ 40, 17 ], [ 37, 17 ], [ 34, 17 ], [ 33, 21 ], [ 40, 23 ], [ 37, 23 ], [ 34, 23 ], [ 36, 27 ], [ 9, ...
[ "s = input()\n\nans = ''\n\nfor x in s:\n if x == 'B':\n if ans == '':\n continue \n ans = ans[:-1]\n else:\n ans += x\n\nprint(ans)", "s = input()", "s", "input()", "input", "ans = ''", "ans", "''", "for x in s:\n if x == 'B':\n if ans == '':\n ...
s = input() ans = '' for x in s: if x == 'B': if ans == '': continue ans = ans[:-1] else: ans += x print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 14, 2, 4, 13, 13, 17, 4, 13, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 25, 2 ], [ 28, 6 ], [ 10, 9 ], [ 26, 9 ], [ 9, 13 ], [ 29, 19 ], [ 29, 23 ], [ 25, 26 ], [ 28, 29 ] ]
[ "s = input()\nans = ''\nfor a in s:\n if a =='B':\n if len(ans) > 0: ans = ans[:-1]\n else: ans += a\nprint(ans)", "s = input()", "s", "input()", "input", "ans = ''", "ans", "''", "for a in s:\n if a =='B':\n if len(ans) > 0: ans = ans[:-1]\n else: ans += a", "a", "s", ...
s = input() ans = '' for a in s: if a =='B': if len(ans) > 0: ans = ans[:-1] else: ans += a print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 39, 28, 13, 13, 14, 2, 2, 13, 17, 2, 13, 17, 4, 18, 13, 13, 13, 14, 40, 17, 4, 13, 13, 4, 18, 13, 13, 2, 4, 13, 13, 17, 0, 13, 17, 28, 13, 13, 0, 13, 13, 4, 13, 13, 10, 17, 13...
[ [ 60, 2 ], [ 63, 8 ], [ 12, 11 ], [ 61, 11 ], [ 11, 16 ], [ 11, 19 ], [ 64, 23 ], [ 11, 25 ], [ 64, 31 ], [ 64, 34 ], [ 64, 39 ], [ 54, 42 ], [ 46, 45 ], [ ...
[ "s1 = str(input())\ns = []\nfor i in s1:\n if i == '0' or i == '1':\n s.append(i)\n else:\n if 1 <= len(s):\n s.pop(len(s)-1)\nw = \"\"\nfor h in s:\n w += h\nprint(w)", "s1 = str(input())", "s1", "str(input())", "str", "input()", "input", "s = []", "s", "[]", "...
s1 = str(input()) s = [] for i in s1: if i == '0' or i == '1': s.append(i) else: if 1 <= len(s): s.pop(len(s)-1) w = "" for h in s: w += h print(w)
[ 7, 0, 13, 4, 13, 42, 2, 2, 17, 13, 2, 17, 13, 0, 13, 4, 18, 13, 13, 17, 17, 0, 13, 4, 18, 13, 13, 17, 17, 42, 2, 17, 13, 0, 13, 4, 18, 13, 13, 17, 17, 4, 13, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 45, 2 ], [ 46, 9 ], [ 52, 9 ], [ 55, 9 ], [ 46, 12 ], [ 52, 12 ], [ 55, 12 ], [ 54, 14 ], [ 46, 17 ], [ 52, 17 ], [ 55, 17 ], [ 51, 22 ], [ 55, 25 ], [ 46...
[ "s = input()\nwhile \"0B\" in s or \"1B\" in s:\n s = s.replace(\"0B\", \"\")\n s = s.replace(\"1B\", \"\")\nwhile \"B\" in s:\n s = s.replace(\"B\", \"\")\n\nprint(s)", "s = input()", "s", "input()", "input", "while \"0B\" in s or \"1B\" in s:\n s = s.replace(\"0B\", \"\")\n s = s.replace(...
s = input() while "0B" in s or "1B" in s: s = s.replace("0B", "") s = s.replace("1B", "") while "B" in s: s = s.replace("B", "") print(s)
[ 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, 13, 17, 14, 2, 13, 17, 0, 13, 18, 13, 39, 17, 17, 4, 13, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, ...
[ [ 47, 2 ], [ 50, 6 ], [ 10, 9 ], [ 48, 9 ], [ 9, 13 ], [ 53, 16 ], [ 9, 20 ], [ 44, 23 ], [ 9, 27 ], [ 45, 31 ], [ 54, 31 ], [ 51, 31 ], [ 57, 31 ], [ 56, ...
[ "S = input()\nst = ''\nfor si in S:\n if si == '0':\n st += '0'\n if si == '1':\n st += '1'\n if si == 'B':\n if st == '':\n pass\n else:\n st = st[0:-1]\nprint(st)", "S = input()", "S", "input()", "input", "st = ''", "st", "''", "for si in ...
S = input() st = '' for si in S: if si == '0': st += '0' if si == '1': st += '1' if si == 'B': if st == '': pass else: st = st[0:-1] print(st)
[ 7, 12, 13, 15, 0, 13, 4, 13, 4, 13, 0, 13, 4, 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, 4, 13, 4, 18, 17, 13, 13, 4, 13, 1...
[ [ 6, 5 ], [ 12, 11 ], [ 17, 16 ], [ 5, 16 ], [ 16, 20 ], [ 11, 24 ], [ 16, 29 ], [ 11, 33 ], [ 11, 40 ], [ 11, 44 ], [ 11, 52 ], [ 57, 54 ] ]
[ "def main():\n from collections import deque\n s = list(input())\n ans = deque([])\n for 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()\n\n print(''.join(ans))\n\nm...
def main(): from collections import deque s = list(input()) ans = deque([]) for i in s: if i == '0': ans.append('0') elif i == '1': ans.append('1') else: if len(ans)!= 0: ans.pop() print(''.join(ans)) main()
[ 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, 13, 4, 18, 13, 13, 4, 1...
[ [ 65, 2 ], [ 62, 8 ], [ 66, 11 ], [ 68, 13 ], [ 17, 16 ], [ 63, 19 ], [ 66, 23 ], [ 16, 24 ], [ 69, 28 ], [ 66, 34 ], [ 16, 35 ], [ 69, 39 ], [ 66, 45 ], [ ...
[ "s = list(input())\nn = len(s)\n\nans = []\nfor i in range(n):\n if s[i] == '0':\n ans.append('0')\n if s[i] == '1':\n ans.append('1')\n if s[i] == 'B':\n if ans:\n ans.pop()\n\nprint(\"\".join(ans))", "s = list(input())", "s", "list(input())", "list", "input()", ...
s = list(input()) n = len(s) ans = [] for i in range(n): if s[i] == '0': ans.append('0') if s[i] == '1': ans.append('1') if s[i] == 'B': if ans: ans.pop() 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, 4, 18, 13, 13, 17, 14, 2, 18, 13, 13, 17, 4, 18, 13, 13, 17, 14, 2, 13, 39, 4, 18, 13, 13, 17, 4, 13, 4, 18, 17, 13, 13, 1...
[ [ 56, 2 ], [ 59, 8 ], [ 12, 11 ], [ 57, 16 ], [ 57, 20 ], [ 11, 21 ], [ 60, 25 ], [ 57, 31 ], [ 11, 32 ], [ 60, 36 ], [ 60, 41 ], [ 60, 45 ], [ 60, 54 ], [ ...
[ "s = list(input())\nbox = []\nfor i in range(len(s)):\n if s[i] == \"0\":\n box.append(\"0\")\n elif s[i] == \"1\":\n box.append(\"1\")\n else:\n if box == []:\n pass\n else:\n box.pop(-1)\nprint(\"\".join(box))", "s = list(input())", "s", "list(input())", "list", "input()", "in...
s = list(input()) box = [] for i in range(len(s)): if s[i] == "0": box.append("0") elif s[i] == "1": box.append("1") else: if box == []: pass else: box.pop(-1) print("".join(box))
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 28, 13, 13, 14, 2, 13, 17, 4, 18, 13, 13, 17, 14, 2, 13, 17, 4, 18, 13, 13, 17, 38, 5, 4, 18, 13, 13, 17, 28, 13, 13, 4, 13, 13, 0, 13, 17, 4, 13, 10, 4, 13, 10, 4, 13 ...
[ [ 51, 2 ], [ 54, 8 ], [ 13, 12 ], [ 52, 12 ], [ 12, 16 ], [ 55, 20 ], [ 12, 25 ], [ 55, 29 ], [ 55, 36 ], [ 41, 40 ], [ 55, 40 ], [ 40, 44 ], [ 47, 46 ], [ ...
[ "s=list(input())\nans=list()\nfor i in s:\n if i==\"0\":\n ans.append(0)\n elif i==\"1\":\n ans.append(1)\n else:\n try:\n ans.pop(-1)\n except:\n pass\nfor i in ans:\n print(i,end=\"\")\nprint()", "s=list(input())", "s", "list(input())", "list",...
s=list(input()) ans=list() for i in s: if i=="0": ans.append(0) elif i=="1": ans.append(1) else: try: ans.pop(-1) except: pass for i in ans: print(i,end="") print()
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 39, 28, 13, 4, 13, 13, 14, 40, 18, 13, 13, 17, 4, 18, 13, 13, 18, 13, 13, 14, 40, 4, 13, 13, 17, 4, 18, 13, 13, 17, 4, 13, 4, 18, 17, 13, 13, 10, 4, 13, 10, ...
[ [ 52, 2 ], [ 58, 8 ], [ 53, 11 ], [ 55, 13 ], [ 17, 16 ], [ 59, 19 ], [ 53, 23 ], [ 16, 24 ], [ 56, 28 ], [ 53, 31 ], [ 16, 32 ], [ 56, 37 ], [ 56, 41 ], [ ...
[ "s=list(input())\nn=len(s)\nans=[]\nfor i in range(n):\n if s[i]!=\"B\" :\n \n ans.append(s[i])\n else:\n if len(ans)!=0:\n ans.pop(-1)\n\nprint(\"\".join(ans))\n \n\n ", "s=list(input())", "s", "list(input())", "list", "input()", "input", "n=len(s)", ...
s=list(input()) n=len(s) ans=[] for i in range(n): if s[i]!="B" : ans.append(s[i]) else: if len(ans)!=0: ans.pop(-1) print("".join(ans))
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 17, 28, 13, 4, 13, 4, 13, 13, 14, 40, 18, 13, 13, 17, 0, 13, 18, 13, 13, 14, 40, 13, 17, 0, 13, 18, 13, 39, 17, 4, 13, 13, 10, 17, 13, 10, 18, 13, 10, 4, 13, 10, 18, 13 ]
[ [ 48, 2 ], [ 42, 8 ], [ 12, 11 ], [ 49, 16 ], [ 49, 20 ], [ 11, 21 ], [ 51, 24 ], [ 49, 26 ], [ 11, 27 ], [ 43, 30 ], [ 46, 30 ], [ 52, 30 ], [ 45, 33 ], [ ...
[ "s = str(input())\nans = \"\"\nfor i in range(len(s)):\n if(s[i]!=\"B\"):\n ans += s[i]\n else:\n if(ans != \"\"):\n ans = ans[:-1]\nprint(ans)\n", "s = str(input())", "s", "str(input())", "str", "input()", "input", "ans = \"\"", "ans", "\"\"", "for i in range(len(s)):\n if(s[i]!=\...
s = str(input()) ans = "" for i in range(len(s)): if(s[i]!="B"): ans += s[i] else: if(ans != ""): 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, 0, 13, 17, 14, 2, 18, 13, 13, 17, 0, 13, 17, 14, 40, 13, 17, 0, 13, 18, 13, 39, 17, 17, 4, 13, 13, 10, 18, 13, 10, 4, 13, 10, 17, ...
[ [ 51, 2 ], [ 60, 6 ], [ 10, 9 ], [ 52, 14 ], [ 52, 18 ], [ 9, 19 ], [ 57, 22 ], [ 52, 27 ], [ 9, 28 ], [ 54, 31 ], [ 61, 35 ], [ 49, 35 ], [ 55, 35 ], [ 58,...
[ "line = input()\nans = \"\"\nfor i in range(len(line)):\n if line[i] == \"0\":\n ans += \"0\"\n elif line[i] == \"1\":\n ans += \"1\"\n else:\n if ans != \"\":\n ans = ans[0:-1]\nprint(ans)", "line = input()", "line", "input()", "input", "ans = \"\"", "ans", "\...
line = input() ans = "" for i in range(len(line)): if line[i] == "0": ans += "0" elif line[i] == "1": ans += "1" else: if ans != "": ans = ans[0:-1] print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 39, 28, 13, 13, 14, 2, 2, 13, 17, 2, 4, 13, 13, 17, 4, 18, 13, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 4, 18, 13, 13, 13, 4, 13, 4, 18, 17, 13, 13, 10, 39, 13, 10, 4, 13 ]
[ [ 52, 2 ], [ 49, 8 ], [ 12, 11 ], [ 53, 11 ], [ 11, 16 ], [ 50, 21 ], [ 50, 25 ], [ 11, 31 ], [ 11, 34 ], [ 50, 38 ], [ 11, 40 ], [ 50, 47 ], [ 49, 50 ], [ ...
[ "s=str(input())\nedi=[]\nfor i in s:\n if i=='B' and len(edi)>0:\n edi.pop(-1)\n elif i=='0' or i=='1':\n edi.append(i)\nprint(\"\".join(edi))", "s=str(input())", "s", "str(input())", "str", "input()", "input", "edi=[]", "edi", "[]", "for i in s:\n if i=='B' and len(edi)>0:\n edi.pop...
s=str(input()) edi=[] for i in s: if i=='B' and len(edi)>0: edi.pop(-1) elif i=='0' or i=='1': edi.append(i) print("".join(edi))
[ 7, 0, 13, 4, 13, 0, 13, 39, 0, 13, 17, 28, 13, 4, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 4, 18, 13, 13, 17, 0, 13, 17, 14, 2, 18, 13, 13, 17, 4, 18, 13, 13, 17, 0, 13, 17, 14, 40, 13, 17, 4, 18, 13, 13, 2, 1...
[ [ 74, 2 ], [ 68, 6 ], [ 71, 9 ], [ 13, 12 ], [ 75, 17 ], [ 75, 21 ], [ 12, 22 ], [ 69, 26 ], [ 77, 30 ], [ 75, 35 ], [ 12, 36 ], [ 69, 40 ], [ 83, 44 ], [ 7...
[ "s = input()\nt = []\nr = 0\n\nfor i in range(len(s)):\n if s[i] == '0':\n t.append('0')\n r += 1\n elif s[i] == '1':\n t.append('1')\n r += 1 \n else:\n if r != 0:\n t.pop(r-1)\n r -= 1\n\nprint(''.join(t))", "s = input()", "s", "input()", ...
s = input() t = [] r = 0 for i in range(len(s)): if s[i] == '0': t.append('0') r += 1 elif s[i] == '1': t.append('1') r += 1 else: if r != 0: t.pop(r-1) r -= 1 print(''.join(t))
[ 7, 0, 13, 4, 13, 0, 13, 39, 28, 13, 13, 14, 2, 13, 17, 14, 2, 4, 13, 13, 17, 9, 4, 18, 13, 13, 4, 18, 13, 13, 13, 0, 13, 4, 18, 17, 13, 13, 4, 13, 13, 10, 4, 13, 10, 39, 13, 10, 4, 13 ]
[ [ 48, 2 ], [ 45, 6 ], [ 10, 9 ], [ 49, 9 ], [ 9, 13 ], [ 46, 19 ], [ 46, 24 ], [ 46, 28 ], [ 9, 30 ], [ 42, 32 ], [ 46, 37 ], [ 43, 40 ], [ 42, 43 ], [ 45, ...
[ "s = input()\nans = []\nfor i in s:\n\tif i=='B':\n\t\tif len(ans)==0:\n\t\t\tcontinue\n\t\tans.pop()\n\telse:\n\t\tans.append(i)\nnew = ''.join(ans)\nprint(new)", "s = input()", "s", "input()", "input", "ans = []", "ans", "[]", "for i in s:\n\tif i=='B':\n\t\tif len(ans)==0:\n\t\t\tcontinue\n\t\tan...
s = input() ans = [] for i in s: if i=='B': if len(ans)==0: continue ans.pop() else: ans.append(i) new = ''.join(ans) print(new)
[ 7, 0, 13, 4, 13, 0, 13, 39, 0, 13, 4, 13, 13, 0, 13, 17, 42, 2, 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, 4, 13, 13, 17, 4, 18...
[ [ 103, 2 ], [ 91, 6 ], [ 85, 9 ], [ 104, 12 ], [ 94, 14 ], [ 95, 18 ], [ 98, 18 ], [ 86, 19 ], [ 104, 23 ], [ 95, 24 ], [ 98, 24 ], [ 92, 28 ], [ 104, 34 ], [ ...
[ "S = input()\n\nZ = []\nX = len(S)\n\ni = 0\nwhile i < X :\n if S[i] == \"0\":\n Z.append(0)\n elif S[i] == \"1\":\n Z.append(1)\n elif S[i] == \"B\":\n if len(Z)== 0:\n pass\n else:\n Z.pop()\n i += 1\n\ni = 0\nX = len(Z)\nwhile i < X:\n print(Z[i] ...
S = input() Z = [] X = len(S) i = 0 while i < X : if S[i] == "0": Z.append(0) elif S[i] == "1": Z.append(1) elif S[i] == "B": if len(Z)== 0: pass else: Z.pop() i += 1 i = 0 X = len(Z) while i < X: print(Z[i] , end ="") i +=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, 13, 4, 18, 13, 13, 4, 13, 4, 18, 17, 13, 13, 10, 39, 13, 10, 4, 13 ]
[ [ 46, 2 ], [ 43, 6 ], [ 10, 9 ], [ 47, 9 ], [ 9, 13 ], [ 44, 17 ], [ 9, 22 ], [ 44, 26 ], [ 44, 33 ], [ 44, 41 ], [ 43, 44 ], [ 46, 47 ] ]
[ "S = input()\n\nres = []\nfor s in S:\n if s == \"0\":\n res.append(\"0\")\n elif s == \"1\":\n res.append(\"1\")\n else:\n if res:\n res.pop()\n\nprint(\"\".join(res))", "S = input()", "S", "input()", "input", "res = []", "res", "[]", "for s in S:\n if s ...
S = input() res = [] for s in S: if s == "0": res.append("0") elif s == "1": res.append("1") else: if res: res.pop() print("".join(res))
[ 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, 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 ]
[ [ 39, 2 ], [ 45, 6 ], [ 10, 9 ], [ 40, 9 ], [ 9, 13 ], [ 48, 16 ], [ 9, 20 ], [ 51, 23 ], [ 9, 27 ], [ 42, 30 ], [ 52, 32 ], [ 49, 32 ], [ 46, 32 ], [ 43, ...
[ "S = input()\n\nans = \"\"\nfor s in S:\n if s == \"0\":\n ans += \"0\"\n if s == \"1\":\n ans += \"1\"\n if s == \"B\":\n ans = ans[:-1]\n\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" if s == "1": ans += "1" if s == "B": ans = ans[:-1] print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 2, 39, 17, 17, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 0, 13, 4, 13, 17, 2, 13, 17, 0, 18, 13, 13, 13, 0, 13, 17, 4, 13, 4, 18, 17, 13, 18, 13, 39, 13, 10, 4, 13, 10, 2, 13, 10,...
[ [ 59, 2 ], [ 53, 8 ], [ 62, 14 ], [ 18, 17 ], [ 60, 17 ], [ 17, 21 ], [ 50, 24 ], [ 63, 29 ], [ 57, 29 ], [ 51, 29 ], [ 35, 32 ], [ 54, 33 ], [ 63, 34 ], [ ...
[ "s = list(input())\nans = [\"\"] * 10\nptr = 0\nfor c in s:\n if c == \"B\":\n ptr = max(0,ptr-1)\n else:\n ans[ptr] = c\n ptr += 1\n\nprint(\"\".join(ans[:ptr]))\n ", "s = list(input())", "s", "list(input())", "list", "input()", "input", "ans = [\"\"] * 10", "ans",...
s = list(input()) ans = [""] * 10 ptr = 0 for c in s: if c == "B": ptr = max(0,ptr-1) else: ans[ptr] = c ptr += 1 print("".join(ans[:ptr]))
[ 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, 13, 17, 14, 40, 13, 39, 4, 18, 13, 13, 14, 2, 13, 39, 4, 13, 17, 4, 13, 4, 18, 17, 13, 13, ...
[ [ 59, 2 ], [ 56, 6 ], [ 10, 9 ], [ 60, 9 ], [ 9, 13 ], [ 57, 17 ], [ 9, 22 ], [ 57, 26 ], [ 9, 31 ], [ 57, 35 ], [ 57, 39 ], [ 57, 43 ], [ 57, 54 ], [ 56, ...
[ "s=input()\nl=[]\nfor i in s:\n if i==\"0\":\n l.append(\"0\")\n elif i==\"1\":\n l.append(\"1\")\n elif i==\"B\":\n if l!=[]:\n \tl.pop()\nif l==[]:\n print(\"\")\nelse:\n print(\"\".join(l))", "s=input()", "s", "input()", "input", "l=[]", "l", "[]", "for i in s:\n if i==\"0\":\n ...
s=input() l=[] for i in s: if i=="0": l.append("0") elif i=="1": l.append("1") elif i=="B": if l!=[]: l.pop() if l==[]: print("") else: print("".join(l))
[ 7, 0, 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, 0, 13, 18, 13, 39, 17, 2, 4, 13, 13, 17, 4, 13, 13, 10, 4, 13, 10, 17, 13, 10, 2, 13, 10, 2, 13, 10,...
[ [ 44, 2 ], [ 47, 6 ], [ 10, 9 ], [ 45, 9 ], [ 9, 13 ], [ 50, 16 ], [ 48, 18 ], [ 57, 18 ], [ 54, 18 ], [ 51, 18 ], [ 9, 22 ], [ 53, 25 ], [ 48, 27 ], [ 57, ...
[ "s = input()\nr = \"\"\nfor i in s:\n\tif i == '0':\n\t\tr = r+'0'\n\telif i == '1':\n\t\tr = r+'1'\n\telse:\n\t\tr = r[0:len(r)-1]\n\nprint(r)", "s = input()", "s", "input()", "input", "r = \"\"", "r", "\"\"", "for i in s:\n\tif i == '0':\n\t\tr = r+'0'\n\telif i == '1':\n\t\tr = r+'1'\n\telse:\n\t...
s = input() r = "" for i in s: if i == '0': r = r+'0' elif i == '1': r = r+'1' else: r = r[0:len(r)-1] print(r)
[ 7, 15, 13, 13, 13, 13, 13, 13, 13, 13, 15, 15, 13, 12, 13, 12, 13, 12, 13, 12, 13, 12, 13, 0, 13, 4, 13, 41, 28, 13, 13, 4, 13, 0, 13, 13, 0, 13, 39, 28, 13, 13, 4, 13, 13, 14, 40, 13, 17, 4, 18, 13, 13, 13, ...
[ [ 25, 24 ], [ 88, 26 ], [ 30, 29 ], [ 24, 29 ], [ 29, 32 ], [ 35, 34 ], [ 38, 37 ], [ 34, 44 ], [ 37, 51 ], [ 37, 57 ], [ 37, 64 ], [ 37, 73 ], [ 82, 79 ] ]
[ "import bisect,collections,copy,heapq,itertools,math,numpy,string\nfrom fractions import gcd\nimport sys\ndef I(): return int(sys.stdin.readline().rstrip())\ndef LI(): return list(map(int,sys.stdin.readline().rstrip().split())) # tupleも検討する。\ndef S(): return sys.stdin.readline().rstrip()\ndef LS(): return list(sys....
import bisect,collections,copy,heapq,itertools,math,numpy,string from fractions import gcd import sys def I(): return int(sys.stdin.readline().rstrip()) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) # tupleも検討する。 def S(): return sys.stdin.readline().rstrip() def LS(): return list(sys.stdin.readl...
[ 7, 0, 13, 39, 28, 13, 4, 13, 14, 2, 17, 13, 14, 13, 4, 18, 13, 13, 4, 18, 13, 13, 13, 4, 13, 4, 18, 17, 13, 13, 10, 39, 13 ]
[ [ 31, 2 ], [ 6, 5 ], [ 5, 11 ], [ 32, 16 ], [ 32, 20 ], [ 5, 22 ], [ 32, 29 ], [ 31, 32 ] ]
[ "r = []\nfor i in input():\n if 'B' == i:\n if r:\n r.pop()\n else:\n r.append(i)\nprint(''.join(r))", "r = []", "r", "[]", "for i in input():\n if 'B' == i:\n if r:\n r.pop()\n else:\n r.append(i)", "i", "input()", "input", "if 'B' == i:...
r = [] for i in input(): if 'B' == i: if r: r.pop() else: r.append(i) print(''.join(r))
[ 7, 0, 13, 4, 13, 0, 13, 39, 28, 13, 13, 14, 40, 2, 13, 17, 4, 18, 13, 13, 13, 9, 14, 40, 13, 9, 0, 13, 18, 13, 39, 17, 4, 13, 4, 18, 17, 13, 13, 10, 18, 13, 10, 4, 13, 10, 39, 13 ]
[ [ 43, 2 ], [ 46, 6 ], [ 10, 9 ], [ 44, 9 ], [ 9, 14 ], [ 47, 18 ], [ 41, 18 ], [ 9, 20 ], [ 47, 24 ], [ 41, 24 ], [ 40, 27 ], [ 47, 29 ], [ 41, 29 ], [ 41, ...
[ "S = input()\nAns = []\nfor s in S:\n if not s=='B':\n Ans.append(s)\n continue\n if not Ans:\n continue\n Ans = Ans[:-1]\n\nprint(''.join(Ans))", "S = input()", "S", "input()", "input", "Ans = []", "Ans", "[]", "for s in S:\n if not s=='B':\n Ans.append(s)\n ...
S = input() Ans = [] for s in S: if not s=='B': Ans.append(s) continue if not Ans: continue Ans = Ans[:-1] print(''.join(Ans))
[ 7, 0, 13, 4, 13, 4, 13, 4, 13, 0, 13, 39, 28, 13, 13, 14, 40, 13, 17, 4, 18, 13, 13, 13, 14, 2, 2, 13, 17, 40, 13, 39, 4, 18, 13, 13, 9, 4, 13, 31, 13, 0, 13, 17, 10, 39, 13, 10, 4, 13 ]
[ [ 48, 2 ], [ 45, 10 ], [ 14, 13 ], [ 49, 13 ], [ 13, 17 ], [ 46, 21 ], [ 13, 23 ], [ 13, 27 ], [ 46, 30 ], [ 46, 34 ], [ 46, 40 ], [ 43, 42 ], [ 45, 46 ], [ ...
[ "# -*- coding: utf-8 -*-\n\ns = list(str(input()))\nc = []\n\nfor x in s:\n if x != 'B':\n c.append(x)\n elif x == 'B' and c != []:\n c.pop()\n else:\n continue\n\n\nprint(*c, sep='')", "s = list(str(input()))", "s", "list(str(input()))", "list", "str(input())", "str", "i...
# -*- coding: utf-8 -*- s = list(str(input())) c = [] for x in s: if x != 'B': c.append(x) elif x == 'B' and c != []: c.pop() else: continue print(*c, sep='')
[ 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, 2, 18, 13, 13, 17, 14, 2, 13, 39, 9, 4, 18, 13, 13, 17, 4...
[ [ 63, 2 ], [ 66, 8 ], [ 12, 11 ], [ 64, 16 ], [ 64, 20 ], [ 11, 21 ], [ 67, 25 ], [ 64, 31 ], [ 11, 32 ], [ 67, 36 ], [ 64, 42 ], [ 11, 43 ], [ 67, 47 ], [ ...
[ "a = list(input())\nans = []\nfor i in range(len(a)):\n if a[i] == '0':\n ans.append('0')\n elif a[i] == '1':\n ans.append('1')\n elif a[i] == 'B':\n if ans == []:\n continue\n else:\n ans.pop(-1)\nprint(''.join(ans))", "a = list(input())", "a", "list...
a = list(input()) ans = [] for i in range(len(a)): if a[i] == '0': ans.append('0') elif a[i] == '1': ans.append('1') elif a[i] == 'B': if ans == []: continue else: ans.pop(-1) print(''.join(ans))
[ 7, 0, 13, 4, 13, 0, 13, 39, 28, 13, 13, 14, 2, 13, 17, 0, 13, 18, 13, 39, 17, 4, 18, 13, 13, 13, 4, 13, 31, 13, 0, 13, 17, 10, 18, 13, 10, 4, 13, 10, 39, 13 ]
[ [ 37, 2 ], [ 40, 6 ], [ 10, 9 ], [ 38, 9 ], [ 9, 13 ], [ 34, 16 ], [ 41, 18 ], [ 35, 18 ], [ 41, 23 ], [ 35, 23 ], [ 9, 25 ], [ 35, 29 ], [ 41, 29 ], [ 32, ...
[ "X = input()\ntext = []\n\nfor i in X:\n if i == 'B':\n text = text[:-1]\n else:\n text.append(i)\nprint(*text, sep='')", "X = input()", "X", "input()", "input", "text = []", "text", "[]", "for i in X:\n if i == 'B':\n text = text[:-1]\n else:\n text.append(i)...
X = input() text = [] for i in X: if i == 'B': text = text[:-1] else: text.append(i) print(*text, sep='')
[ 7, 0, 13, 17, 28, 13, 4, 13, 14, 2, 13, 17, 14, 40, 13, 17, 0, 13, 18, 13, 39, 17, 0, 13, 13, 4, 13, 13, 10, 13, 13, 10, 18, 13, 10, 17, 13 ]
[ [ 35, 2 ], [ 6, 5 ], [ 5, 10 ], [ 36, 14 ], [ 30, 14 ], [ 33, 14 ], [ 32, 17 ], [ 36, 19 ], [ 30, 19 ], [ 33, 19 ], [ 29, 23 ], [ 5, 24 ], [ 30, 27 ], [ 33,...
[ "s=''\nfor c in input():\n if c=='B':\n if s!='':\n s=s[:-1]\n else:\n s+=c\nprint(s)", "s=''", "s", "''", "for c in input():\n if c=='B':\n if s!='':\n s=s[:-1]\n else:\n s+=c", "c", "input()", "input", "if c=='B':\n if s!='':\n ...
s='' for c in input(): if c=='B': if s!='': s=s[:-1] else: s+=c print(s)
[ 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, 2, 4, 13, 13, 17, 4, 18, 13, 13, 4, 13, 4, 18, 17, 13, 13...
[ [ 57, 2 ], [ 60, 8 ], [ 12, 11 ], [ 58, 16 ], [ 58, 20 ], [ 11, 21 ], [ 61, 25 ], [ 58, 31 ], [ 11, 32 ], [ 61, 36 ], [ 61, 43 ], [ 61, 47 ], [ 61, 55 ], [ ...
[ "s = list(input())\noutput = []\nfor i in range(len(s)):\n if s[i] == \"0\":\n output.append(\"0\")\n elif s[i] == \"1\":\n output.append(\"1\")\n else:\n if len(output) > 0:\n output.pop()\n else:\n pass\nprint(\"\".join(output))", "s = list(input())", ...
s = list(input()) output = [] for i in range(len(s)): if s[i] == "0": output.append("0") elif s[i] == "1": output.append("1") else: if len(output) > 0: output.pop() else: pass print("".join(output))
[ 7, 0, 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, 14, 2, 2, 18, 13, 13, 17, 40, 4, 13, 13, 17, 0, 13, 18, 13, 39, 17, 4, 13, 13, 10, 17, 1...
[ [ 60, 2 ], [ 54, 6 ], [ 10, 9 ], [ 61, 14 ], [ 61, 19 ], [ 9, 20 ], [ 61, 24 ], [ 9, 25 ], [ 57, 28 ], [ 61, 30 ], [ 9, 31 ], [ 61, 36 ], [ 9, 37 ], [ 55, ...
[ "s = input()\nres = \"\"\nfor i in range(len(s)):\n if s[i] == \"1\" or s[i] == \"0\":\n res += s[i]\n elif s[i] == \"B\" and len(res) != 0:\n res = res[:-1]\n\nprint(res)", "s = input()", "s", "input()", "input", "res = \"\"", "res", "\"\"", "for i in range(len(s)):\n if s[i]...
s = input() res = "" for i in range(len(s)): if s[i] == "1" or s[i] == "0": res += s[i] elif s[i] == "B" and len(res) != 0: res = res[:-1] print(res)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 17, 28, 13, 4, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 0, 13, 18, 13, 39, 2, 4, 13, 13, 17, 0, 13, 18, 13, 13, 4, 13, 13, 10, 4, 13, 10, 17, 13, 10, 18, 13, 10, 18, 13 ]
[ [ 42, 2 ], [ 45, 8 ], [ 12, 11 ], [ 43, 16 ], [ 43, 20 ], [ 11, 21 ], [ 48, 24 ], [ 46, 26 ], [ 52, 26 ], [ 49, 26 ], [ 46, 31 ], [ 52, 31 ], [ 49, 31 ], [ ...
[ "S=str(input())\nans=\"\"\nfor i in range(len(S)):\n if S[i]==\"B\":\n ans=ans[:len(ans)-1]\n else:\n ans+=S[i]\nprint(ans)", "S=str(input())", "S", "str(input())", "str", "input()", "input", "ans=\"\"", "ans", "\"\"", "for i in range(len(S)):\n if S[i]==\"B\":\n an...
S=str(input()) ans="" for i in range(len(S)): if S[i]=="B": ans=ans[:len(ans)-1] else: ans+=S[i] print(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, 13, 39, 9, 4, 18, 13, 13, 4, 13, 4, 18, 17,...
[ [ 62, 2 ], [ 65, 8 ], [ 63, 11 ], [ 59, 13 ], [ 17, 16 ], [ 66, 19 ], [ 63, 23 ], [ 16, 24 ], [ 60, 28 ], [ 63, 34 ], [ 16, 35 ], [ 60, 39 ], [ 60, 44 ], [ ...
[ "s = list(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 elif ans == []:\n continue\n else:\n ans.pop()\n \nprint(''.join(ans))\n ", "s = list(input())", "s", "list(input())", "list", "input()", "inpu...
s = list(input()) n = len(s) ans = [] for i in range(n): if s[i] == '0': ans.append('0') elif s[i] == '1': ans.append('1') elif ans == []: continue else: ans.pop() print(''.join(ans))
[ 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, 4, 13, 13, 17, 4, 18, 13, 13, 0, 13, 4, 18, 17, 13, 13, 4, 13, 13, 10, 39, 13, 10, 4...
[ [ 52, 2 ], [ 58, 5 ], [ 12, 11 ], [ 59, 11 ], [ 11, 15 ], [ 53, 19 ], [ 11, 24 ], [ 53, 28 ], [ 53, 35 ], [ 53, 39 ], [ 55, 42 ], [ 53, 47 ], [ 56, 50 ], [ ...
[ "s=[]\na=list(input())\n\nfor i in a:\n if i=='0':\n s.append('0')\n elif i=='1':\n s.append('1')\n else:\n if len(s)==0:\n pass\n else:\n s.pop()\n\nb=\"\".join(s)\nprint(b)", "s=[]", "s", "[]", "a=list(input())", "a", "list(input())", "list"...
s=[] a=list(input()) for i in a: if i=='0': s.append('0') elif i=='1': s.append('1') else: if len(s)==0: pass else: s.pop() b="".join(s) print(b)
[ 7, 0, 13, 4, 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, 2, 4, 13, 13, 17, 4, 13, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, ...
[ [ 48, 2 ], [ 54, 8 ], [ 12, 11 ], [ 49, 11 ], [ 11, 15 ], [ 45, 18 ], [ 11, 22 ], [ 51, 25 ], [ 55, 29 ], [ 58, 29 ], [ 52, 29 ], [ 46, 29 ], [ 57, 32 ], [ ...
[ "s = list(input())\n\nans = ''\nfor i in s:\n if i == '0':\n ans += '0'\n elif i == '1':\n ans += '1'\n elif ans != '':\n ans = ans[:len(ans) - 1]\n\nprint(ans)", "s = list(input())", "s", "list(input())", "list", "input()", "input", "ans = ''", "ans", "''", "for i ...
s = list(input()) ans = '' for i in s: if i == '0': ans += '0' elif i == '1': ans += '1' elif ans != '': ans = ans[:len(ans) - 1] print(ans)
[ 7, 15, 13, 15, 15, 12, 13, 0, 13, 4, 13, 0, 13, 39, 28, 13, 13, 14, 2, 13, 17, 14, 13, 4, 18, 13, 13, 13, 4, 13, 4, 18, 17, 13, 13, 0, 13, 17, 28, 13, 4, 13, 17, 2, 13, 17, 0, 13, 4, 13, 17, 10, 4, 13, 10, ...
[ [ 9, 8 ], [ 13, 12 ], [ 16, 15 ], [ 8, 15 ], [ 15, 19 ], [ 12, 25 ], [ 15, 27 ], [ 12, 34 ], [ 55, 36 ], [ 40, 39 ], [ 56, 44 ], [ 52, 47 ], [ 59, 49 ], [ 5...
[ "# -*- coding: utf-8 -*-\nimport sys\nfrom collections import deque, defaultdict\nfrom math import sqrt, factorial\n# def input(): return sys.stdin.readline()[:-1] # warning not \\n\n# def input(): return sys.stdin.buffer.readline().strip() # warning bytes\n# def input(): return sys.stdin.buffer.readline().decode('...
# -*- coding: utf-8 -*- import sys from collections import deque, defaultdict from math import sqrt, factorial # def input(): return sys.stdin.readline()[:-1] # warning not \n # def input(): return sys.stdin.buffer.readline().strip() # warning bytes # def input(): return sys.stdin.buffer.readline().decode('utf-8') de...
[ 7, 0, 13, 4, 13, 0, 13, 39, 28, 13, 13, 14, 2, 13, 17, 14, 2, 4, 13, 13, 17, 4, 18, 13, 13, 4, 18, 13, 13, 13, 4, 13, 4, 18, 17, 13, 13, 10, 4, 13, 10, 39, 13 ]
[ [ 38, 2 ], [ 41, 6 ], [ 10, 9 ], [ 39, 9 ], [ 9, 13 ], [ 42, 19 ], [ 42, 23 ], [ 42, 27 ], [ 9, 29 ], [ 42, 36 ], [ 38, 39 ], [ 41, 42 ] ]
[ "S = input()\n\nF = []\nfor ch in S:\n if ch == \"B\": \n if len(F) > 0:\n F.pop()\n else:\n F.append(ch)\n \nprint(\"\".join(F))", "S = input()", "S", "input()", "input", "F = []", "F", "[]", "for ch in S:\n if ch == \"B\": \n if len(F) > 0:\n F.pop()\n else:\n F.append...
S = input() F = [] for ch in S: if ch == "B": if len(F) > 0: F.pop() else: F.append(ch) print("".join(F))
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 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, 18, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, ...
[ [ 51, 2 ], [ 54, 8 ], [ 13, 12 ], [ 52, 12 ], [ 12, 16 ], [ 45, 19 ], [ 12, 23 ], [ 48, 26 ], [ 55, 30 ], [ 43, 30 ], [ 49, 30 ], [ 46, 30 ], [ 42, 33 ], [ ...
[ "S=list(input())\nans=str()\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]\nprint(ans)", "S=list(input())", "S", "list(input())", "list", "input()", "input", "ans=str()", "ans", "str()", "str", "for i in S:\n if i...
S=list(input()) ans=str() 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, 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, 10, 18, 13, 10, 17, 13, 10, 13, 13, 10, 4, 13 ]
[ [ 41, 2 ], [ 35, 6 ], [ 10, 9 ], [ 42, 9 ], [ 9, 13 ], [ 38, 16 ], [ 9, 17 ], [ 36, 20 ], [ 33, 20 ], [ 39, 20 ], [ 32, 23 ], [ 36, 25 ], [ 33, 25 ], [ 39, ...
[ "s=input()\nt=''\nfor c in s:\n if c!='B':\n t+=c\n elif t!='':\n t=t[:-1]\nprint(t)", "s=input()", "s", "input()", "input", "t=''", "t", "''", "for c in s:\n if c!='B':\n t+=c\n elif t!='':\n t=t[:-1]", "c", "s", "if c!='B':\n t+=c\n elif t!='...
s=input() t='' for c in s: if c!='B': t+=c elif t!='': t=t[:-1] print(t)
[ 7, 15, 0, 13, 4, 13, 0, 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, 13, 17, 14, 40, 4, 13, 13, 17, 4, 18, 13, 13, 0, 13, 4, 18, 17, 13, 13, 4, 13, 13, 1...
[ [ 62, 3 ], [ 56, 7 ], [ 12, 11 ], [ 63, 11 ], [ 11, 15 ], [ 57, 19 ], [ 11, 24 ], [ 57, 28 ], [ 11, 33 ], [ 57, 39 ], [ 57, 43 ], [ 59, 46 ], [ 57, 51 ], [ ...
[ "from collections import deque\ns = input()\nde = deque()\nfor i in s:\n if i == \"0\":\n de.append(\"0\")\n elif i == \"1\":\n de.append(\"1\")\n elif i == \"B\":\n if len(de) != 0:\n de.pop()\nans = \"\".join(de)\nprint(ans)", "from collections import deque", "s = inpu...
from collections import deque s = input() de = deque() for i in s: if i == "0": de.append("0") elif i == "1": de.append("1") elif i == "B": if len(de) != 0: de.pop() ans = "".join(de) print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 17, 28, 13, 13, 0, 13, 8, 2, 13, 17, 18, 13, 39, 17, 2, 13, 13, 4, 13, 13, 10, 8, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 34, 2 ], [ 31, 6 ], [ 10, 9 ], [ 35, 9 ], [ 28, 12 ], [ 9, 15 ], [ 32, 18 ], [ 29, 18 ], [ 32, 22 ], [ 29, 22 ], [ 9, 23 ], [ 29, 26 ], [ 32, 26 ], [ 28, ...
[ "s = input()\n\nans = ''\n\nfor i in s:\n ans = ans[:-1] if i == 'B' else ans + i \n\nprint(ans)", "s = input()", "s", "input()", "input", "ans = ''", "ans", "''", "for i in s:\n ans = ans[:-1] if i == 'B' else ans + i ", "i", "s", "ans = ans[:-1] if i == 'B' else ans + i", "ans"...
s = input() ans = '' for i in s: ans = ans[:-1] if i == 'B' else ans + i print(ans)
[ 7, 0, 13, 4, 18, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 4, 13, 13, 14, 40, 18, 13, 13, 17, 0, 13, 2, 13, 18, 13, 13, 14, 2, 4, 13, 13, 17, 0, 13, 18, 13, 39, 17, 4, 13, 13, 10, 4, 13, 10, 2, 13, 10, 18, 13, 1...
[ [ 47, 2 ], [ 56, 9 ], [ 13, 12 ], [ 48, 17 ], [ 48, 21 ], [ 12, 22 ], [ 50, 25 ], [ 57, 27 ], [ 54, 27 ], [ 51, 27 ], [ 48, 29 ], [ 12, 30 ], [ 57, 35 ], [ ...
[ "s = input().strip()\nx = \"\"\nfor i in range(len(s)):\n if s[i]!=\"B\":\n x = x+s[i]\n else:\n if len(x)>0:\n x = x[:-1]\nprint(x)", "s = input().strip()", "s", "input().strip()", "().strip", "()", "input", "strip", "x = \"\"", "x", "\"\"", "for i in range(len(...
s = input().strip() x = "" for i in range(len(s)): if s[i]!="B": x = x+s[i] else: if len(x)>0: x = x[:-1] print(x)
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 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, 40, 13, 4, 18, 13, 13, 17, 41, 28, 13, 13, 4, 4, 13, 13, 0, 13, 4, 18, 17...
[ [ 71, 2 ], [ 65, 6 ], [ 72, 9 ], [ 62, 11 ], [ 16, 15 ], [ 66, 15 ], [ 15, 19 ], [ 63, 23 ], [ 15, 28 ], [ 63, 32 ], [ 63, 37 ], [ 63, 40 ], [ 46, 45 ], [ 6...
[ "first_str =input()\n\ninput_list = list(first_str)\n\ntotal_list = list()\n\nfor i in input_list:\n if i == \"0\":\n total_list.append(\"0\")\n \n elif i == \"1\":\n total_list.append(\"1\")\n \n else:\n if not total_list:\n pass\n else:\n total_...
first_str =input() input_list = list(first_str) total_list = list() for i in input_list: if i == "0": total_list.append("0") elif i == "1": total_list.append("1") else: if not total_list: pass else: total_list.pop(-1) total = "".j...
[ 7, 12, 13, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 0, 13, 18, 13, 39, 17, 0, 13, 13, 29, 13, 23, 13, 12, 13, 0, 13, 4, 13, 4, 13, 4, 13, 13, 14, 2, 13, 17, 4, 13, 10, 12, 13, 10, 12, 13 ]
[ [ 5, 4 ], [ 8, 7 ], [ 25, 7 ], [ 7, 11 ], [ 15, 14 ], [ 4, 16 ], [ 20, 16 ], [ 14, 16 ], [ 21, 20 ], [ 7, 21 ], [ 20, 23 ], [ 14, 23 ], [ 4, 23 ], [ 25, ...
[ "def answer(s: str) -> str:\n result = ''\n for c in s:\n if c == 'B':\n result = result[:-1]\n else:\n result += c\n\n return result\n\ndef main():\n s = input()\n print(answer(s))\n\nif __name__ == '__main__':\n main()", "def answer(s: str) -> str:\n resu...
def answer(s: str) -> str: result = '' for c in s: if c == 'B': result = result[:-1] else: result += c return result def main(): s = input() print(answer(s)) if __name__ == '__main__': main()
[ 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, 40, 4, 13, 13, 17, 24, 18, 13, 17, 4, 13, 4, 18, 17, 13, 13, 10, 4, 13, 10, 39, ...
[ [ 51, 2 ], [ 54, 6 ], [ 10, 9 ], [ 52, 9 ], [ 9, 13 ], [ 55, 17 ], [ 9, 22 ], [ 55, 26 ], [ 9, 32 ], [ 55, 37 ], [ 55, 41 ], [ 55, 49 ], [ 51, 52 ], [ 54, ...
[ "S = input()\nI = []\nfor TS in S:\n if TS=='0':\n I.append('0')\n elif TS=='1':\n I.append('1')\n elif TS=='B' and len(I)>=1:\n del I[-1]\nprint(''.join(I))", "S = input()", "S", "input()", "input", "I = []", "I", "[]", "for TS in S:\n if TS=='0':\n I.append(...
S = input() I = [] for TS in S: if TS=='0': I.append('0') elif TS=='1': I.append('1') elif TS=='B' and len(I)>=1: del I[-1] print(''.join(I))
[ 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, 2, 13, 17, 14, 2, 18, 13, 13, 17, 0, 13, 2, 13, 17, 14, 2, 18, 13, 13, 17, 0, 13, 4, 13, 13, 14, 40, 13, 17, 0,...
[ [ 83, 2 ], [ 92, 6 ], [ 84, 9 ], [ 80, 11 ], [ 15, 14 ], [ 93, 17 ], [ 84, 21 ], [ 14, 22 ], [ 98, 25 ], [ 81, 27 ], [ 102, 27 ], [ 87, 27 ], [ 90, 27 ], [ ...
[ "s = input()\n\nn = len(s)\ns_ans = \"\"\n\nfor i in range(n):\n if s[i] == \"0\":\n s_ans = s_ans + \"0\"\n\n elif s[i] == \"1\":\n s_ans = s_ans + \"1\"\n\n elif s[i] == \"B\":\n len_ans = len(s_ans)\n if len_ans >= 1:\n s_ans = s_ans[:len_ans-1]\n\n elif len...
s = input() n = len(s) s_ans = "" for i in range(n): if s[i] == "0": s_ans = s_ans + "0" elif s[i] == "1": s_ans = s_ans + "1" elif s[i] == "B": len_ans = len(s_ans) if len_ans >= 1: s_ans = s_ans[:len_ans-1] elif len_ans == 0: s_ans = s_a...
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 39, 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, 18, 13, 13, 17, 14, 40, 4, 13, 13, 17, 4, 18, 13, 13, 4, 13, 4, 18...
[ [ 60, 2 ], [ 66, 6 ], [ 61, 9 ], [ 63, 11 ], [ 15, 14 ], [ 67, 17 ], [ 61, 21 ], [ 14, 22 ], [ 69, 25 ], [ 61, 30 ], [ 14, 31 ], [ 72, 34 ], [ 61, 39 ], [ 1...
[ "s=input()\nS=len(s)\nans=[]\n\nfor i in range(S):\n if s[i]==\"0\":\n ans+=\"0\"\n elif s[i]==\"1\":\n ans+=\"1\"\n elif s[i]==\"B\":\n if len(ans)>=1:\n ans.pop()\n\n\nprint(\"\".join(ans))", "s=input()", "s", "input()", "input", "S=len(s)", "S", "len(s)", ...
s=input() S=len(s) ans=[] for i in range(S): if s[i]=="0": ans+="0" elif s[i]=="1": ans+="1" elif s[i]=="B": if len(ans)>=1: ans.pop() print("".join(ans))
[ 7, 0, 13, 4, 13, 4, 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, 13, 13, 10, 4, 1...
[ [ 54, 2 ], [ 57, 8 ], [ 12, 11 ], [ 55, 16 ], [ 55, 20 ], [ 11, 21 ], [ 58, 25 ], [ 55, 28 ], [ 11, 29 ], [ 55, 34 ], [ 11, 35 ], [ 58, 40 ], [ 58, 44 ], [ ...
[ "S = list(input())\nans = []\n\nfor i in range(len(S)):\n if(S[i] != 'B'):\n ans.append(S[i])\n elif(S[i] == 'B' and len(ans) != 0):\n ans.pop()\n\n \nprint(''.join(ans))", "S = list(input())", "S", "list(input())", "list", "input()", "input", "ans = []", "ans", "[]", ...
S = list(input()) ans = [] for i in range(len(S)): if(S[i] != 'B'): ans.append(S[i]) elif(S[i] == 'B' and len(ans) != 0): ans.pop() print(''.join(ans))
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 39, 28, 13, 13, 14, 2, 13, 17, 14, 2, 4, 13, 13, 17, 24, 18, 13, 17, 4, 18, 13, 13, 13, 4, 13, 4, 18, 17, 13, 13, 10, 39, 13, 10, 4, 13 ]
[ [ 43, 2 ], [ 40, 8 ], [ 12, 11 ], [ 44, 11 ], [ 11, 15 ], [ 41, 21 ], [ 41, 25 ], [ 41, 29 ], [ 11, 31 ], [ 41, 38 ], [ 40, 41 ], [ 43, 44 ] ]
[ "S=list(input())\n\nans=[]\n\nfor s in S:\n if s == \"B\":\n if len(ans)>0:\n del ans[-1]\n else:\n ans.append(s)\n \nprint(\"\".join(ans))", "S=list(input())", "S", "list(input())", "list", "input()", "input", "ans=[]", "ans", "[]", "for s in S:\n if s == \"B\":\n if len(ans...
S=list(input()) ans=[] for s in S: if s == "B": if len(ans)>0: del ans[-1] else: ans.append(s) print("".join(ans))
[ 7, 0, 13, 4, 13, 0, 13, 39, 28, 13, 13, 14, 40, 13, 17, 4, 18, 13, 13, 13, 0, 13, 18, 13, 39, 17, 4, 13, 4, 18, 17, 13, 13, 10, 39, 13, 10, 4, 13, 10, 18, 13 ]
[ [ 37, 2 ], [ 34, 6 ], [ 10, 9 ], [ 38, 9 ], [ 9, 13 ], [ 35, 17 ], [ 41, 17 ], [ 9, 19 ], [ 40, 21 ], [ 35, 23 ], [ 41, 23 ], [ 41, 32 ], [ 35, 32 ], [ 34, ...
[ "s=input()\nans=[]\nfor i in s:\n if i!=\"B\":\n ans.append(i)\n else:\n ans=ans[:-1]\n \nprint(\"\".join(ans))", "s=input()", "s", "input()", "input", "ans=[]", "ans", "[]", "for i in s:\n if i!=\"B\":\n ans.append(i)\n else:\n ans=ans[:-1]\n ",...
s=input() ans=[] for i in s: if i!="B": ans.append(i) else: ans=ans[:-1] print("".join(ans))
[ 7, 0, 13, 4, 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, 24, 18, 13, 17, 4, 13, 4, 18, 17, 13, 13, 10, 4, 13, 10, 39, 13 ]
[ [ 41, 2 ], [ 44, 8 ], [ 12, 11 ], [ 42, 11 ], [ 11, 16 ], [ 11, 19 ], [ 45, 23 ], [ 11, 25 ], [ 45, 28 ], [ 45, 31 ], [ 45, 39 ], [ 41, 42 ], [ 44, 45 ] ]
[ "s=list(input())\nx=[]\nfor i in s:\n if i==\"0\" or i==\"1\":\n x.append(i)\n else :\n if not x:\n pass\n else:\n \t del x[-1]\nprint(\"\".join(x))", "s=list(input())", "s", "list(input())", "list", "input()", "input", "x=[]", "x", "[]", "for i in s:\n if i==\"0\" or i==\"1\...
s=list(input()) x=[] for i in s: if i=="0" or i=="1": x.append(i) else : if not x: pass else: del x[-1] print("".join(x))
[ 7, 0, 13, 4, 13, 0, 13, 39, 28, 13, 13, 14, 2, 13, 17, 14, 40, 13, 39, 4, 18, 13, 13, 17, 4, 18, 13, 13, 13, 4, 13, 4, 18, 17, 13, 13, 10, 4, 13, 10, 39, 13 ]
[ [ 37, 2 ], [ 40, 6 ], [ 10, 9 ], [ 38, 9 ], [ 9, 13 ], [ 41, 17 ], [ 41, 21 ], [ 41, 26 ], [ 9, 28 ], [ 41, 35 ], [ 37, 38 ], [ 40, 41 ] ]
[ "s = input()\nans = []\n\nfor i in s:\n if i=='B':\n if ans != []:\n ans.pop(-1)\n else:\n ans.append(i)\nprint(''.join(ans))", "s = input()", "s", "input()", "input", "ans = []", "ans", "[]", "for i in s:\n if i=='B':\n if ans != []:\n ans.pop(-1)...
s = input() ans = [] for i in s: if i=='B': if ans != []: ans.pop(-1) else: ans.append(i) print(''.join(ans))
[ 7, 15, 0, 13, 4, 13, 0, 13, 4, 13, 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, 4, 13, 10, 4, 13 ]
[ [ 40, 3 ], [ 43, 7 ], [ 12, 11 ], [ 41, 11 ], [ 11, 15 ], [ 44, 21 ], [ 44, 25 ], [ 44, 29 ], [ 11, 31 ], [ 44, 38 ], [ 40, 41 ], [ 43, 44 ] ]
[ "from collections import deque\nS = input()\nq = deque()\n\nfor s in S:\n if s == \"B\":\n if len(q) != 0:\n q.pop()\n else:\n q.append(s)\nprint(\"\".join(q))", "from collections import deque", "S = input()", "S", "input()", "input", "q = deque()", "q", "deque()", "...
from collections import deque S = input() q = deque() for s in S: if s == "B": if len(q) != 0: q.pop() else: q.append(s) print("".join(q))
[ 7, 0, 13, 4, 13, 0, 13, 39, 28, 13, 13, 14, 2, 13, 17, 14, 40, 13, 9, 4, 18, 13, 13, 17, 4, 18, 13, 13, 13, 0, 13, 17, 28, 13, 13, 0, 13, 4, 18, 17, 13, 39, 13, 13, 4, 13, 13, 10, 4, 13, 10, 39, 13, 10, 4, ...
[ [ 48, 2 ], [ 51, 6 ], [ 10, 9 ], [ 49, 9 ], [ 9, 13 ], [ 52, 17 ], [ 52, 21 ], [ 52, 26 ], [ 9, 28 ], [ 57, 30 ], [ 34, 33 ], [ 52, 33 ], [ 54, 36 ], [ 55, ...
[ "s = input()\narr = []\nfor i in s:\n if i==\"B\":\n if not arr:\n continue\n arr.pop(-1)\n else:\n arr.append(i)\nans = \"\"\nfor i in arr:\n ans = \"\".join([ans,i])\nprint(ans)", "s = input()", "s", "input()", "input", "arr = []", "arr", "[]", "for i in s:...
s = input() arr = [] for i in s: if i=="B": if not arr: continue arr.pop(-1) else: arr.append(i) ans = "" for i in arr: ans = "".join([ans,i]) print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 18, 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, 18, 13, 10, 17, 13, 10, 4, 13, 1...
[ [ 59, 2 ], [ 53, 6 ], [ 60, 9 ], [ 65, 11 ], [ 15, 14 ], [ 54, 17 ], [ 47, 19 ], [ 60, 21 ], [ 14, 22 ], [ 48, 25 ], [ 62, 28 ], [ 48, 32 ], [ 50, 35 ], [ 5...
[ "s = input()\nn = len(s)\n\nans = ''\n\nfor i in range(n):\n s1 = s[i]\n if s1 == '0':\n ans += '0'\n elif s1 == '1':\n ans += '1'\n else:\n ans = ans[:-1]\n\nprint(ans)", "s = input()", "s", "input()", "input", "n = len(s)", "n", "len(s)", "len", "s", "ans = ''"...
s = input() n = len(s) ans = '' for i in range(n): s1 = s[i] if s1 == '0': ans += '0' elif s1 == '1': ans += '1' else: 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, 0, 13, 18, 13, 39, 17, 0, 13, 18, 13, 13, 4, 13, 13, 10, 18, 13, 10, 17, 13, 10, 4, 13, 10, 18, 13 ]
[ [ 42, 2 ], [ 39, 6 ], [ 10, 9 ], [ 43, 14 ], [ 43, 18 ], [ 9, 19 ], [ 45, 22 ], [ 40, 24 ], [ 37, 24 ], [ 46, 24 ], [ 36, 28 ], [ 43, 30 ], [ 9, 31 ], [ 37,...
[ "s = input()\na = \"\"\nfor i in range(len(s)):\n if s[i] == \"B\":\n a = a[:-1]\n else:\n a += s[i]\nprint(a)", "s = input()", "s", "input()", "input", "a = \"\"", "a", "\"\"", "for i in range(len(s)):\n if s[i] == \"B\":\n a = a[:-1]\n else:\n a += s[i]", "i", "range(len(s))", ...
s = input() a = "" for i in range(len(s)): if s[i] == "B": a = a[:-1] else: a += s[i] print(a)
[ 7, 15, 15, 15, 15, 13, 15, 13, 15, 13, 15, 13, 15, 13, 4, 18, 13, 13, 17, 0, 13, 2, 2, 17, 17, 17, 15, 0, 13, 18, 13, 13, 12, 13, 29, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 12, 13, 29, 4, 13, 4, 13, 13, 4, 18, ...
[ [ 107, 20 ], [ 113, 28 ], [ 114, 43 ], [ 114, 56 ], [ 114, 64 ], [ 131, 66 ], [ 110, 70 ], [ 74, 73 ], [ 132, 78 ], [ 132, 82 ], [ 73, 83 ], [ 134, 86 ], [ 132, 91 ...
[ "#from statistics import median\n#import collections\n#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]\nfrom fractions import gcd\nfrom itertools import combinations,permutations,accumulate, product # (string,3) 3回\n#from collections import deque\nfrom collections import deque,defa...
#from statistics import median #import collections #aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0] from fractions import gcd from itertools import combinations,permutations,accumulate, product # (string,3) 3回 #from collections import deque from collections import deque,defaultdict,Cou...
[ 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, 40, 4, 13, 13, 17, 4, 18, 13, 13, 4, 13, 4, 18, 17, 13, 1...
[ [ 60, 2 ], [ 57, 8 ], [ 12, 11 ], [ 61, 16 ], [ 61, 20 ], [ 11, 21 ], [ 58, 25 ], [ 61, 31 ], [ 11, 32 ], [ 58, 36 ], [ 58, 43 ], [ 58, 47 ], [ 58, 55 ], [ ...
[ "s = str(input())\na = []\n \nfor i in range(len(s)):\n if s[i] == '0':\n a.append('0')\n elif s[i] == '1':\n a.append('1')\n else:\n if len(a) != 0:\n a.pop()\n \nprint(''.join(a))", "s = str(input())", "s", "str(input())", "str", "input()", "input", "a = []",...
s = str(input()) a = [] for i in range(len(s)): if s[i] == '0': a.append('0') elif s[i] == '1': a.append('1') else: if len(a) != 0: a.pop() print(''.join(a))
[ 7, 15, 13, 15, 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, 4, 18, 13, 13, 0, 13, 17, 28, 13, 13, 0, 13, 13, 4, 13, 13, 4, 13, 10, 12, 13 ]
[ [ 8, 7 ], [ 12, 11 ], [ 15, 14 ], [ 7, 14 ], [ 14, 18 ], [ 11, 22 ], [ 14, 24 ], [ 11, 29 ], [ 11, 33 ], [ 37, 36 ], [ 40, 39 ], [ 11, 39 ], [ 43, 42 ], [ 3...
[ "import math\nfrom datetime import date\n\ndef main():\n\t\t\n\ts = input()\n\tans = []\n\n\tfor c in s:\n\t\tif c != 'B':\n\t\t\tans.append(c)\n\t\telse:\n\t\t\tif len(ans) != 0:\n\t\t\t\tans.pop();\n\n\tline = \"\"\n\tfor c in ans:\n\t\tline += c\n\n\tprint(line)\n\t\nmain()", "import math", "math", "from d...
import math from datetime import date def main(): s = input() ans = [] for c in s: if c != 'B': ans.append(c) else: if len(ans) != 0: ans.pop(); line = "" for c in ans: line += c print(line) main()
[ 7, 0, 13, 4, 13, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 0, 13, 2, 13, 13, 14, 2, 13, 17, 0, 13, 2, 13, 13, 14, 2, 13, 17, 0, 13, 18, 13, 39, 17, 4, 13, 13, 10, 2, 13, 10, 4, 13, 10, 18, 13, 10, 2, 13, 10, 17...
[ [ 46, 2 ], [ 55, 6 ], [ 10, 9 ], [ 47, 9 ], [ 9, 13 ], [ 43, 16 ], [ 56, 18 ], [ 50, 18 ], [ 53, 18 ], [ 44, 18 ], [ 9, 19 ], [ 9, 22 ], [ 52, 25 ], [ 56, ...
[ "x=input()\nz=''\n\nfor i in x:\n if i == '0':\n z= z+i\n elif i == '1':\n z= z+i\n elif i == 'B':\n z= z[:-1]\n\nprint(z) ", "x=input()", "x", "input()", "input", "z=''", "z", "''", "for i in x:\n if i == '0':\n z= z+i\n elif i == '1':\n z= z+i\n elif i == 'B':\n z= z[:-1]"...
x=input() z='' for i in x: if i == '0': z= z+i elif i == '1': z= z+i elif i == 'B': z= z[:-1] print(z)
[ 7, 0, 13, 4, 13, 0, 13, 17, 13, 17, 28, 13, 4, 13, 13, 14, 2, 13, 17, 0, 13, 17, 14, 13, 0, 13, 17, 0, 13, 13, 4, 13, 18, 13, 39, 17, 10, 13, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 52, 2 ], [ 46, 6 ], [ 40, 8 ], [ 12, 11 ], [ 53, 14 ], [ 11, 17 ], [ 43, 20 ], [ 49, 25 ], [ 37, 28 ], [ 11, 29 ], [ 38, 33 ], [ 47, 33 ], [ 11, 37 ], [ 3...
[ "s=input()\nans,skip='',0\nfor c in reversed(s):\n if c=='B':\n skip+=1\n elif skip:\n skip-=1\n else:\n ans+=c\n\nprint(ans[::-1])", "s=input()", "s", "input()", "input", "ans,skip='',0", "ans", "''", "skip", "0", "for c in reversed(s):\n if c=='B':\n ski...
s=input() ans,skip='',0 for c in reversed(s): if c=='B': skip+=1 elif skip: skip-=1 else: ans+=c print(ans[::-1])
[ 7, 12, 13, 0, 13, 4, 13, 0, 13, 39, 28, 13, 13, 14, 40, 13, 17, 4, 18, 13, 13, 13, 14, 4, 13, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 17, 13, 13, 29, 13, 4, 13, 4, 13, 10, 12, 13 ]
[ [ 5, 4 ], [ 9, 8 ], [ 12, 11 ], [ 4, 11 ], [ 11, 15 ], [ 8, 19 ], [ 11, 21 ], [ 8, 25 ], [ 8, 28 ], [ 33, 32 ], [ 8, 37 ], [ 32, 39 ], [ 8, 39 ], [ 46, ...
[ "def solve():\n S = input()\n ans = []\n for s in S:\n if s!='B':\n ans.append(s)\n else:\n if len(ans):\n ans.pop(-1)\n ans = ''.join(ans)\n return ans\nprint(solve())", "def solve():\n S = input()\n ans = []\n for s in S:\n if s!='B':\n ans.append(s)\n else:\n if l...
def solve(): S = input() ans = [] for s in S: if s!='B': ans.append(s) else: if len(ans): ans.pop(-1) ans = ''.join(ans) return ans print(solve())
[ 7, 0, 13, 4, 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, 40, 13, 9, 4, 18, 13, 13, 28, 13, 13, 10, 4, 13, 10, 39, 13 ]
[ [ 42, 2 ], [ 45, 8 ], [ 12, 11 ], [ 43, 11 ], [ 11, 16 ], [ 11, 19 ], [ 46, 23 ], [ 11, 25 ], [ 11, 28 ], [ 46, 32 ], [ 46, 36 ], [ 40, 39 ], [ 46, 39 ], [ ...
[ "S = str(input())\n\nstack = []\n\nfor s in S:\n if s == '0' or s == '1':\n stack.append(s)\n elif s == 'B':\n if not stack:\n continue\n else:\n stack.pop()\n\nfor s in stack:print(s,end='')", "S = str(input())", "S", "str(input())", "str", "input()", "i...
S = str(input()) stack = [] for s in S: if s == '0' or s == '1': stack.append(s) elif s == 'B': if not stack: continue else: stack.pop() for s in stack:print(s,end='')
[ 7, 0, 13, 4, 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, 18, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 40, 2 ], [ 49, 8 ], [ 12, 11 ], [ 41, 11 ], [ 11, 15 ], [ 46, 18 ], [ 11, 22 ], [ 43, 25 ], [ 37, 28 ], [ 50, 30 ], [ 38, 30 ], [ 44, 30 ], [ 47, 30 ], [ ...
[ "s = list(input())\nans = \"\"\nfor i in s:\n if i == \"0\":\n ans += \"0\"\n elif i == \"1\":\n ans += \"1\"\n else:\n ans = ans[:-1]\nprint(ans)", "s = list(input())", "s", "list(input())", "list", "input()", "input", "ans = \"\"", "ans", "\"\"", "for i in s:\n if i == \"0\":\n ...
s = list(input()) ans = "" for i in s: if i == "0": ans += "0" elif i == "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, 0, 13, 18, 13, 39, 17, 4, 13, 13, 10, 13, 13, 10, 4, 13, 10, 18, 13, 10, 17, 13 ]
[ [ 31, 2 ], [ 37, 6 ], [ 10, 9 ], [ 32, 9 ], [ 9, 13 ], [ 28, 16 ], [ 9, 17 ], [ 34, 19 ], [ 38, 21 ], [ 35, 21 ], [ 29, 21 ], [ 35, 26 ], [ 29, 26 ], [ 38, ...
[ "S = input()\n\nret = \"\"\nfor i in S:\n if i != \"B\":\n ret += i\n else:\n ret = ret[:-1]\n\nprint(ret)", "S = input()", "S", "input()", "input", "ret = \"\"", "ret", "\"\"", "for i in S:\n if i != \"B\":\n ret += i\n else:\n ret = ret[:-1]", "i", "S", ...
S = input() ret = "" for i in S: if i != "B": ret += i else: ret = ret[:-1] print(ret)
[ 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, 39, 9, 4, 18, 13, 13, 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, 31 ], [ 45, 39 ], [ 41, 42 ], [ 44, 45 ] ]
[ "s = input()\n\nans = []\n\nfor i in s:\n if i == '1' or i == '0':\n ans.append(i)\n else:\n if ans == []:\n continue\n else:\n ans.pop()\n\nprint(''.join(ans))", "s = input()", "s", "input()", "input", "ans = []", "ans", "[]", "for i in s:\n if i ...
s = input() ans = [] for i in s: if i == '1' or i == '0': ans.append(i) else: if ans == []: continue else: ans.pop() print(''.join(ans))
[ 7, 0, 13, 17, 28, 13, 4, 13, 0, 13, 8, 2, 13, 17, 18, 13, 39, 17, 2, 13, 13, 4, 13, 13, 10, 17, 13, 10, 8, 13 ]
[ [ 25, 2 ], [ 6, 5 ], [ 28, 9 ], [ 5, 12 ], [ 26, 15 ], [ 29, 15 ], [ 26, 19 ], [ 29, 19 ], [ 5, 20 ], [ 29, 23 ], [ 26, 23 ], [ 25, 26 ], [ 28, 29 ] ]
[ "n=''\nfor i in input():\n n=n[:-1] if i == 'B' else n+i\nprint(n)", "n=''", "n", "''", "for i in input():\n n=n[:-1] if i == 'B' else n+i", "i", "input()", "input", "n=n[:-1] if i == 'B' else n+i", "n", "n[:-1] if i == 'B' else n+i", "i == 'B'", "i", "'B'", "n[:-1]", "n", ":-1...
n='' for i in input(): n=n[:-1] if i == 'B' else n+i print(n)
[ 7, 0, 13, 4, 13, 0, 13, 2, 4, 13, 13, 17, 0, 13, 17, 42, 40, 13, 17, 42, 2, 40, 13, 17, 40, 18, 13, 13, 17, 0, 13, 18, 13, 13, 0, 13, 17, 0, 13, 17, 42, 2, 40, 13, 17, 2, 18, 13, 13, 17, 0, 13, 17, 0, 13, 1...
[ [ 72, 2 ], [ 81, 6 ], [ 73, 10 ], [ 90, 13 ], [ 82, 17 ], [ 76, 17 ], [ 67, 17 ], [ 88, 17 ], [ 82, 22 ], [ 88, 22 ], [ 76, 22 ], [ 67, 22 ], [ 73, 26 ], [ ...
[ "s = input()\ni = len(s) - 1\nres = ''\nwhile i >= 0:\n while i >= 0 and s[i] != 'B':\n res += s[i]\n i -= 1\n cnt = 0\n while i >= 0 and s[i] == 'B':\n i -= 1\n cnt += 1\n i -= cnt\nprint(res[::-1])", "s = input()", "s", "input()", "input", "i = len(s) - 1", "i",...
s = input() i = len(s) - 1 res = '' while i >= 0: while i >= 0 and s[i] != 'B': res += s[i] i -= 1 cnt = 0 while i >= 0 and s[i] == 'B': i -= 1 cnt += 1 i -= cnt print(res[::-1])
[ 7, 0, 13, 4, 13, 0, 13, 39, 28, 13, 13, 14, 2, 13, 17, 14, 13, 4, 18, 13, 13, 13, 4, 13, 4, 18, 17, 13, 13, 10, 39, 13, 10, 4, 13 ]
[ [ 33, 2 ], [ 30, 6 ], [ 10, 9 ], [ 34, 9 ], [ 9, 13 ], [ 31, 19 ], [ 9, 21 ], [ 31, 28 ], [ 30, 31 ], [ 33, 34 ] ]
[ "S = input()\n\nans = []\nfor c in S:\n if c=='B':\n if ans: 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: ans.pop()\n else:\n ans.append(c)", "c"...
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, 39, 28, 13, 13, 14, 2, 13, 17, 14, 2, 4, 13, 13, 17, 4, 18, 13, 13, 4, 18, 13, 13, 13, 4, 13, 4, 18, 17, 13, 13, 10, 4, 13, 10, 39, 13 ]
[ [ 38, 2 ], [ 41, 6 ], [ 10, 9 ], [ 39, 9 ], [ 9, 13 ], [ 42, 19 ], [ 42, 23 ], [ 42, 27 ], [ 9, 29 ], [ 42, 36 ], [ 38, 39 ], [ 41, 42 ] ]
[ "s = input()\nans = []\nfor c in s:\n if c == 'B':\n if len(ans) > 0:\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 len(ans) > 0:\n ans.p...
s = input() ans = [] for c in s: if c == 'B': if len(ans) > 0: ans.pop() else: ans.append(c) print(''.join(ans))