s_id stringlengths 10 10 | p_id stringlengths 6 6 | u_id stringlengths 10 10 | date stringlengths 10 10 | language stringclasses 1
value | original_language stringclasses 11
values | filename_ext stringclasses 1
value | status stringclasses 1
value | cpu_time int64 0 100 | memory stringlengths 4 6 | code_size int64 15 14.7k | code stringlengths 15 14.7k | problem_id stringlengths 6 6 | problem_description stringlengths 358 9.83k | input stringlengths 2 4.87k | output stringclasses 807
values | __index_level_0__ int64 1.1k 1.22M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s179636021 | p04030 | u124843595 | 1515832445 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 138 | s = list(input())
r = ""
for c in s:
if c == "B":
if r != "":
r = r[:len(r) - 1]
else:
r += c
print(r) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,381 |
s038689597 | p04030 | u075012704 | 1515540549 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 199 | S = input()
ans = []
for s in S:
if (s == "B") & (len(ans) != 0):
del ans[-1]
elif s == "1":
ans.append("1")
elif s == "0":
ans.append("0")
print("".join(ans))
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,382 |
s063838584 | p04030 | u778700306 | 1515388516 | Python | Python (3.4.3) | py | Accepted | 18 | 2940 | 122 |
cmd = input()
now = ""
for c in cmd:
if c == 'B':
now = now[:-1]
else:
now = now + c
print(now) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,383 |
s694383365 | p04030 | u136090046 | 1515174169 | Python | Python (3.4.3) | py | Accepted | 19 | 3064 | 204 | val = list(input())
res = []
for i in val:
if i == "0":
res.append("0")
elif i == "1":
res.append("1")
else:
if len(res) != 0:
res.pop()
print("".join(res)) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,384 |
s451996591 | p04030 | u143492911 | 1514439729 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 316 | s=list(input())
total=[]
for i in range(len(s)):
if s[i]=="0":
total.append(0)
if s[i]=="1":
total.append(1)
if s[i]=="B":
if len(total)==0:
continue
else:
total.pop()
total_i=""
for i in range(len(total)):
total_i+=str(total[i])
print(total_i) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,385 |
s165844421 | p04030 | u550574002 | 1514383701 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 95 | s=input()
for _ in [0]*4:
s=s.replace("1B","")
s=s.replace("0B","")
print(s.strip("B")) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,386 |
s465905450 | p04030 | u942033906 | 1514337521 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 167 | S = input()
s = ['' for c in S]
i = 0
for c in S:
if c == '0' or c == '1':
s[i] = c
i += 1
else:
if i > 0:
i -= 1
s[i]=''
print(''.join(s)) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,387 |
s104124808 | p04030 | u621935300 | 1514140045 | Python | Python (2.7.6) | py | Accepted | 10 | 2568 | 110 | s=raw_input()
a=[]
for i in s:
if i!="B":
a.append(i)
else:
if len(a)!=0:
a.pop(-1)
print ''.join(a) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,388 |
s969672833 | p04030 | u558836062 | 1514004966 | Python | Python (3.4.3) | py | Accepted | 18 | 2940 | 229 | s = input()
Ans = []
for i in range(len(s)):
if s[i] == "0":
Ans.append("0")
if s[i] == "1":
Ans.append("1")
if s[i] == "B":
if len(Ans) == 0:
continue
else:
del Ans[-1]
a = ''.join(Ans)
print(a)
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,389 |
s230659004 | p04030 | u825528847 | 1513705351 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 161 | s = input()
ans = ""
for c in s:
if c == "0":
ans += "0"
elif c == "1":
ans += "1"
elif ans != "":
ans = ans[:-1]
print(ans)
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,390 |
s574623107 | p04030 | u136869985 | 1512596389 | Python | Python (3.4.3) | py | Accepted | 17 | 3064 | 516 | def main():
S = list(input())
A = []
for s in S:
if s == "B":
if len(A) == 0:
pass
else:
A.pop()
elif s == "0":
A.append("0")
elif s == "1":
A.append("1")
if len(A) == 0:
print("")
... | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,391 |
s740996686 | p04030 | u966000628 | 1512276405 | Python | Python (2.7.6) | py | Accepted | 11 | 2568 | 207 | words = raw_input()
inlis = list(words)
outlis = []
for item in inlis:
if item == "0" or item == "1":
outlis.append(item)
elif item == "B":
if outlis:
outlis.pop(len(outlis)-1)
print "".join(outlis) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,392 |
s233921834 | p04030 | u813450984 | 1511546337 | Python | Python (3.4.3) | py | Accepted | 18 | 3064 | 176 | s = input()
li = []
for i in s:
if i == "0":
li.append('0')
elif i == "1":
li.append('1')
elif i == "B" and not len(li) == 0:
li.pop(-1)
print("".join(li))
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,393 |
s169303592 | p04030 | u863370423 | 1510775811 | Python | Python (3.4.3) | py | Accepted | 18 | 2940 | 101 | s = input()
r = ""
for c in s:
if c == "B":
r = r[:-1]
else:
r += c
print(r) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,394 |
s667352743 | p04030 | u598016178 | 1509682332 | Python | Python (3.4.3) | py | Accepted | 18 | 2940 | 78 | a=[]
for c in input():
if"B"==c:a==[]or a.pop()
else:a+=c,
print(''.join(a)) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,395 |
s607592438 | p04030 | u598016178 | 1509681261 | Python | Python (3.4.3) | py | Accepted | 18 | 2940 | 78 | a=[]
for c in input():
if"B"==c:a==[]or a.pop()
else:a+=c,
print(''.join(a)) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,396 |
s377061157 | p04030 | u598016178 | 1509678940 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 78 | a=[]
for c in input():
if"B"==c:a==[]or a.pop()
else:a+=c,
print(''.join(a)) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,397 |
s017687105 | p04030 | u665415433 | 1509675107 | Python | Python (3.4.3) | py | Accepted | 18 | 3060 | 212 | ans = []
s = input()
for i in range(len(s)):
if s[i] is '0':
ans.append('0')
elif s[i] is '1':
ans.append('1')
else:
if len(ans) != 0:
ans.pop()
print(''.join(ans)) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,398 |
s825464447 | p04030 | u055459962 | 1509047764 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 306 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""043-b"""
import sys
def main():
"""Main function."""
s = input()
res = ""
for c in s:
if c == 'B':
res = res[:-1]
else:
res += c
print(res)
if __name__ == '__main__':
sys.exit(main()) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,399 |
s329094638 | p04030 | u252745826 | 1508447233 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 156 | s = input()
line = ""
for c in s:
if c == "0" or c == "1":
line += c
elif c == "B" and len(line) != 0:
line = line[:-1]
print(line)
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,400 |
s974230798 | p04030 | u425351967 | 1508271287 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 168 | s = input()
res = ""
for w in s:
if w == '0':
res += "0"
elif w == '1':
res += "1"
elif w == 'B' and len(res) != 0:
res = res[:len(res)-1]
print(res) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,401 |
s783453322 | p04030 | u190405389 | 1507780022 | Python | Python (3.4.3) | py | Accepted | 18 | 2940 | 121 | s = input()
a = ''
for i in range(len(s)):
if s[i] == 'B':
a = a[:-1]
else:
a += s[i]
print(a) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,402 |
s454586487 | p04030 | u254456372 | 1507757157 | Python | Python (3.4.3) | py | Accepted | 20 | 3064 | 232 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
def main():
S = input()
T = ""
for c in S:
if c == "B":
T = T[:-1]
else:
T += c
print(T)
if __name__ == "__main__": main()
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,403 |
s502272968 | p04030 | u663710122 | 1506619443 | Python | Python (3.4.3) | py | Accepted | 18 | 2940 | 144 | S = input()
ret = []
for s in S:
if s == 'B':
if len(ret):
ret.pop()
else:
ret.append(s)
print(''.join(ret)) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,404 |
s404960894 | p04030 | u772180901 | 1506352687 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 154 | s = list(input())
ans = ""
for i in s:
if i == "0" or i == "1":
ans += i
elif i == "B" and len(ans) > 0:
ans = ans[:-1]
print(ans) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,405 |
s499072104 | p04030 | u525441048 | 1505604501 | Python | Python (3.4.3) | py | Accepted | 16 | 2940 | 175 | S = input()
array = []
for w in S:
if w == "B" and len(array):
array.pop()
elif w != "B":
array.append(w)
for w in array:
print(w, end="")
print()
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,406 |
s221714741 | p04030 | u367393577 | 1505102152 | Python | Python (3.4.3) | py | Accepted | 17 | 3064 | 218 | # coding: utf-8
# Here your code !
# coding: utf-8
# Here your code !
str =""
for i in input():
if i is '0':
str+="0"
elif i =='1':
str+="1"
else:
str = str[:-1]
print(str)
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,407 |
s941440208 | p04030 | u182096840 | 1504451632 | Python | Python (2.7.6) | py | Accepted | 10 | 2568 | 150 | a = raw_input()
ans = ''
for x in a:
if x == '0':
ans += '0'
if x == '1':
ans += '1'
if x == 'B':
if ans != '':
ans = ans [:-1]
print(ans) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,408 |
s437660272 | p04030 | u364386647 | 1503952135 | Python | Python (3.4.3) | py | Accepted | 20 | 3316 | 297 | from collections import deque
s = str(input())
b = deque()
for i in range(len(s)):
if s[i] == "0":
b.append("0")
elif s[i] == "1":
b.append("1")
elif s[i] == "B":
if len(b) == 0:
pass
else:
b.pop()
print("".join(map(str, b)))
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,409 |
s590603503 | p04030 | u276192130 | 1503783460 | Python | Python (3.4.3) | py | Accepted | 18 | 2940 | 156 | s = list(input())
ans = []
for i in s:
if i == 'B':
if len(ans) != 0:
ans.pop()
else:
ans.append(i)
print(''.join(ans))
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,410 |
s774175636 | p04030 | u667084803 | 1503490146 | Python | Python (3.4.3) | py | Accepted | 16 | 2940 | 115 | s=str(input())
while "B" in s:
if s[0] == "B":
s=s[1:]
s=s.replace("0B","")
s=s.replace("1B","")
print(s) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,411 |
s361506608 | p04030 | u255555420 | 1503286801 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 241 | s=input()
N=len(s)
L=[]
for i in range(N):
if s[i]=='0':
L.append('0')
elif s[i]=='1':
L.append('1')
elif s[i]=='B':
if L==[]:
pass
else:
del L[-1]
A=''.join(L)
print(A) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,412 |
s200312802 | p04030 | u650245944 | 1502856417 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 148 | s = list(input())
L = []
for i in s:
if i != "B":
L.append(i)
else:
if len(L) >= 1:
L.pop()
else:
pass
print(''.join(L)) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,413 |
s158447959 | p04030 | u355254193 | 1502037700 | Python | Python (2.7.6) | py | Accepted | 11 | 2568 | 233 | S = list(raw_input())
result = []
for s in S:
if s == "0":
result.append(0)
elif s == "1":
result.append(1)
elif s == "B":
if len(result) != 0:
result.pop(len(result)-1)
txt = ""
for r in result:
txt += str(r)
print txt
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,414 |
s448020805 | p04030 | u596276291 | 1501773439 | Python | Python (3.4.3) | py | Accepted | 20 | 3316 | 275 | from collections import defaultdict
def main():
s = input()
ans = ""
for c in s:
if c in ["0", "1"]:
ans += c
elif c == "B" and len(ans) > 0:
ans = ans[:len(ans) - 1]
print(ans)
if __name__ == '__main__':
main()
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,415 |
s609594532 | p04030 | u839537730 | 1501086866 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 231 | S = input()
ans = ""
for i in range(len(S)):
if S[i] == 'B':
if len(ans) > 0:
ans = ans[:-1]
elif S[i] == '0':
ans = ans + "0"
elif S[i] == '1':
ans = ans + "1"
print(ans) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,416 |
s359632581 | p04030 | u996252264 | 1500661005 | Python | Python (3.4.3) | py | Accepted | 17 | 3064 | 393 | def ri(): return int(input())
def rli(): return list(map(int, input().split()))
def rls(): return list(input())
def pli(a): return "".join(list(map(str, a)))
s = rls()
ans = ["" for i in s]
idx = 0
for i in s:
if(i == "B"):
idx -= 1
if(idx == -1):
idx += 1
else:
ans[... | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,417 |
s085694662 | p04030 | u788681441 | 1500580610 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 228 | # coding: utf-8
stack = []
for i in input():
if i=='0':
stack.append(0)
elif i=='1':
stack.append(1)
else:
if(len(stack)>0):
stack.pop()
[print(s, end='') for s in stack]
print() | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,418 |
s417870281 | p04030 | u214380782 | 1500429473 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 228 | s = input()
output = []
for i in range(len(s)):
if s[i] != 'B':
output.append(s[i])
else:
if '0' in output or '1' in output:
del output[-1]
cout = ''
for x in output:
cout += x
print(cout) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,419 |
s611834795 | p04030 | u218984487 | 1500323417 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 274 | s = list(map(str, input()))
l = len(s)
li = []
for i in range(l):
if s[i] == "0":
li.append(0)
elif s[i] == "1":
li.append(1)
elif s[i] == "B" and li != []:
li_len = len(li)
li.pop(li_len-1)
ans = "".join(map(str, li))
print(ans)
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,420 |
s650294639 | p04030 | u946386741 | 1498241684 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 154 | S = list(input())
result = []
for s in S:
if s in ("0", "1"):
result.append(s)
elif result:
result.pop()
print("".join(result)) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,421 |
s563487691 | p04030 | u809670194 | 1497397954 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 239 | s = input()
sl=[]
for i in s:
if i == "0":
sl.append("0")
if i == "1":
sl.append("1")
if i == "B":
if sl == []:
continue
else:
sl.pop()
for i in sl:
print(i, end = "") | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,422 |
s466247969 | p04030 | u761320129 | 1497327112 | Python | Python (2.7.6) | py | Accepted | 11 | 2568 | 151 | s = raw_input()
chars = []
for c in s:
if c == 'B' :
if len(chars) > 0: chars.pop()
else:
chars.append(c)
print ''.join(chars)
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,423 |
s808435519 | p04030 | u125205981 | 1497179847 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 236 | def main():
S = input()
ans = []
for s in S:
if s == 'B':
try:
ans.pop()
except:
pass
else:
ans.append(s)
print(''.join(ans))
main()
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,424 |
s813289471 | p04030 | u172773620 | 1496070603 | Python | Python (3.4.3) | py | Accepted | 19 | 3060 | 216 | s = list(input())
new_list = ""
for i in s:
if i != 'B':
new_list +=i
else:
if(len(new_list) >= 2):
new_list = new_list[:-1]
else:
new_list = ""
print(new_list) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,425 |
s600901902 | p04030 | u879309973 | 1495709505 | Python | Python (2.7.6) | py | Accepted | 10 | 2568 | 173 | s = list(raw_input())
ans = []
for c in s:
if (c == "0") or (c == "1"):
ans.append(c)
else:
if len(ans) > 0:
ans.pop()
print "".join(ans) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,426 |
s397833874 | p04030 | u481333386 | 1493348329 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 386 | # -*- coding: utf-8 -*-
def list_n():
return [int(e) for e in input().split()]
def list_s():
return [s for e in input().split()]
def main(s):
ret = []
for c in s:
if c in ['0', '1']:
ret.append(c)
else:
if ret:
ret.pop()
return ''.join(ret... | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,427 |
s930972941 | p04030 | u058240079 | 1493307687 | Python | Python (2.7.6) | py | Accepted | 10 | 2568 | 129 | s = raw_input()
t = ''
for c in s:
if c == 'B':
if t != '':
t = t[0:-1]
else:
t += c
print t
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,428 |
s415544195 | p04030 | u192442087 | 1492811137 | Python | Python (3.4.3) | py | Accepted | 18 | 3064 | 237 | S = list(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):
del a[-1]
kotae = ""
for i in range(len(a)):
kotae += a[i]
print(kotae) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,429 |
s129348103 | p04030 | u790865353 | 1492508236 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 151 | s=str(input())
u=''
for i in range(0,len(s)):
if s[i]=='0':
u=u+'0'
elif s[i]=='1':
u=u+'1'
else:
u=u[:-1]
print(u) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,430 |
s444843798 | p04030 | u379559362 | 1491148015 | Python | Python (3.4.3) | py | Accepted | 18 | 3060 | 170 | s = list(input())
ans = str()
for i in s:
if i == "0":
ans += "0"
elif i == "1":
ans += "1"
elif i == "B":
ans = ans[:-1]
print(ans) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,431 |
s561097612 | p04030 | u319818166 | 1490894627 | Python | Python (2.7.6) | py | Accepted | 11 | 2568 | 164 | input = str(raw_input())
ans = []
for word in input:
if word == 'B' > 0:
if len(ans) == 0:
continue
ans.pop()
else:
ans.append(word)
print ''.join(ans)
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,432 |
s379993691 | p04030 | u559722042 | 1490084997 | Python | Python (3.4.3) | py | Accepted | 19 | 3064 | 115 | s = input()
ans = ""
for c in s:
if c == 'B':
ans = ans[:-1]
else:
ans = ans + c
print(ans) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,433 |
s001299602 | p04030 | u976966750 | 1490049569 | Python | Python (2.7.6) | py | Accepted | 10 | 2568 | 150 | l=raw_input()
s=''
for i in l:
if i=='B' :
if len(s)>0:
s=s[:-1]
else:
pass
else:
s+=i
print s | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,434 |
s140877945 | p04030 | u912359563 | 1489754384 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 125 | S = input()
ans=[]
for c in S:
if c == 'B':
if len(ans) > 0:
ans.pop()
else:
ans.append(c)
s = ''.join(ans)
print(s) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,435 |
s889416540 | p04030 | u332385682 | 1488483589 | Python | Python (3.4.3) | py | Accepted | 17 | 3060 | 466 | import sys
def debug(x, table):
for name, val in table.items():
if x is val:
print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr)
return None
def solve():
s = input()
stack = []
for c in s:
if c == 'B':
if stack:
stack.pop()
... | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,436 |
s566740373 | p04030 | u622011073 | 1487379078 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 68 | a=''
for x in input():
if x=='B':a=a[:-1]
else:a+=x
print(a) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,437 |
s242863707 | p04030 | u584355711 | 1487309219 | Python | Python (3.4.3) | py | Accepted | 17 | 2940 | 254 | # -*- coding: utf-8 -*-
def main():
str=input()
ans=""
for c in str:
if(c=='B' and ans!=""):
ans=ans[:-1]
elif(c!='B'):
ans+=c
print(ans)
if __name__=="__main__":
main()
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,438 |
s307567741 | p04030 | u045939752 | 1486754386 | Python | Python (3.4.3) | py | Accepted | 23 | 3064 | 73 | s=''
for c in input():
if c == 'B': s = s[0:-1]
else: s += c
print(s) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,439 |
s321237212 | p04030 | u846552659 | 1486591019 | Python | Python (3.4.3) | py | Accepted | 23 | 3064 | 203 | # -*- coding:utf-8 -*-
s = list(input())
ans = []
for tmp in range (len(s)):
if s[tmp] == '0' or s[tmp] == '1':
ans.append(s[tmp])
elif len(ans) > 0:
ans.pop()
print(''.join(ans)) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,440 |
s126661103 | p04030 | u107077660 | 1485474183 | Python | Python (3.4.3) | py | Accepted | 23 | 3064 | 110 | s = input()
ans = ""
for l in s:
if l == "B":
ans = ans[:-1]
else:
ans += l
print(ans) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,441 |
s883773518 | p04030 | u012693733 | 1484631381 | Python | Python (2.7.6) | py | Accepted | 16 | 2568 | 317 | s = raw_input()
x = []
for i in s:
if len(x) > 0:
if i == '0':
x.append('0')
elif i == '1':
x.append('1')
elif i == 'B':
x.pop()
else:
if i == '0':
x.append('0')
elif i == '1':
x.append('1')
print ''.join(x)
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,442 |
s596388711 | p04030 | u742897895 | 1484625621 | Python | Python (3.4.3) | py | Accepted | 23 | 3064 | 230 | s = list(input())
ans = [""] * 10
index = 0
for ss in s:
if ss != "B":
ans[index] = ss
index += 1
else:
ans[index] = ""
index = max(0, index - 1)
ans[index] = ""
print("".join(ans)) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,443 |
s239586089 | p04030 | u614550445 | 1484524190 | Python | Python (3.4.3) | py | Accepted | 23 | 3064 | 217 | s = input()
ans = []
for i in range(len(s)):
if s[i] == '0':
ans.append('0')
elif s[i] == '1':
ans.append('1')
elif s[i] == 'B' and not len(ans) == 0:
ans.pop()
print(''.join(ans)) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,444 |
s635569879 | p04030 | u423925725 | 1483374809 | Python | Python (3.4.3) | py | Accepted | 23 | 3064 | 246 | # coding: utf-8;
def main():
s = input()
ans = ''
for i, c in enumerate(s):
if c == '1' or c == '0':
ans += c
elif i > 0:
ans = ans[:-1]
print(ans)
if __name__ == '__main__':
main()
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,445 |
s258412169 | p04030 | u646352133 | 1483103572 | Python | Python (3.4.3) | py | Accepted | 23 | 3064 | 143 | s = list(input())
ans= []
for c in s:
if c == 'B':
if ans != []:
ans.pop()
else:
continue
else:
ans.append(c)
print(*ans,sep='')
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,446 |
s954530356 | p04030 | u386131832 | 1483078312 | Python | Python (3.4.3) | py | Accepted | 23 | 3064 | 133 | s=input()
sum=""
for i in s:
if i=="0" or i=="1":
sum+=i
elif len(sum) != 0:
sum=sum[0:len(sum)-1]
print(sum) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,447 |
s463257353 | p04030 | u580920947 | 1482718392 | Python | Python (3.4.3) | py | Accepted | 22 | 3064 | 200 | # -*- coding: utf-8 -*-
# problem B
s = list(input())
l = []
for i in s:
if i == "0" or i == "1":
l.append(i)
elif len(l) > 0:
l.pop()
else:
pass
print("".join(l)) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,448 |
s256998167 | p04030 | u637175065 | 1482706741 | Python | Python (3.4.3) | py | Accepted | 50 | 5424 | 312 | import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time
sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7
def main():
s = input()
r = ''
for c in s:
if c == 'B':
r = r[:-1]
else:
r += c
return r
print(main())
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,449 |
s097693216 | p04030 | u942697937 | 1482474413 | Python | Python (2.7.6) | py | Accepted | 17 | 2568 | 131 | S = raw_input()
w = ""
for c in S:
if c == "B":
if len(w) > 0:
w = w[:-1]
else:
w += c
print w
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,450 |
s438396009 | p04030 | u333917945 | 1480892653 | Python | Python (3.4.3) | py | Accepted | 23 | 3064 | 186 | s = list(input())
ans = ""
for i in s:
if i == "0":
ans = ans + "0"
elif i == "1":
ans = ans + "1"
elif i == "B":
ans = ans[:len(ans)-1]
print(ans)
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,451 |
s851401642 | p04030 | u596276291 | 1480864248 | Python | Python (3.4.3) | py | Accepted | 24 | 3064 | 251 | def main():
s = input()
ans = ""
for c in s:
if c == "0":
ans += "0"
elif c == "1":
ans += "1"
elif c == "B":
ans = ans[:-1]
print(ans)
if __name__ == '__main__':
main()
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,452 |
s832424735 | p04030 | u493916575 | 1480047806 | Python | Python (3.4.3) | py | Accepted | 23 | 3064 | 147 | s = input()
str = ""
for i in s:
if i == "B":
if len(str) != 0:
str = str[0:-1]
else:
str += i
print(str)
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,453 |
s343864225 | p04030 | u043805613 | 1479667126 | Python | Python (2.7.6) | py | Accepted | 17 | 2568 | 157 | S=list(str(raw_input()))
res=[]
for i in S:
if(i=="B"):
if(len(res)>0):
res.pop()
else:
res.append(i)
print ''.join(res) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,454 |
s997824596 | p04030 | u596276291 | 1479566224 | Python | Python (3.4.3) | py | Accepted | 23 | 3064 | 206 | def main():
s = input()
ans = ""
for c in s:
if c == "0" or c == "1":
ans += c
else:
ans = ans[:-1]
print(ans)
if __name__ == '__main__':
main()
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,455 |
s396343386 | p04030 | u831695469 | 1478938557 | Python | Python (3.4.3) | py | Accepted | 24 | 3064 | 192 | s = input()
ans = []
for si in s:
if si == "0":
ans.append('0')
elif si == "1":
ans.append('1')
elif si == 'B' and len(ans):
ans.pop()
print("".join(ans))
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,456 |
s213264374 | p04030 | u582243208 | 1477952167 | Python | Python (3.4.3) | py | Accepted | 22 | 3064 | 154 | s=input()
ans=""
for i in range(len(s)):
if s[i]=='0':
ans+='0'
elif s[i]=='1':
ans+='1'
else:
ans=ans[:-1]
print(ans) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,457 |
s982571452 | p04030 | u354630369 | 1477811263 | Python | Python (2.7.6) | py | Accepted | 17 | 2568 | 225 | s = raw_input()
str_list = list(s)
output_list = []
for i, c in enumerate(str_list):
if c != 'B':
output_list.append(c)
else:
if output_list:
output_list.pop()
print ''.join(output_list)
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,458 |
s038309431 | p04030 | u117095520 | 1477672568 | Python | Python (2.7.6) | py | Accepted | 17 | 2696 | 142 | s = raw_input()
ans = ''
for c in s:
if c == 'B':
if len(ans) > 0:
ans = ans[:-1]
else:
ans += c
print ans | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,459 |
s343928483 | p04030 | u386349298 | 1477661904 | Python | Python (3.4.3) | py | Accepted | 23 | 3064 | 238 | data = str(input())
res = []
for char in data:
if char == '0':
res.append('0')
elif char == '1':
res.append('1')
else:
try:
res.pop()
except:
continue
print("".join(res)) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,460 |
s473913760 | p04030 | u425448230 | 1477609613 | Python | Python (3.4.3) | py | Accepted | 23 | 3192 | 159 | #B
S = input()
ans = []
for s in S:
if s =='B' and len(ans)>0:
del ans[-1]
elif s == '1' or s == '0':
ans.append(s)
print("".join(ans)) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,461 |
s578447287 | p04030 | u272028993 | 1476759031 | Python | Python (2.7.6) | py | Accepted | 16 | 2568 | 219 | s=raw_input()
ans=""
for i in xrange(len(s)):
if s[i]=="0":
ans+="0"
elif s[i]=="1":
ans+="1"
else:
if ans=="":
continue
else:
ans=ans[0:-1]
print ans
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,462 |
s215570312 | p04030 | u471797506 | 1476589896 | Python | Python (2.7.6) | py | Accepted | 38 | 4496 | 225 | # -*- coding: utf-8 -*-
import sys,copy,math,heapq,itertools as it,fractions,re,bisect,collections as coll
s = raw_input()
ans = ""
for si in s:
if si == "B":
ans = ans[:-1]
else:
ans += si
print ans
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,463 |
s516959266 | p04030 | u135521563 | 1475881129 | Python | Python (3.4.3) | py | Accepted | 23 | 3064 | 150 | s = input()
ans = ''
for c in s:
if c == "0" or c == "1":
ans += c
elif c == "B" and len(ans) > 0:
ans = ans[:-1]
print(ans) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,464 |
s888339568 | p04030 | u104418672 | 1475717730 | Python | Python (3.4.3) | py | Accepted | 24 | 3064 | 217 | s = list(input())
ans = []
for i in s:
if i == "1" or i == "0":
ans.append(i)
else:
try:
ans.pop()
except:
pass
for i in ans:
print(i, end = "")
print("")
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,465 |
s298124519 | p04030 | u065683101 | 1475459518 | Python | Python (3.4.3) | py | Accepted | 23 | 3192 | 291 | def read():
return int(input())
def reads(sep=None):
return list(map(int, input().split(sep)))
def main():
s = input()
a = []
for c in s:
if c == 'B':
if a:
a.pop()
else:
a.append(c)
print(''.join(a))
main()
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,466 |
s117546142 | p04030 | u608854150 | 1473877922 | Python | Python (3.4.3) | py | Accepted | 39 | 3064 | 147 | s = input()
ans = []
for i in s:
if i == "0":
ans.append("0")
elif i == "1":
ans.append("1")
elif ans != []:
ans.pop()
print("".join(ans)) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,467 |
s911535701 | p04030 | u108617242 | 1473656046 | Python | Python (3.4.3) | py | Accepted | 42 | 3188 | 134 | S = input()
R = list()
for x in S:
if x == "B" and len(R) != 0:
R.pop()
elif x == "0" or x == "1":
R.append(x)
print("".join(R)) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,468 |
s464058420 | p04030 | u098968285 | 1473620755 | Python | Python (3.4.3) | py | Accepted | 40 | 3064 | 220 | s = input()
i = 0
ans = ['0']*(len(s))
for c in s:
if c == '0':
ans[i] = '0'
i += 1
elif c == '1':
ans[i] = '1'
i += 1
elif c == 'B':
if i > 0:
i -= 1
for i in range(i):
print(ans[i], end='')
print()
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,469 |
s699340933 | p04030 | u494611468 | 1473434072 | Python | Python (3.4.3) | py | Accepted | 41 | 3064 | 179 | result = []
key = input()
for i in key:
if i == '0':
result.append('0')
elif i == '1':
result.append('1')
elif i == 'B':
if result:
result.pop()
print(''.join(result)) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,470 |
s941261938 | p04030 | u284188208 | 1473351371 | Python | Python (2.7.6) | py | Accepted | 28 | 2568 | 163 | a = raw_input()
b = []
for i in a:
if i == "0":
b.append("0")
elif i == "1":
b.append("1")
elif i == "B":
if len(b) != 0:
del b[-1]
print "".join(b)
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,471 |
s314093406 | p04030 | u095015466 | 1473284488 | Python | Python (2.7.6) | py | Accepted | 28 | 2568 | 119 | s = raw_input()
ans = ""
for i in range(len(s)):
if s[i] == "B":
ans = ans[:-1]
else:
ans += s[i]
print ans | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,472 |
s140083713 | p04030 | u550734883 | 1473248652 | Python | Python (3.4.3) | py | Accepted | 40 | 3064 | 133 | S=input()
T=[]
for s in S:
if s=='B':
if len(T)!=0:
del T[-1]
else:
T.append(s)
print(''.join(T)) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,473 |
s999162802 | p04030 | u664031692 | 1473135499 | Python | Python (2.7.6) | py | Accepted | 27 | 2568 | 165 |
s = raw_input()
ret = []
for i in s:
if i == 'B':
if len(ret) != 0:
ret.pop(len(ret)-1)
else:
ret.append(i)
print "".join(ret) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,474 |
s100052815 | p04030 | u816175360 | 1473133939 | Python | Python (3.4.3) | py | Accepted | 38 | 3064 | 135 | seq=input()
s=[]
for i in seq:
if i=='B':
if len(s)>0:
s.pop()
else:
s.append(i)
print(''.join(s))
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,475 |
s571320924 | p04030 | u544337787 | 1473125338 | Python | Python (2.7.6) | py | Accepted | 26 | 2568 | 179 | s = raw_input()
ans = []
for ele in s:
if ele != "B":
ans.append(ele)
else:
try:
ans.pop()
except:
pass
print "".join(ans)
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,476 |
s334963161 | p04030 | u482544950 | 1473121980 | Python | Python (3.4.3) | py | Accepted | 38 | 3064 | 119 | s = input()
idx = 0
ans = ''
for c in s:
if c == 'B':
ans = ans[:-1]
else:
ans += c
print(ans)
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,477 |
s384446447 | p04030 | u712335892 | 1472961880 | Python | Python (3.4.3) | py | Accepted | 40 | 3064 | 262 | s = list(map(str, input()))
display = []
for action in s:
if action == '0':
display.append('0')
elif action == '1':
display.append('1')
elif action == 'B':
if len(display) > 0:
display.pop()
print(''.join(display)) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,478 |
s717162040 | p04030 | u357487020 | 1472960890 | Python | Python (2.7.6) | py | Accepted | 29 | 2568 | 232 | s=raw_input()
n=len(s)
ans=[]
for i in xrange(n):
if s[i]=="B" and ans==[]:
continue
if s[i]=="B":
del ans[-1]
elif s[i]=="0":
ans.append("0")
else:
ans.append("1")
print("".join(ans)) | p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,479 |
s152897549 | p04030 | u030110634 | 1472784618 | Python | Python (3.4.3) | py | Accepted | 38 | 3064 | 151 | ans = []
for c in input():
try:
if c == 'B': ans.pop()
else: ans.append(c)
except IndexError:
pass
print(''.join(ans))
| p04030 | <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has <var>3</var> keys on it: the <code>0</code> key, the <code>1</code> key and the backspace key.</p>
<p>To begin wi... | 01B0
| 00
| 1,206,480 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.