ZhenlongDai/ACPR huggingface dataset:
Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
S = input()

count = S.count("E")
result = 300000

for i in range(1,N):
    if (S[i-1] == "W" and S[i] == "E") or (S[i-1] == "E" and S[i] == "W"):
        print(count)
        pass
    elif S[i-1] == "W" and S[i] == "W":
        print(count)
        count += 1
    elif S[i-1] == "E" and S[i] == "E":
        print(count)
        count -= 1
        if result > count:
            result = count
print(result)

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
2
2
1
1
1


Fixed submission (verdict: Accepted):
N = int(input())
S = input()

if S[0] == "E":
    count = S.count("E") -1
    result = count
    for i in range(1,N):
        if S[i-1] == "W" and S[i] == "W":
            count += 1
        elif S[i-1] == "E" and S[i] == "E":
            count -= 1
            if result > count:
                result = count
else:
    count = S.count("E")
    result = count
    for i in range(1,N):
        if S[i-1] == "W" and S[i] == "W":
            count += 1
        elif S[i-1] == "E" and S[i] == "E":
            count -= 1
            if result > count:
                result = count

print(result)

Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = input()
w = [0]
e = [0]
for i in range(len(s)):
    if s[i]=="W":
        w.append(w[i]+1)
        e.append(e[i])
    else:
        w.append(w[i])
        e.append(e[i]+1)
ans = 10**9
for i in range(0,len(s)):
    ans = min(ans,w[i]+e[-1]-e[i+1])
print(w)
print(e)
print(ans)

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
[0, 1, 1, 1, 2, 3]
[0, 0, 1, 2, 2, 2]
1


Fixed submission (verdict: Accepted):
n = int(input())
s = input()
w = [0]
e = [0]
for i in range(len(s)):
    if s[i]=="W":
        w.append(w[i]+1)
        e.append(e[i])
    else:
        w.append(w[i])
        e.append(e[i]+1)
ans = 10**9
for i in range(0,len(s)):
    ans = min(ans,w[i]+e[-1]-e[i+1])
print(ans)

Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = input()
c = s[1:].count('E')
mc = c

for i in range(1, n):
    if s[i] == 'E':
        c -= 1
    if s[i-i] == 'W':
        c += 1
    mc = min(c, mc)

print(mc)

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())
s = input()
left = 0
right = s[1:].count('E')
cnt = [left + right]

for i in range(1, n):
    if s[i-1] == 'W':
        left += 1
    if s[i] == 'E':
        right -= 1
    cnt.append(left + right)

print(min(cnt))
Problem: p03339
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
s = str(input())
sE = s.count('E')
sW = s.count('W')
l = []
e, w = 0, 0
for ch in s:
    if ch == 'E':
        e += 1
    else:
        w += 1
    m = (sE-e)+w
    l.append(sE-e+w-1 if ch == 'W' else sE-e+w)
print(l)


Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
[2, 2, 1, 1, 2]


Fixed submission (verdict: Accepted):
n = int(input())
s = str(input())
sE = s.count('E')
sW = s.count('W')
l = []
e, w = 0, 0
for ch in s:
    if ch == 'E':
        e += 1
    else:
        w += 1
    m = (sE-e)+w
    l.append(sE-e+w-1 if ch == 'W' else sE-e+w)
print(min(l))

Problem: p03339
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
s = list(input())
cnt = 0
ans_list = [0]
e_cnt = int()

for i in range(1,n):
    if s[i-1] == "E":
        cnt -= 1
    if s[i-1] == 'W':
        cnt += 1
    ans_list.append(cnt)

if s[n-1] == 'E':
    e_cnt = (ans_list[n-1] - 1 - n) 
else:
    e_cnt = (ans_list[n-1] - n) 

if s[0] == 'E':
    e_cnt -= 1

print(min(ans_list) + e_cnt)

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
-6


Fixed submission (verdict: Accepted):
n = int(input())
s = list(input())
cnt = 0
ans_list = [0]
e_cnt = 0

for i in range(1,n):
    if s[i-1] == "E" and s[i] == "E":
        cnt -= 1
        e_cnt += 1
    if s[i-1] == "E" and s[i] == "W":
        cnt -= 0
    if s[i-1] == "W" and s[i] == "E":
        cnt += 0
        e_cnt += 1
    if s[i-1] == "W" and s[i] == "W":
        cnt += 1
    ans_list.append(cnt)

print(min(ans_list) + e_cnt)

Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
s=input()
ans=[]
alle=list(s).count("E")
allw=n-alle
ecnt=wcnt=0
for i in range(n):
    ans.append(wcnt+alle-(i-wcnt+ecnt))
    if s[i] == "W":
        wcnt+=1
    else:
        ecnt+=1
print(min(ans))

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
-1


Fixed submission (verdict: Accepted):
n=int(input())
s=input()
ans=[]
alle=list(s).count("E")
allw=n-alle
ecnt=wcnt=0
for i in range(n):
    if s[i] == "W":
        ans.append(wcnt+alle-ecnt)
        wcnt+=1
    else:
        ans.append(wcnt+alle-ecnt-1)
        ecnt+=1
print(min(ans))

Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
S=str(input())

E=[0]*N
W=[0]*N
c=0
for i in range(N):
  if S[i]=='W':
    c +=1
  W[i] =c
c=0
for j in range(N):
  if S[-1-j]=='E':
    c +=1
  E[-1-j]=c
E=[E[0]]+E+[0]
W=[0]+W+[W[-1]]
answer=float('inf')
for i in range(N+2):
  answer=min(answer,E[i]+W[i])
print(answer)

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
N=int(input())
S=str(input())

E=[0]*N
W=[0]*N
c=0
for i in range(N):
  W[i] =c
  if S[i]=='W':
    c +=1
c=0
for j in range(N):
  E[-1-j]=c
  if S[-1-j]=='E':
    c +=1
E=[E[0]]+E+[0]
W=[0]+W+[W[-1]]
answer=float('inf')
for i in range(N+2):
  answer=min(answer,E[i]+W[i])
print(answer)
Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
s=str(input())
ans=0

for i in range(n-1):
    n=i+1
    if s[n]=='E':
        ans=ans+1

cnt=ans

for i in range(n):
    if s[i:i+2]=='WW':
        cnt=cnt+1
    elif s[i:i+2]=='EE':
        cnt=cnt-1
    else:
        0
        
    print('i,s[i:i+2],ans,cnt',i,s[i:i+2],ans,cnt)
    ans=min(ans,cnt)
print(ans)

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
i,s[i:i+2],ans,cnt 0 WE 2 2
i,s[i:i+2],ans,cnt 1 EE 2 1
i,s[i:i+2],ans,cnt 2 EW 1 1
i,s[i:i+2],ans,cnt 3 WW 1 2
1


Fixed submission (verdict: Accepted):
n=int(input())
s=str(input())
ans=0

for i in range(n-1):
    n=i+1
    if s[n]=='E':
        ans=ans+1

cnt=ans

for i in range(n):
    if s[i:i+2]=='WW':
        cnt=cnt+1
    elif s[i:i+2]=='EE':
        cnt=cnt-1
    else:
        0
        
    
    ans=min(ans,cnt)
print(ans)

Problem: p03339
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
s = input()

from collections import defaultdict
l = defaultdict(int)
r = defaultdict(int)
for si in s:
    r[si] += 1
r[s[0]] -= 1

ans = l['W'] + r['E']
for i in range(1, n):
    l[s[i-1]] += 1
    r[s[i]] -= 1
    print(l['W'] , r['E'])
    ans = min(ans, l['W'] + r['E'])
print(ans)


Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
1 1
1 0
1 0
2 0
1


Fixed submission (verdict: Accepted):
n = int(input())
s = input()

from collections import defaultdict
l = defaultdict(int)
r = defaultdict(int)
for si in s:
    r[si] += 1
r[s[0]] -= 1

ans = l['W'] + r['E']
for i in range(1, n):
    l[s[i-1]] += 1
    r[s[i]] -= 1
    
    ans = min(ans, l['W'] + r['E'])
print(ans)

Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
s=input()
ans=[]
alle=list(s).count("E")
allw=n-alle
ecnt=wcnt=0
for i in range(n):
    if s[i] == "W":
        ans.append(wcnt+alle-ecnt)
        wcnt+=1
    else:
        ans.append(wcnt+alle-ecnt-1)
        ecnt+=1
print(ans)

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
[2, 2, 1, 1, 2]


Fixed submission (verdict: Accepted):
n=int(input())
s=input()
ans=[]
alle=list(s).count("E")
allw=n-alle
ecnt=wcnt=0
for i in range(n):
    if s[i] == "W":
        ans.append(wcnt+alle-ecnt)
        wcnt+=1
    else:
        ans.append(wcnt+alle-ecnt-1)
        ecnt+=1
print(min(ans))

Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
S = input()

min_count = N

left = {'W':0, 'E':0}
w = S.count('W')
right = {'W':w, 'E':N-w}

for i in range(N):
    base = S[i]
    right[base] -= 1
    min_count = min(left['W']+right['E'], min_count)
    left[base] += 1
print('ANS', min_count)

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
ANS 1


Fixed submission (verdict: Accepted):
N = int(input())
S = input()

min_count = N

left = {'W':0, 'E':0}
w = S.count('W')
right = {'W':w, 'E':N-w}

for i in range(N):
    base = S[i]
    right[base] -= 1
    min_count = min(left['W']+right['E'], min_count)
    left[base] += 1
print(min_count)
Problem: p03339
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
S = str(input())

west = 0
for i in range(N):
  if S[i] == "W":
    west += 1

ans_list = [0] * N
for i in range(N):
  if S[i] == "W":
    west -= 1
  if i != 0:
    if S[i - 1] == "E":
      west += 1
  
  ans_list[i] = west

print(min(ans_list))
  

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
N = int(input())
S = str(input())

count = 0
for i in range(N):
  if S[i] == "E":
    count += 1

ans = 10 ** 10
for i in range(N):
  if S[i] == "E":
    count -= 1
  if i != 0:
    if S[i - 1] == "W":
      count += 1
  ans = min(ans, count)
  
print(ans)

Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
cnt = S.count('E')
ans = cnt

for v in S:
  if v == 'E':
    cnt -= 1
  else:
    cnt += 1
    ans = min(ans, cnt)
print(ans)

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
0


Fixed submission (verdict: Accepted):
N = input()
S = input()
cnt = S.count('E')
ans = cnt

for v in S:
  if v == 'E':
    cnt -= 1
  else:
    cnt += 1
  ans = min(ans, cnt)
print(ans)

Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
people = input()

counts = []
for n in range(N):
    count = 0
    for i in range(N):
        if i == n:
            continue
        if n<i and people[i]=='E':
            count +=1
        if n>i and people[i]=='W':
            count +=1
    counts.append(count)

min(counts)

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:

Fixed submission (verdict: Accepted):
N = int(input())
people = input()

count = 0
for i in range(1, N):
    if people[i] == 'E':
        count += 1

counts = [count]
for i in range(1, N):
    if people[i - 1] == 'W':
        count += 1
    if people[i]  == 'E':
        count -= 1
    counts.append(count)

print(min(counts))

Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
s=input()

e=[1 if c=='E' else 0 for c in s]
w=[1 if c=='W' else 0 for c in s]

m=min(sum(e[1:n]),sum(w[:n-1]))
for i in range(1,n-1):
  m=min(m,sum(e[i+1:n])+sum(w[:i]))


Failing test case input:
5
WEEWW

Expected output:
1

Actual output:

Fixed submission (verdict: Accepted):
n=int(input())
s=input()

e=[1 if c=='E' else 0 for c in s]
w=[1 if c=='W' else 0 for c in s]

for i in range(1,n):
  e[i] += e[i-1]
  w[i] += w[i-1]

m=e[n-1]-e[0]
for i in range(1,n):
  m=min(m,w[i-1]+e[n-1]-e[i])

print(m)
Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
S = input()

east = [0]*N
west = [0]*N
for i in range(N):
    if S[i] == 'E':
        east[i] = 1
    else:
        west[i] = 1

sum_east = [0]*(N+1)
sum_west = [0]*(N+1)
for i in range(N):
    sum_west[i+1] = sum_west[i] + west[i]
    sum_east[N-i-1] = sum_east[N-i] + east[N-i-1]
print(sum_west, sum_east)

ans = 10**6
for i in range(N):
    ans = min(ans, sum_west[i] + sum_east[i+1])
    

print(ans)


Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
[0, 1, 1, 1, 2, 3] [2, 2, 1, 0, 0, 0]
1


Fixed submission (verdict: Accepted):
N = int(input())
S = input()

east = [0]*N
west = [0]*N
for i in range(N):
    if S[i] == 'E':
        east[i] = 1
    else:
        west[i] = 1

sum_east = [0]*(N+1)
sum_west = [0]*(N+1)
for i in range(N):
    sum_west[i+1] = sum_west[i] + west[i]
    sum_east[N-i-1] = sum_east[N-i] + east[N-i-1]


ans = 10**6
for i in range(N):
    ans = min(ans, sum_west[i] + sum_east[i+1])
    

print(ans)

Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
S = input()

W=[0]*N
w = 0
for i in range(N):
    if S[i] == "W":
        w += 1
    W[i] = w

E = [0]*N
e = 0
for i in range(N):
    if S[N-1-i] == "E":
        e += 1
    E[N-1-i] = e
ans = 10**9
for i in range(N):
    count = W[i] + E[i]
    ans = min(ans,count)
    print(W[i],end=":")
    print(E[i])
print(ans-1)


Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
1:2
1:2
1:1
2:0
3:0
1


Fixed submission (verdict: Accepted):
N = int(input())
S = input()

W=[0]*N
w = 0
for i in range(N):
    if S[i] == "W":
        w += 1
    W[i] = w

E = [0]*N
e = 0
for i in range(N):
    if S[N-1-i] == "E":
        e += 1
    E[N-1-i] = e
ans = 10**9
for i in range(N):
    count = W[i] + E[i]
    ans = min(ans,count)

print(ans-1)

Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = input()
l = 0
r = s[1:].count('E')
result = l + r
for i in range(1, n):
  if s[i] == "W":
    l += 1
  if s[n - i] == "E":
    r -= 1
  result = max(result, l + r)
print(result)

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())
s = input()
l = 0
r = s[1:].count('E')
result = l + r
for i in range(1, n):
  if s[i - 1] == "W":
    l += 1
  if s[i] == "E":
    r -= 1
  result = min(result, l + r)
print(result)
Problem: p03339
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N = int(input())
S = input()

w = [0] * (N+1)
cnt = 0
for i in range(N):
    if S[i] == 'W':
        cnt += 1
        w[i+1] = cnt
    else:
        w[i+1] = w[i]

e = [0] * (N+1)
cnt = 0
for i in range(N):
    if S[i] == 'E':
        cnt += 1
        e[i+1] = cnt
    else:
        e[i+1] = e[i]

L = []  
for i in range(1, N+1):
    num = w[i-1] + e[N] - e[i]
    L.append(num)
    
print((L))

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
[2, 2, 1, 1, 2]


Fixed submission (verdict: Accepted):
N = int(input())
S = input()

w = [0] * (N+1)
cnt = 0
for i in range(N):
    if S[i] == 'W':
        cnt += 1
        w[i+1] = cnt
    else:
        w[i+1] = w[i]

e = [0] * (N+1)
cnt = 0
for i in range(N):
    if S[i] == 'E':
        cnt += 1
        e[i+1] = cnt
    else:
        e[i+1] = e[i]

L = []  
for i in range(1, N+1):
    num = w[i-1] + e[N] - e[i]
    L.append(num)

print(min(L))

Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
s=str(input())
s=list(s)
tempw=s.count("W")
ans=n-tempw
cnt=n-tempw
if s[0]=="W":
  ans=ans-1
  cnt=cnt-1
for i in range(1,n):
  if s[i-1]=="W":
    cnt=cnt+1
  if s[i]=="E":
    cnt=cnt-1
  ans=min(ans,cnt)  
print(ans)

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
0


Fixed submission (verdict: Accepted):
n=int(input())
s=str(input())
s=list(s)
tempw=s.count("W")
ans=n-tempw
cnt=n-tempw
if s[0]=="E":
  ans=ans-1
  cnt=cnt-1
for i in range(1,n):
  if s[i-1]=="W":
    cnt=cnt+1
  if s[i]=="E":
    cnt=cnt-1
  ans=min(ans,cnt)  
print(ans)

Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = input()
num = s[1:].count('E')
ans = [num]

for i in range(1,n):
    if s[i] == 'E':
        num -= 1
    elif s[i] == 'W':
        num += 1
    ans.append(num)
print(min(ans))

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
s = input()
num = s[1:].count('E')
ans = [num]

for i in range(1,n):
    if s[i] == 'E':
        num -= 1
    if s[i-1] == 'W':
        num += 1
    ans.append(num)
print(min(ans))

Problem: p03339
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N = int(input())
S = input()

W_sum = [0]
E_sum = [S.count('E')]
for i in range(0, N):
    W_sum.append(W_sum[i] + 1 if S[i] == 'W' else W_sum[i]) 
    E_sum.append(E_sum[i] - 1 if S[i] == 'E' else E_sum[i])

print(W_sum) 
print(E_sum) 
res = float('inf')
for i in range(0, N+1):
    res = min(res, W_sum[i] + E_sum[i])
    
print(res)

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
[0, 1, 1, 1, 2, 3]
[2, 2, 1, 0, 0, 0]
1


Fixed submission (verdict: Accepted):
N = int(input())
S = input()

W_sum = [0]
E_sum = [S.count('E')]
for i in range(0, N):
    W_sum.append(W_sum[i] + 1 if S[i] == 'W' else W_sum[i]) 
    E_sum.append(E_sum[i] - 1 if S[i] == 'E' else E_sum[i])

res = float('inf')
for i in range(0, N+1):
    res = min(res, W_sum[i] + E_sum[i])
    
print(res)
Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = input()
l = 0
r = s[1:].count('E')
result = l + r
for i in range(1, n):
  if s[i - 1] == "W":
    l += 1
  if s[n - i] == "E":
    r -= 1
  result = min(result, l + r)
print(result)

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())
s = input()
l = 0
r = s[1:].count('E')
result = l + r
for i in range(1, n):
  if s[i - 1] == "W":
    l += 1
  if s[i] == "E":
    r -= 1
  result = min(result, l + r)
print(result)

Problem: p03339
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
S = input()

eastNumber = S.count('E')
westNumber = 0
minimum = N

for i in range(N):
    if S[i] == 'E':
        eastNumber -= 1
        number = eastNumber + westNumber
        if minimum > number:
            minimum = number
    else:
        number = eastNumber + westNumber
        if minimum > number:
            minimum = number
        westNumber -= 1

print(minimum)

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
-2


Fixed submission (verdict: Accepted):
N = int(input())
S = input()

eastNumber = S.count('E')
westNumber = 0
minimum = N

for i in range(N):
    if S[i] == 'E':
        eastNumber -= 1
        number = eastNumber + westNumber
        if minimum > number:
            minimum = number
    else:
        number = eastNumber + westNumber
        if minimum > number:
            minimum = number
        westNumber += 1

print(minimum)

Problem: p03339
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n=int(input())
s=input()
x=[0]*n
t=0
for i in range(n):
    if s[i]=="E":
        t+=1
    x[i]=t
M=x[n-1]
c=0
ans=10**9
print(x)
for i in range(n):
    ans=min(ans,i-c+M-x[i])
    c=x[i]
print(ans)

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
[0, 1, 2, 2, 2]
1


Fixed submission (verdict: Accepted):
n=int(input())
s=input()
x=[0]*n
t=0
for i in range(n):
    if s[i]=="E":
        t+=1
    x[i]=t
M=x[n-1]
c=0
ans=10**9
for i in range(n):
    ans=min(ans,i-c+M-x[i])
    c=x[i]
print(ans)

Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
S = input()
min_num = 3e5
for i in range(N):
    num = S[:i].count('W') + S[i:].count('E')
    min_num = num if min_num > num else min_num
    print(i, num)
print(min_num)

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
0 2
1 3
2 2
3 1
4 2
1


Fixed submission (verdict: Accepted):
N = int(input())
S = input()
num = S.count('E')
min_num = num
for i in range(N-1):
    if S[i]=='W':
        num += 1
    if S[i+1]=='E':
        num -= 1
    min_num = num if min_num > num else min_num
print(min_num if S[0]=='W' else min_num-1)
Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
people = input()

counts = []
for n in [0, N-1]:
    count = 0
    for i in range(N):
        if i == n:
            continue
        if n<i and people[i]=='E':
            count +=1
        if n>i and people[i]=='W':
            count +=1
    print(count)
    counts.append(count)

print(min(counts))

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
2
2
2


Fixed submission (verdict: Accepted):
N = int(input())
people = input()

count = 0
for i in range(1, N):
    if people[i] == 'E':
        count += 1

counts = [count]
for i in range(1, N):
    if people[i - 1] == 'W':
        count += 1
    if people[i]  == 'E':
        count -= 1
    counts.append(count)

print(min(counts))

Problem: p03339
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N = int(input())
S = list(input())


ans = N

f = S[0]
s = S[1:]

nw = 0
ne = 0

for w in s:
    if w != 'W':
        ne += 1

for i, h in enumerate(range(1, N+1)):
    
    f = S[0: i]
    l = S[i]
    s = S[i+1:]
    
    
    
    

    if S[i-1] != 'E':
        nw += 1

    if S[i] != 'W':
        ne -= 1
    
    ans = min(ans, nw+ne)

print(ans)


Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
N = int(input())
S = list(input())


ans = N

f = S[0]
s = S[1:]

nw = 0
ne = 0

for w in s:
    if w != 'W':
        ne += 1

ans = nw+ne
for i in range(1, N):
    
    
    
    
    
    
    
    

    if S[i-1] != 'E':
        nw += 1

    if S[i] != 'W':
        ne -= 1
    
    ans = min(ans, nw+ne)

print(ans)

Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
str = input()
str_list=list(str)
num_list=[]
ans_list=[]
num=0
for i in range (N):
  if str_list[i]=="E":
    num=num+1
    num_list.append(num)
  else:
    num_list.append(num)
   
for i in range(N):
  ans=num_list[N-1]-num_list[i]+i+1-num_list[i]
  ans_list.append(ans)
print(ans_list)
print(min(ans_list))

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
[3, 2, 1, 2, 3]
1


Fixed submission (verdict: Accepted):
N = int(input())
str = input()
str_list=list(str)
num_list=[]
ans_list=[]
num=0
for i in range (N):
  if str_list[i]=="E":
    num=num+1
    num_list.append(num)
  else:
    num_list.append(num)
   
for i in range (N):
  if i==0:
    ans=num_list[N-1]-num_list[i]
    ans_list.append(ans)
  else:
    ans=num_list[N-1]-num_list[i]+i-num_list[i-1]
    ans_list.append(ans)

print(min(ans_list))
Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

N = input()

A1 = [ n=='E' for n in input()]


minimum = sum(A1[1:])
count = minimum
print(count)
for i in range(1,int(N)):
    if(not A1[i-1]):
        count += 1
    if(A1[i]):
        count -= 1
    print(i,count)
    if(count<minimum):
        minimum = count
print(minimum)

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
2
1 2
2 1
3 1
4 2
1


Fixed submission (verdict: Accepted):

N = input()

A1 = [ n=='E' for n in input()]


minimum = sum(A1[1:])
count = minimum

for i in range(1,int(N)):
    if(not A1[i-1]):
        count += 1
    if(A1[i]):
        count -= 1
    if(count<minimum):
        minimum = count
print(minimum)

Problem: p03339
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
S = list(input())

Lw = 0
Re = S.count("E")
ans_lst = [Lw+Re]*(N)


for i in range(1,N):
    if S[i-1] == "W":
        Lw += 1
    else:
        Re -= 1
    ans_lst[i] = Lw + Re
    print(Lw, Re ,ans_lst[i])

ans = min(ans_lst)
print(ans)


Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
1 2 3
1 1 2
1 0 1
2 0 2
1


Fixed submission (verdict: Accepted):
N = int(input())
S = list(input())

lst = [0]*N
Re = S.count("E")
Lw = 0

for i in range(N):
    if S[i] == "E":
        Re -= 1
        lst[i] = Re + Lw
    else:
        Lw += 1
        lst[i] = Re + Lw - 1

ans = min(lst)
print(ans)

Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
members = input()
m_e = members.count("E")
cost = m_e
costs = []
for i in range(n):
    if members[i]=="E":
        cost-=1
    if members[i-1]=="W":
        cost+=1
    costs.append(cost)
print(min(costs))

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())
members = input()
m_e = members.count("E")
cost = m_e
costs = []
for i in range(n):
    if members[i]=="E":
        cost-=1
    if (i!=0 and members[i-1]=="W"):
        cost+=1
    costs.append(cost)
print(min(costs))

Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
S = input()

n = p = S[1:].count("E")

for i in range(1,N):
    print(i-1, p)
    n = min(p, n)
    if S[i] == "E":
        p -= 1
    if S[i-1] == "W":
        p += 1

print(n)
    

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
0 2
1 2
2 1
3 1
1


Fixed submission (verdict: Accepted):
N = int(input())
S = input()

n = p = S[1:].count("E")

for i in range(0,N-1):
    if S[i+1] == "E":
        p -= 1
    if S[i] == "W":
        p += 1
    n = min(p, n)

print(n)
Problem: p03339
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def schange(s):
    if s=="E":
        return 1
    else:
        return 0

n = int(input())
s = list(map(schange,input()))
ssum = [0]*(n+1)

for i in range(n):
    ssum[i+1] = ssum[i] + s[i]

ans = float('inf')
for i in range(1,n+1):
    turnE = (i-1)-ssum[i-1]
    turnW = ssum[-1] - ssum[i]
    print(turnE,turnW)
    ans=min(ans,turnE+turnW)
    
print(ans)

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
0 2
1 1
1 0
1 0
2 0
1


Fixed submission (verdict: Accepted):
def schange(s):
    if s=="E":
        return 1
    else:
        return 0

n = int(input())
s = list(map(schange,input()))
ssum = [0]*(n+1)

for i in range(n):
    ssum[i+1] = ssum[i] + s[i]

ans = float('inf')
for i in range(1,n+1):
    turnE = (i-1)-ssum[i-1]
    turnW = ssum[-1] - ssum[i]
    ans=min(ans,turnE+turnW)
    
print(ans)

Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
s=input()
e=[0]
w=[0]
for i, si in enumerate(s):
    if si=='W':
        w.append(w[i]+1)
    else:
        w.append(w[i])
for i, si in enumerate(reversed(s)):
    if si=='E':
        e.append(e[i]+1)        
    else:
        e.append(e[i])

ans=float('inf')
for i in range(n):
    ans=min(ans, w[i]+e[n-i-1])
    print(w[i],e[n-i])
print(ans)

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
0 2
1 2
1 1
1 0
2 0
1


Fixed submission (verdict: Accepted):
n=int(input())
s=input()
e=[0]
w=[0]
for i, si in enumerate(s):
    if si=='W':
        w.append(w[i]+1)
    else:
        w.append(w[i])
for i, si in enumerate(reversed(s)):
    if si=='E':
        e.append(e[i]+1)        
    else:
        e.append(e[i])

ans=float('inf')
for i in range(n):
    ans=min(ans, w[i]+e[n-i-1])
print(ans)

Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter
N = int(input())
S = list(input())
WL = [0]*(N+1)
for i in range(0,N):
    if S[i] == 'W':
        WL[i+1] = WL[i] + 1
    else:
        WL[i+1] = WL[i]
T = S[::-1]
ER = [0]*(N+1)
for i in range(0,N):
    if T[i] == 'E':
        ER[i+1] = ER[i] + 1
    else:
        ER[i+1] = ER[i]
print(WL)
print(ER)
ans = N
for i in range(N):
    ans = min(ans,WL[i]+ER[N-i-1])
print(ans)

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
[0, 1, 1, 1, 2, 3]
[0, 0, 0, 1, 2, 2]
1


Fixed submission (verdict: Accepted):
from collections import Counter
N = int(input())
S = list(input())
WL = [0]*(N+1)
for i in range(0,N):
    if S[i] == 'W':
        WL[i+1] = WL[i] + 1
    else:
        WL[i+1] = WL[i]
T = S[::-1]
ER = [0]*(N+1)
for i in range(0,N):
    if T[i] == 'E':
        ER[i+1] = ER[i] + 1
    else:
        ER[i+1] = ER[i]
ans = N
for i in range(N):
    ans = min(ans,WL[i]+ER[N-i-1])
print(ans)
Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = input()
E = s.count("E")
W = 0
min = n
for s_i in s:
    if s == "E":
        E -= 1
    else :
        W += 1

    change_man = E + W - bool(s_i == "W")

    if min > change_man:
        min = change_man
print(min)

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())
s = input()
E = s.count("E")
W = 0
min_num = n
for s_i in s:
    if s_i == "E":
        E -= 1
    else :
        W += 1

    change_man = E + W - bool(s_i == "W")
    min_num = min(min_num, change_man)
print(min_num)

Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = input()

cnt = 0

ans = s[1:].count('E')

for i in range(1,n):
    if s[i-1] == "W":
        cnt += 1
    if s[i] == "E":
        cnt -= 1
    
    ans = min(ans,cnt)

print(ans)

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
-1


Fixed submission (verdict: Accepted):
n = int(input())
s = input()

ans = s[1:].count('E')
cnt = ans

for i in range(1,n):
    if s[i-1] == "W":
        cnt += 1
    if s[i] == "E":
        cnt -= 1
    
    ans = min(ans,cnt)

print(ans)

Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter
n = int(input())
st = input()
l = []
stc = Counter(st)
ma = Counter(st[:0])["W"] + Counter(st[1:])["E"]
previous = st[0]
for i in range(1,n):
    temp = ma
    if(previous == "W"):
        temp+=1
    previous = st[i]
    if(temp < ma):
        ma = temp
print(ma)

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
from collections import Counter
n = int(input())
st = input()
l = []
stc = Counter(st)
ma = [Counter(st[:0])["W"] + Counter(st[1:])["E"]]
previous = st[0]
for i in range(1,n):
    temp = ma[-1]
    if(previous == "W"):
        temp+=1
    previous = st[i]
    if(st[i] == "E"):
        temp-=1
    ma.append(temp)
print(sorted(ma)[0])

Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
S=input()
x=len([s for s in S[1:] if s=='E'])
x_min=x

for i in range(1,N):
	if S[i-1]=='W':
		x+=1
	if S[i]=='E':
		x-=1
	if x<x_min:
		x=x_min

print(x_min)

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
N=int(input())
S=input()
x=len([s for s in S[1:] if s=='E'])
x_min=x

for i in range(1,N):
	if S[i-1]=='W':
		x+=1
	if S[i]=='E':
		x-=1
	if x<x_min:
		x_min=x

print(x_min)
Problem: p03339
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
text=input()
ls=[0 for i in range(N)]
if text[0]=="W":
  ls[0]=0
else:
  ls[0]=1
for i in range(1,N):
  if text[i]=="W":
    ls[i]=ls[i-1]
  else:
    ls[i]=ls[i-1]+1
print(ls)
ans=min([ls[N-1]-ls[0],N-1-ls[N-2]])
for i in range(1,N-1):
  x=0
  x+=i-ls[i-1]
  x+=ls[N-1]-ls[i]
  if x<ans:
    ans=x
print(ans)
  
  

Failing test case input:
5
WEEWW

Expected output:
1

Actual output:
[0, 1, 2, 2, 2]
1


Fixed submission (verdict: Accepted):
N=int(input())
text=input()
ls=[0 for i in range(N)]
if text[0]=="W":
  ls[0]=0
else:
  ls[0]=1
for i in range(1,N):
  if text[i]=="W":
    ls[i]=ls[i-1]
  else:
    ls[i]=ls[i-1]+1
ans=min([ls[N-1]-ls[0],N-1-ls[N-2]])
for i in range(1,N-1):
  x=0
  x+=i-ls[i-1]
  x+=ls[N-1]-ls[i]
  if x<ans:
    ans=x
print(ans)
Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b = map(int,input().split())
print(a+b)

Failing test case input:
-2 -31

Expected output:
62


Actual output:
-33


Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
print(a*b)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
A, B = map(int, input().split())
print(A, B)

Failing test case input:
-1 -323

Expected output:
323


Actual output:
-1 -323


Fixed submission (verdict: Accepted):
A, B = list(map(int, input().split()))
print(A*B)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
A, B = list(map(int, input().split()))
print(A, B)

Failing test case input:
2 -58

Expected output:
-116


Actual output:
2 -58


Fixed submission (verdict: Accepted):
A, B = list(map(int, input().split()))
print(A*B)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b = map(int,input().split())
print(a+b)

Failing test case input:
-1 -50

Expected output:
50


Actual output:
-51


Fixed submission (verdict: Accepted):
a, b = map(int,input().split())
print(a*b)

Problem: p02657
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
a, b = map(int, input().split())
print(a + b)

Failing test case input:
-1 -113

Expected output:
113


Actual output:
-114


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
print(a*b)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b = map(int,input().split())
print(a + b)

Failing test case input:
1 -357

Expected output:
-357


Actual output:
-356


Fixed submission (verdict: Accepted):
a, b = map(int,input().split()) 
print(a * b)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

def main():
 a,b = map(int,input().split())
 print(a)
main()

Failing test case input:
1 -65

Expected output:
-65


Actual output:
1


Fixed submission (verdict: Accepted):
def main():
 a,b = map(int,input().split())
 print(a * b)
main()

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b = map(int, input().split())
print(a)
print(b)
answer = a * b
print(answer)

Failing test case input:
2 -58

Expected output:
-116


Actual output:
2
-58
-116


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
answer = a * b
print(answer)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input().split()
float(s[0]) * float(s[1])


Failing test case input:
-6 9

Expected output:
-54


Actual output:

Fixed submission (verdict: Accepted):
s = input().split()
print(int(s[0]) * int(s[1]))

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

L,R = map(int,input().split())
print(type(L),L,R)


ans = L*R
print(ans)

Failing test case input:
-1 -357

Expected output:
357


Actual output:
<class 'int'> -1 -357
357


Fixed submission (verdict: Accepted):

L,R = map(int,input().split())

ans = L*R
print(ans)
Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
A,B = map(int, input().split())

answer = A * B
print('answer')

Failing test case input:
1 -58

Expected output:
-58


Actual output:
answer


Fixed submission (verdict: Accepted):
A, B = map(int, input().split())

answer = A * B

print(answer)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
print(sum(map(int, input().split(' '))))

Failing test case input:
-4 -37

Expected output:
148


Actual output:
-41


Fixed submission (verdict: Accepted):
a, b = map(int, input().split(' '))
print(a * b)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):



a, b = map(int, input().split())
print(a)
print(b)


answer=a*b

print(answer)

Failing test case input:
1 -407

Expected output:
-407


Actual output:
1
-407
-407


Fixed submission (verdict: Accepted):



a, b = map(int, input().split())




answer = a * b

print(answer)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b = map(int,input().split())

def main(x,y):
    return x*y

main(a,b)

Failing test case input:
-1 -50

Expected output:
50


Actual output:

Fixed submission (verdict: Accepted):
a, b = map(int,input().split())
def main(x,y):
    print(x*y)

main(a,b)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input().split()
int(s[0]) * int(s[1])


Failing test case input:
1 -58

Expected output:
-58


Actual output:

Fixed submission (verdict: Accepted):
s = input().split()
print(int(s[0]) * int(s[1]))

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):



a,b = map(int, input().split())
print(a,b)

answer = a * b


print(answer)

Failing test case input:
2 -407

Expected output:
-814


Actual output:
2 -407
-814


Fixed submission (verdict: Accepted):



a,b = map(int, input().split())


answer = a * b


print(answer)

Problem: p02657
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
a, b = map(int, input().split())
print(a + b)

Failing test case input:
1 -554

Expected output:
-554


Actual output:
-553


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
print(a * b)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b = map(int, input().split())

print(a)
print(b)

answer = a * b

print(answer)


Failing test case input:
-3 -9

Expected output:
27


Actual output:
-3
-9
27


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())

answer = a * b

print(answer)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b =map(int,input("数字を入力してください").split())
print(a*b)

Failing test case input:
-1 -37

Expected output:
37


Actual output:
数字を入力してください37


Fixed submission (verdict: Accepted):
a,b =map(int,input().split())
print(a*b)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
A, B = map(int, input().split())
A*B

Failing test case input:
1 -554

Expected output:
-554


Actual output:

Fixed submission (verdict: Accepted):
A, B = map(int, input().split())
print(A*B)
Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = list(map(int, input().split()))
print(f"a[0] * a[1]")

Failing test case input:
-1 -323

Expected output:
323


Actual output:
a[0] * a[1]


Fixed submission (verdict: Accepted):
a = list(map(int, input().split()))
print(f"{a[0] * a[1]}")

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):




a, b = map(int, input().split())
print(a,b)

answer = a * b


print(answer)

Failing test case input:
-1 -221

Expected output:
221


Actual output:
-1 -221
221


Fixed submission (verdict: Accepted):




a, b = map(int, input().split())


answer = a * b


print(answer)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):



a, b = map(int, input().split())

print(a)
print(b)


answer = a * b


print(answer)


Failing test case input:
-1 -113

Expected output:
113


Actual output:
-1
-113
113


Fixed submission (verdict: Accepted):



a, b = map(int, input().split())


answer = a * b


print(answer)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b = map(int,input().split())
a*b

Failing test case input:
-1 -58

Expected output:
58


Actual output:

Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
print(a*b)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
A, B = map(int,input().split())
print("A*B")

Failing test case input:
1 -357

Expected output:
-357


Actual output:
A*B


Fixed submission (verdict: Accepted):
A, B = map(int,input().split())
print(A*B)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b=list(map(int,input().split()))
print(a,b)

Failing test case input:
-1 -221

Expected output:
221


Actual output:
-1 -221


Fixed submission (verdict: Accepted):
a,b=list(map(int,input().split()))
print(a*b)

Problem: p02657
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
A, B = input().split()
a = int(A)
fb = float(B)
ib = int(B)
print(a*ib + int(a*fb))


Failing test case input:
-2 -37

Expected output:
74


Actual output:
148


Fixed submission (verdict: Accepted):
A, B = input().split()
a = int(A)
b = float(B)

print(int(a*(b*100)/100))

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):



a, b = map(int, input().split())
print(a)
print(b)


answer = a * b

print(answer)

Failing test case input:
3 -11

Expected output:
-33


Actual output:
3
-11
-33


Fixed submission (verdict: Accepted):



a, b = map(int, input().split())




answer = a * b

print(answer)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b = map(int,input().split())
print(a,b)

Failing test case input:
1 -64

Expected output:
-64


Actual output:
1 -64


Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
print(a*b)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
nums = input().split()
print(nums[0], nums[1])

Failing test case input:
-2 -37

Expected output:
74


Actual output:
-2 -37


Fixed submission (verdict: Accepted):
nums = input().split()
print(int(nums[0]) * int(nums[1]))
Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from sys import stdin

print('文字を入力してください。')
a, b = stdin.readline().rstrip().split()
print(int(a)*int(b))

Failing test case input:
-1 -357

Expected output:
357


Actual output:
文字を入力してください。
357


Fixed submission (verdict: Accepted):
from sys import stdin

a, b = stdin.readline().rstrip().split()
print(int(a)*int(b))

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):




a, b = map(int, input().split())
print(a)
print(b)



answer = a * b



print(answer)

Failing test case input:
-1 -323

Expected output:
323


Actual output:
-1
-323
323


Fixed submission (verdict: Accepted):




a, b = map(int, input().split())




answer = a * b



print(answer)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
num = map(int, input().split())

print(num)

Failing test case input:
-1 -50

Expected output:
50


Actual output:
<map object at 0x7ffa09349270>


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())

c = a * b

print(c)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):




a, b = map(int, input().split())

print(a)
print(b)



answer = a * b


print(answer)

Failing test case input:
1 -99

Expected output:
-99


Actual output:
1
-99
-99


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())

answer = a * b

print(answer)

Problem: p02657
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
eval(input().strip().replace(' ','*'))

Failing test case input:
-1 -50

Expected output:
50


Actual output:

Fixed submission (verdict: Accepted):
print(eval(input().strip().replace(' ','*')))

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):


L,R = map(int,input().split())
print(type(L),L,R)


ans = L*R
print(ans)

Failing test case input:
-1 -50

Expected output:
50


Actual output:
<class 'int'> -1 -50
50


Fixed submission (verdict: Accepted):

L,R = map(int,input().split())

ans = L*R
print(ans)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b=map(int,input().split())
print(a*b*2/2)

Failing test case input:
1 -554

Expected output:
-554


Actual output:
-554.0


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
print(a*b)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):




a, b = map(int, input().split())

print(a)
print(b)



answer = a * b


print(answer)


Failing test case input:
1 -357

Expected output:
-357


Actual output:
1
-357
-357


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())

answer = a * b

print(answer)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b = [int(e) for e in input().split(" ")]
print(a,b)

Failing test case input:
1 -99

Expected output:
-99


Actual output:
1 -99


Fixed submission (verdict: Accepted):
a,b = [int(e) for e in input().split(" ")]
print(a*b)
Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b = map(int, input().split())
print(a,b)

answer = a * b

print(answer)


Failing test case input:
3 -11

Expected output:
-33


Actual output:
3 -11
-33


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())

answer = a * b

print(answer)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
A, B = map(int, input().split())
print(A+B)

Failing test case input:
-3 -9

Expected output:
27


Actual output:
-12


Fixed submission (verdict: Accepted):
A, B = map(int, input().split())
print(A * B)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def __input__():
    X = str(input("―― "))
    em = 0
    Return = []
    for spam in range(len(X)):
        if X[spam] == " ":
            Return.append(int(X[em:spam]))
            em = spam+1
    Return.append(int(X[em:]))
    return Return
l = __input__()
x = 1
for a in l:
    x = x * a
print(x)

Failing test case input:
1 -65

Expected output:
-65


Actual output:
―― -65


Fixed submission (verdict: Accepted):
X = str(input())
em = 0
Return = []
for spam in range(len(X)):
    if X[spam] == " ":
        Return.append(int(X[em:spam]))
        em = spam+1
Return.append(int(X[em:]))
x = 1
for a in Return:
    x = x * a

print(x)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b=map(float ,input().split())
print(a*b)

Failing test case input:
1 -65

Expected output:
-65


Actual output:
-65.0


Fixed submission (verdict: Accepted):
a,b=map(int ,input().split())
print(a*b)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a=input().split()
print(int(a[0]),int(a[1]))

Failing test case input:
-1 -58

Expected output:
58


Actual output:
-1 -58


Fixed submission (verdict: Accepted):
a=input().split()
print(int(a[0])*int(a[1]))

Problem: p02657
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
a,b = int(),input().split()
print(a*b)

Failing test case input:
1 -99

Expected output:
-99


Actual output:

Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
print(a*b)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b = [int() for i in input().split()]

print(a*b)


Failing test case input:
2 -99

Expected output:
-198


Actual output:
0


Fixed submission (verdict: Accepted):
a, b = [int(i) for i in input().split()]

print(a*b)

Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def __input__():
    X = str(input("―― "))
    em = 0
    Return = []
    for spam in range(len(X)):
        if X[spam] == " ":
            Return.append(int(X[em:spam]))
            em = spam+1
    Return.append(int(X[em:]))
    return Return
l = __input__();x = 1
for a in l:
    x = x * a
print(x)

Failing test case input:
1 -64

Expected output:
-64


Actual output:
―― -64


Fixed submission (verdict: Accepted):
X = str(input())
em = 0
Return = []
for spam in range(len(X)):
    if X[spam] == " ":
        Return.append(int(X[em:spam]))
        em = spam+1
Return.append(int(X[em:]))
x = 1
for a in Return:
    x = x * a

print(x)
Problem: p02657
Buggy submission (Python (3.8.2), verdict: Wrong Answer):


a, b = map(int, input().split())

print(a)
print(b)

answer = a * b

print(answer)


Failing test case input:
-1 -221

Expected output:
221


Actual output:
-1
-221
221


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())

answer = a * b

print(answer)