TnT/CodeNet4Repair huggingface dataset:
Problem:
In the beginning, Takahashi has A cookies, and Aoki has B cookies. They will perform the following operation alternately, starting from Takahashi:    * If the number of cookies in his hand is odd, eat one of those cookies; if the number is even, do nothing. Then, give one-half of the cookies in his hand to the other person.  Find the numbers of cookies Takahashi and Aoki respectively have after performing K operations in total.

Incorrect submission (verdict: Wrong Answer):
A, B, K = map(int,input().split())
for i in range(K):
  if i % 2 == 0:
    if A % 2 == 1:
      A -= 1
    B += A // 2
  else:
    if B % 2 == 1:
      B -= 1
    A += B // 2
print(A,B)

Fixed, accepted submission:
A, B, K = map(int,input().split())
for i in range(K):
  if i % 2 == 0:
    if A % 2 == 1:
      A -= 1
    A //= 2
    B += A
  else:
    if B % 2 == 1:
      B -= 1
    B //= 2
    A += B
print(A,B)
Problem:
We call a 4-digit integer with three or more consecutive same digits, such as 1118, **good**.  You are given a 4-digit integer N. Answer the question: Is N **good**?

Incorrect submission (verdict: Wrong Answer):
s = str
End = False
S = input()
A,B,C,D = int(S[0]),int(S[1]),int(S[2]),int(S[3])
for i in [B,-1*B]:
    for j in [C,-1*C]:
        for k in [D,-1*D]:
            if A + i + j + k == 7:
                print("{:d}{:+d}{:+d}{:+d}=7".format(A,i,j,k))
                exit()

Fixed, accepted submission:
N = input()
if N[0] == N[1] == N[2] or N[1] == N[2] == N[3]:
    print("Yes")
else:
    print("No")
Problem:
You are given a string S consisting of lowercase English letters. Find the lexicographically (alphabetically) smallest lowercase English letter that does not occur in S. If every lowercase English letter occurs in S, print `None` instead.

Incorrect submission (verdict: Wrong Answer):
flag=1
a=input()
for i in 'abcdefghijklmnopqrstuvwxyz':
  if i in a:flag=0;break
print('None'if flag else i)

Fixed, accepted submission:
flag=1
a=input()
for i in 'abcdefghijklmnopqrstuvwxyz':
  if i not in a:flag=0;break
print('None'if flag else i)
Problem:
There are N positive integers written on a blackboard: A_1, ..., A_N.  Snuke can perform the following operation when all integers on the blackboard are even:    * Replace each integer X on the blackboard by X divided by 2.  Find the maximum possible number of operations that Snuke can perform.

Incorrect submission (verdict: Wrong Answer):
input()
num_list = map(int, input().split())
if(all(x % 2 == 0 for x in num_list)):
    print(0)
else:
    min_num = min(num_list)
    cnt = 0
    while min_num % 2 == 0:
        cnt = cnt + 1
        min_num = int(min_num / 2)
    print(cnt)


Fixed, accepted submission:
input()
A = list(map(int, input().split()))
count = 0
while all(a % 2 == 0 for a in A):
    A = [a/2 for a in A]
    count += 1
print(count)
Problem:
Find the sum of the integers between 1 and N (inclusive), whose sum of digits written in base 10 is between A and B (inclusive).

Incorrect submission (verdict: Wrong Answer):
n, a, b = [int(i) for i in input().split()]
s = 0


def f(x):
	return [int(i) for i in str(x)[:]]

for i in range(n):
	s+= i if a<=sum(f(i))<=b else 0

print( s)

Fixed, accepted submission:
n, a, b = [int(i) for i in input().split()]
s = 0


def f(x):
	return [int(i) for i in str(x)]

for i in range(n+1):
	s+= i if a<=sum(f(i))<=b else 0

print( s)
Problem:
A university student, Takahashi, has to take N examinations and pass all of them. Currently, his _readiness_ for the i-th examination is A_{i}, and according to his investigation, it is known that he needs readiness of at least B_{i} in order to pass the i-th examination.  Takahashi thinks that he may not be able to pass all the examinations, and he has decided to ask a magician, Aoki, to change the readiness for as few examinations as possible so that he can pass all of them, while not changing the total readiness.  For Takahashi, find the minimum possible number of indices i such that A_i and C_i are different, for a sequence C_1, C_2, ..., C_{N} that satisfies the following conditions:    * The sum of the sequence A_1, A_2, ..., A_{N} and the sum of the sequence C_1, C_2, ..., C_{N} are equal.   * For every i, B_i \leq C_i holds.  If such a sequence C_1, C_2, ..., C_{N} cannot be constructed, print -1.

Incorrect submission (verdict: Wrong Answer):
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
if sum(A) < sum(B):
    print(-1)
    quit()
C = []
c = 0
for i in range(N):
    if A[i] < B[i]:
        c += B[i] - A[i]
    else:
        C.append(A[i] - B[i])
C.sort()
while c > 0:
    x = C.pop()
    c -= x
print(len(C))

Fixed, accepted submission:
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
if sum(A) < sum(B):
    print(-1)
    quit()
C = []
c = 0
for i in range(N):
    if A[i] < B[i]:
        c += B[i] - A[i]
    else:
        C.append(A[i] - B[i])
C.sort()
while c > 0:
    x = C.pop()
    c -= x
print(N-len(C))
Problem:
The word `internationalization` is sometimes abbreviated to `i18n`. This comes from the fact that there are 18 letters between the first `i` and the last `n`.  You are given a string s of length at least 3 consisting of lowercase English letters. Abbreviate s in the same way.

Incorrect submission (verdict: Wrong Answer):
moji = str(input())
print(moji[0] + str(len(moji)) + moji[-1]) 

Fixed, accepted submission:
moji = str(input())
print(moji[0] + str(len(moji)-2) + moji[-1])
Problem:
You are parking at a parking lot. You can choose from the following two fee plans:    * Plan 1: The fee will be A×T yen (the currency of Japan) when you park for T hours.   * Plan 2: The fee will be B yen, regardless of the duration.  Find the minimum fee when you park for N hours.

Incorrect submission (verdict: Wrong Answer):
n,a,b=map(int,input().split())
print(max(a*n,b))

Fixed, accepted submission:
n,a,b=map(int,input().split())
print(min(a*n,b))
Problem:
スポーツの大会にはリーグ戦とトーナメント戦があります。サッカーのリーグ戦では勝・負・引分にそれぞれ点数を付け、その勝ち点で順位を競います。勝ち点はそれぞれ勝(3点)、負(0点)、引分(1点)です。  チーム数とリーグ戦の成績を入力とし、成績の良い順(勝ち点の多い順)に並べ替え、チーム名と勝ち点を出力するプログラムを作成してください。勝ち点が同点の場合は入力順に出力してください。

Incorrect submission (verdict: Wrong Answer):
while True:
    n = int(input())
    if n==0:break
    d=dict()
    for _ in range(n):
        t = input().split()
        d[t[0]]=int(t[1])*3+int(t[3])*1
    print()
    for s in sorted(d.items(), key=lambda x:x[1])[::-1]:
        print(s[0]+','+str(s[1]))

Fixed, accepted submission:
b = False
while True:
    n = int(input())
    if n == 0:
        break
    dataset = []
    if b:
        print()
    b = True
    for _ in range(n):
        name, w, l, d = input().split()
        dataset.append((name, 3*int(w) + int(d), n-len(dataset)))
    for name, score, _ in sorted(dataset, key=lambda x: (x[1], x[2]))[::-1]:
        print(name + "," + str(score))
Problem:
Write a program which reads two integers a, b and an operator op, and then prints the value of a op b.  The operator op is '+', '-', '*' or '/' (sum, difference, product or quotient). The division should truncate any fractional part.

Incorrect submission (verdict: Wrong Answer):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

while True:
    a, op, b = input().split()
    a, b = int(a), int(b)

    if op == '?':
        break
    elif op == '+':
        print(a + b)
    elif op == '-':
        print(a - b)
    elif op == '*':
        print(a * b)
    else:
        print(a / b)

Fixed, accepted submission:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

while True:
    a, op, b = input().split()
    a, b = int(a), int(b)

    if op == '?':
        break
    elif op == '+':
        print(a + b)
    elif op == '-':
        print(a - b)
    elif op == '*':
        print(a * b)
    else:
        print(a // b)
Problem:
Takahashi is participating in a programming contest called AXC002, and he has just submitted his code to Problem A.  The problem has N test cases.  For each test case i (1\leq i \leq N), you are given a string S_i representing the verdict for that test case. Find the numbers of test cases for which the verdict is `AC`, `WA`, `TLE`, and `RE`, respectively.  See the Output section for the output format.

Incorrect submission (verdict: Wrong Answer):
N=input()

print(N)

Fixed, accepted submission:
N=int(input())

list=[]
for i in range(N):
    list.append(str(input()))


a = list.count("AC")
b = list.count("WA")
c = list.count("TLE")
d = list.count("RE")

print("AC x "+ str(a))
print("WA x "+ str(b))
print("TLE x "+ str(c))
print("RE x "+ str(d))
Problem:
You went shopping to buy cakes and donuts with X yen (the currency of Japan).  First, you bought one cake for A yen at a cake shop. Then, you bought as many donuts as possible for B yen each, at a donut shop.  How much do you have left after shopping?

Incorrect submission (verdict: Wrong Answer):
x=int(input())
a=int(input())
b=int(input())

s=x-a

k=0

while (s>b):
  s=s-b
  k+=1
  
print(k)

Fixed, accepted submission:
x=int(input())
a=int(input())
b=int(input())

s=x-a


while (s>=b):
  s-=b
  
print(s)
Problem:
An elementary school student Takahashi has come to a variety store.  He has two coins, A-yen and B-yen coins (yen is the currency of Japan), and wants to buy a toy that costs C yen. Can he buy it?  Note that he lives in Takahashi Kingdom, and may have coins that do not exist in Japan.

Incorrect submission (verdict: Wrong Answer):
A, B, C = [int(x) for x in input().split()]
print('Yes') if A + B <= C else print('No')

Fixed, accepted submission:
A, B, C = [int(x) for x in input().split()]
print('Yes') if A + B >= C else print('No')
Problem:
Snuke is going to open a contest named "AtCoder s Contest". Here, s is a string of length 1 or greater, where the first character is an uppercase English letter, and the second and subsequent characters are lowercase English letters.  Snuke has decided to abbreviate the name of the contest as "AxC". Here, x is the uppercase English letter at the beginning of s.  Given the name of the contest, print the abbreviation of the name.

Incorrect submission (verdict: Wrong Answer):
print("A"+input()[8]+"c")

Fixed, accepted submission:
print("A%cC"%input()[8])
Problem:
Given a lowercase English letter c, determine whether it is a vowel. Here, there are five vowels in the English alphabet: `a`, `e`, `i`, `o` and `u`.

Incorrect submission (verdict: Wrong Answer):
en=input()
print(en)
if en=="a"or"e"or"i"or"o"or"u":
  print("vowel")
else:
  print("consonant")

Fixed, accepted submission:
en=input()
if en=="a"or en=="e" or en=="i"or en=="o"or en=="u":
  print("vowel")
else:
  print("consonant")
Problem:
Sitting in a station waiting room, Joisino is gazing at her train ticket.  The ticket is numbered with four digits A, B, C and D in this order, each between 0 and 9 (inclusive).  In the formula A op1 B op2 C op3 D = 7, replace each of the symbols op1, op2 and op3 with `+` or `-` so that the formula holds.  The given input guarantees that there is a solution. If there are multiple solutions, any of them will be accepted.

Incorrect submission (verdict: Wrong Answer):
S = input()
if int(S[0])+int(S[1])+int(S[2])+int(S[3])==7:
    print(f'{S[0]}+{S[1]}+{S[2]}+{S[3]}==7')
elif int(S[0])+int(S[1])+int(S[2])-int(S[3])==7:
    print(f'{S[0]}+{S[1]}+{S[2]}-{S[3]}==7')
elif int(S[0])+int(S[1])-int(S[2])+int(S[3])==7:
    print(f'{S[0]}+{S[1]}-{S[2]}+{S[3]}==7')
elif int(S[0])-int(S[1])+int(S[2])+int(S[3])==7:
    print(f'{S[0]}-{S[1]}+{S[2]}+{S[3]}==7')
elif int(S[0])+int(S[1])-int(S[2])-int(S[3])==7:
    print(f'{S[0]}+{S[1]}-{S[2]}-{S[3]}==7')
elif int(S[0])-int(S[1])+int(S[2])-int(S[3])==7:
    print(f'{S[0]}-{S[1]}+{S[2]}-{S[3]}==7')
elif int(S[0])-int(S[1])-int(S[2])+int(S[3])==7:
    print(f'{S[0]}-{S[1]}-{S[2]}+{S[3]}==7')
else:
    print(f'{S[0]}-{S[1]}-{S[2]}-{S[3]}==7')

Fixed, accepted submission:
S = input()
if int(S[0])+int(S[1])+int(S[2])+int(S[3])==7:
    print(f'{S[0]}+{S[1]}+{S[2]}+{S[3]}=7')
elif int(S[0])+int(S[1])+int(S[2])-int(S[3])==7:
    print(f'{S[0]}+{S[1]}+{S[2]}-{S[3]}=7')
elif int(S[0])+int(S[1])-int(S[2])+int(S[3])==7:
    print(f'{S[0]}+{S[1]}-{S[2]}+{S[3]}=7')
elif int(S[0])-int(S[1])+int(S[2])+int(S[3])==7:
    print(f'{S[0]}-{S[1]}+{S[2]}+{S[3]}=7')
elif int(S[0])+int(S[1])-int(S[2])-int(S[3])==7:
    print(f'{S[0]}+{S[1]}-{S[2]}-{S[3]}=7')
elif int(S[0])-int(S[1])+int(S[2])-int(S[3])==7:
    print(f'{S[0]}-{S[1]}+{S[2]}-{S[3]}=7')
elif int(S[0])-int(S[1])-int(S[2])+int(S[3])==7:
    print(f'{S[0]}-{S[1]}-{S[2]}+{S[3]}=7')
else:
    print(f'{S[0]}-{S[1]}-{S[2]}-{S[3]}=7')
Problem:
On some day in January 2018, Takaki is writing a document. The document has a column where the current date is written in `yyyy/mm/dd` format. For example, January 23, 2018 should be written as `2018/01/23`.  After finishing the document, she noticed that she had mistakenly wrote `2017` at the beginning of the date column. Write a program that, when the string that Takaki wrote in the date column, S, is given as input, modifies the first four characters in S to `2018` and prints it.

Incorrect submission (verdict: Wrong Answer):
S=input()
SS=S.replace("7","8")
print(SS)

Fixed, accepted submission:
S=input().split("/")
print("2018/"+S[1]+"/"+S[2])
Problem:
We have a board with H horizontal rows and W vertical columns of squares. There is a bishop at the top-left square on this board. How many squares can this bishop reach by zero or more movements?  Here the bishop can only move diagonally. More formally, the bishop can move from the square at the r_1-th row (from the top) and the c_1-th column (from the left) to the square at the r_2-th row and the c_2-th column if and only if exactly one of the following holds:    * r_1 + c_1 = r_2 + c_2   * r_1 - c_1 = r_2 - c_2  For example, in the following figure, the bishop can move to any of the red squares in one move:  

Incorrect submission (verdict: Wrong Answer):
N , M = map( int , input().split() )
print( int( (N * N + 1) / 2 ) )

Fixed, accepted submission:
N , M = map ( int, input().split() )
if N==1 or M==1:
  print(1)
else:
  print( int( ( N * M + 1) / 2 ) )
Problem:
Iroha has a sequence of N strings S_1, S_2, ..., S_N. The length of each string is L.  She will concatenate all of the strings in some order, to produce a long string.  Among all strings that she can produce in this way, find the lexicographically smallest one.  Here, a string s=s_1s_2s_3...s_n is _lexicographically smaller_ than another string t=t_1t_2t_3...t_m if and only if one of the following holds:    * There exists an index i(1≦i≦min(n,m)), such that s_j = t_j for all indices j(1≦j<i), and s_i<t_i.   * s_i = t_i for all integers i(1≦i≦min(n,m)), and n<m.

Incorrect submission (verdict: Wrong Answer):
N, L = map(int, input().split())
iroha = ''

for i in range(N):
    token = input()
    if i == 0:
        iroha = token
   
    for j in range(L): 
        if token[j] < iroha[j]:
            iroha = token + iroha
            break
        elif token[j] > iroha[j]:
            iroha = iroha + token
            break

print(iroha)

Fixed, accepted submission:
from functools import reduce

N, L = map(int, input().split())
iroha = []

for i in range(N):
     iroha.append(input())

iroha.sort()

print(reduce(lambda a,b: a+b, iroha))
Problem:
Write a program which reads a rectangle and a circle, and determines whether the circle is arranged inside the rectangle. As shown in the following figures, the upper right coordinate $(W, H)$ of the rectangle and the central coordinate $(x, y)$ and radius $r$ of the circle are given.     

Incorrect submission (verdict: Wrong Answer):
W, H, x, y, r = [int(x) for x in input().split()]
print('Yes' if x - r < 0 or y - r < 0 or x + r > W or y + r > H else 'No')

Fixed, accepted submission:
W, H, x, y, r = [int(x) for x in input().split()]
print('No' if x - r < 0 or y - r < 0 or x + r > W or y + r > H else 'Yes')
Problem:
AtCoDeer the deer recently bought three paint cans. The color of the one he bought two days ago is a, the color of the one he bought yesterday is b, and the color of the one he bought today is c. Here, the color of each paint can is represented by an integer between 1 and 100, inclusive.  Since he is forgetful, he might have bought more than one paint can in the same color. Count the number of different kinds of colors of these paint cans and tell him.

Incorrect submission (verdict: Wrong Answer):
print(set(list(map(int,input().split()))))

Fixed, accepted submission:
print(len(set(list(map(int,input().split())))))
Problem:
Our world is one-dimensional, and ruled by two empires called Empire A and Empire B.  The capital of Empire A is located at coordinate X, and that of Empire B is located at coordinate Y.  One day, Empire A becomes inclined to put the cities at coordinates x_1, x_2, ..., x_N under its control, and Empire B becomes inclined to put the cities at coordinates y_1, y_2, ..., y_M under its control.  If there exists an integer Z that satisfies all of the following three conditions, they will come to an agreement, but otherwise war will break out.    * X < Z \leq Y   * x_1, x_2, ..., x_N < Z   * y_1, y_2, ..., y_M \geq Z  Determine if war will break out.

Incorrect submission (verdict: Wrong Answer):
n, m, x, y = map(int, input().split())
xxx = list(map(int, input().split()))
yyy = list(map(int, input().split()))
xxx.append(n)
yyy.append(m)
mx = max(xxx)
my = min(yyy)
print('No War' if mx < my else 'War')


Fixed, accepted submission:
n, m, x, y = map(int, input().split())
xxx = list(map(int, input().split()))
yyy = list(map(int, input().split()))
xxx.append(x)
yyy.append(y)
mx = max(xxx)
my = min(yyy)
print('No War' if mx < my else 'War')
Problem:
Joisino the magical girl has decided to turn every single digit that exists on this world into 1.  Rewriting a digit i with j (0≤i,j≤9) costs c_{i,j} MP (Magic Points).  She is now standing before a wall. The wall is divided into HW squares in H rows and W columns, and at least one square contains a digit between 0 and 9 (inclusive).  You are given A_{i,j} that describes the square at the i-th row from the top and j-th column from the left, as follows:    * If A_{i,j}≠-1, the square contains a digit A_{i,j}.   * If A_{i,j}=-1, the square does not contain a digit.  Find the minimum total amount of MP required to turn every digit on this wall into 1 in the end.

Incorrect submission (verdict: Wrong Answer):
import collections
h,w = map(int, input().split())
c = [list(map(int, input().split())) for _ in range(10)]
a = [list(map(int, input().split())) for _ in range(h)]

result = [0]*10
    
    
def way(n,e,i,p): 
    for j in range(0,10):
        if (n == j):
            continue
        if (n == 1):
            if (e < result[i]):
                result[i] = e
            break
        if (e +  c[n][j] < p):
            print(n,e,i,p,j)
            q = e + c[n][j]
            way(j,q,i,p)
        
for i in range(0,10):
    result[i] = c[i][1]
    way(i,0,i,result[i])
    
print(result)

r = []
for w in range(0,10):
    t = 0
    for k in range(0,h):
        l = collections.Counter(a[k])
        t += l[w]
    r.append(t)
print(r)

ans = 0
for z in range(0,10):
    ans += result[z] * r[z]
print (ans)
        

Fixed, accepted submission:
h,w = map(int, input().split())
c = [list(map(int, input().split())) for _ in range(10)]
a = [list(map(int, input().split())) for _ in range(h)]

for k in range(10):
    for i in range(10):
        for j in range(10):
            c[i][j] = min(c[i][j], c[i][k]+c[k][j])
            
ans = 0
for i in range(h):
    for j in range(w):
        if (a[i][j]!=-1):
            ans += c[a[i][j]][1]
print(ans)
Problem:
You are given a positive integer X. Find the largest _perfect power_ that is at most X. Here, a perfect power is an integer that can be represented as b^p, where b is an integer not less than 1 and p is an integer not less than 2.

Incorrect submission (verdict: Wrong Answer):
import math
x=int(input())
beki_list = []
for i in range(1,int(math.sqrt(1000))+1):
    for j in range(1,11):
        if i**j<=x:
            beki_list.append(i**j)

print(max(beki_list))

Fixed, accepted submission:
import math
x=int(input())
beki_list = []
for i in range(1,int(math.sqrt(1000))+1):
    for j in range(2,11):
        if i**j<=x:
            beki_list.append(i**j)

print(max(beki_list))
Problem:
When a boy was cleaning up after his grand father passing, he found an old paper:         In addition, other side of the paper says that "go ahead a number of steps equivalent to the first integer, and turn clockwise by degrees equivalent to the second integer".  His grand mother says that Sanbonmatsu was standing at the center of town. However, now buildings are crammed side by side and people can not walk along exactly what the paper says in. Your task is to write a program which hunts for the treature on the paper.  For simplicity, 1 step is equivalent to 1 meter. Input consists of several pairs of two integers d (the first integer) and t (the second integer) separated by a comma. Input ends with "0, 0". Your program should print the coordinate (x, y) of the end point. There is the treature where x meters to the east and y meters to the north from the center of town.  You can assume that d ≤ 100 and -180 ≤ t ≤ 180\.

Incorrect submission (verdict: Wrong Answer):
import math

x, y, r = 0, 0, 90
while True:
    d, t = map(int, input().split(","))
    if d == t == 0:
        break
    x += r * math.cos(math.radians(r))
    y += r * math.sin(math.radians(r))
    r -= t
print(int(x))
print(int(y))

Fixed, accepted submission:
import math

x, y, r = 0, 0, 90
while True:
    d, t = map(float, input().split(","))
    if d == t == 0:
        break
    x += d * math.cos(math.radians(r))
    y += d * math.sin(math.radians(r))
    r -= t
print(int(x))
print(int(y))
Problem:
You are given a image with a height of H pixels and a width of W pixels. Each pixel is represented by a lowercase English letter. The pixel at the i-th row from the top and j-th column from the left is a_{ij}.  Put a box around this image and output the result. The box should consist of `#` and have a thickness of 1.

Incorrect submission (verdict: Wrong Answer):
H, W = (int(i) for i in input().split())
str = [input() for i in range(H)]
print(str)

for i in range(W+2):
        print("#", end = "")
print("")

for i in range(H):
        print("#", end = "")
        print(str[i], end = "")
        print("#")

for i in range(W+2):
        print("#", end = "")


Fixed, accepted submission:
H, W = (int(i) for i in input().split())
str = [input() for i in range(H)]

for i in range(W+2):
        print('#', end = "")
print("")

for i in range(H):
        print('#', end = "")
        print(str[i], end = "")
        print('#')

for i in range(W+2):
        print('#', end = "")
print("")
Problem:
Sig has built his own keyboard. Designed for ultimate simplicity, this keyboard only has 3 keys on it: the `0` key, the `1` key and the backspace key.  To begin with, he is using a plain text editor with this keyboard. This editor always displays one string (possibly empty). Just after the editor is launched, this string is empty. When each key on the keyboard is pressed, the following changes occur to the string:    * The `0` key: a letter `0` will be inserted to the right of the string.   * The `1` key: a letter `1` will be inserted to the right of the string.   * The backspace key: if the string is empty, nothing happens. Otherwise, the rightmost letter of the string is deleted.  Sig has launched the editor, and pressed these keys several times. You are given a string s, which is a record of his keystrokes in order. In this string, the letter `0` stands for the `0` key, the letter `1` stands for the `1` key and the letter `B` stands for the backspace key. What string is displayed in the editor now?

Incorrect submission (verdict: Wrong Answer):
s = list(input())
ans = []
for i in s:
    if len(ans)!=0 and i=='B':
        ans.pop()
    elif i!='B':
        ans.append(i)
print(ans)

Fixed, accepted submission:
s = list(input())
ans = []
for i in s:
    if len(ans)!=0 and i=='B':
        ans.pop()
    elif i!='B':
        ans.append(i)
print(*ans,sep="")