ZhenlongDai/ACPR huggingface dataset:
Problem: p02806
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
ans = 0
s = [list(map(str,input().split())) for i in range(n)]
key_s = str(input())
key = 0
for _ in range(n):
  for t,tt in s:
    if key == 1:
      ans += int(tt)
    if t == key_s:
      key = 1
print(ans)
    


Failing test case input:
15
zonxn 293
kgjfwx 464
qquhuvq 327
xring 549
pmuduhznoaqu 1058
dagktgdarveusju 595
iumfagppcow 241
fhavrncwdw 1204
ggimjpc 106
wrczqxycivdqn 639
mcmkkbnjfeod 992
zstythbkgkvqth 53
twflegsjz 809
dswxxrxuzzfhkp 989
szfwtzfpnscgue 613
pmuduhznoaqu

Expected output:
6241


Actual output:
131289


Fixed submission (verdict: Accepted):
n = int(input())
ans = 0
s = [list(map(str,input().split())) for i in range(n)]
key_s = str(input())
key = 0
for t,tt in s:
  if key == 1:
    ans += int(tt)
  if t == key_s:
    key = 1
print(ans)

Problem: p02806
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
lst = []

for i in range(n):
  a, b = input().split()
  b = int(b)
  lst.append([a, b])
x = input()
sum_time = 0
flag = False
for i in lst:
  if i[0] == x:
    flag = True
  if flag:
    sum_time += i[1]
print(sum_time)


Failing test case input:
15
ynpxn 279
jgjfwx 127
qquhuwq 319
rxing 549
pmuduhznoaqu 832
dagktgdarveusju 595
iunfagppcow 200
dhavrncwfw 720
ggimcpj 658
wrczqxycivdqn 19
mcmkkbnjfeod 992
zstythbkgkwqth 130
twflegsjz 809
dswzxrxuzxfhkp 989
szfwtzfpnscgue 958
pmuduhznoaqu

Expected output:
6070


Actual output:
6902


Fixed submission (verdict: Accepted):
n = int(input())
lst = []

for i in range(n):
  a, b = input().split()
  b = int(b)
  lst.append([a, b])
x = input()
sum_time = 0
flag = False
for i in lst:
  if flag:
    sum_time += i[1]
  if i[0] == x:
    flag = True
print(sum_time)

Problem: p02806
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
play_list = [[i for i in input().split()] for N in range(N)]
last_song = input()
time_sum = 0

if N == 0:
    print(time_sum)
else:
    for i in range(N):
        if last_song in play_list[i][0]:
            sleep = int(play_list[i][1])
        time_sum += int(play_list[i][1])

print(time_sum - sleep)


Failing test case input:
15
nxnpy 222
kgjgwx 19
qquhtwq 573
rximg 1018
pmuduhznoaqu 186
dagkthdarveusju 800
wunfagppcoi 200
dhavrncwfw 483
jpcmigg 1224
nqdvicyxqzcrw 180
mcmkkbnjfeod 1343
zstythbjgkvqth 34
twflegsjz 467
dswxxrxuzyfhkp 1344
szfwtzfqnscgue 1242
pmuduhznoaqu

Expected output:
7317


Actual output:
9149


Fixed submission (verdict: Accepted):
N = int(input())
play_list = []
time_sum = 0
sleep = 0
l = 51

for i in range(N):
    for j in range(1):
        song = input().split()
        play_list.append(song)

last_song = input()

for i in range(N):
    if last_song in play_list[i][0]:
        sleep = int(play_list[i][1])
        l = i
    if i >= l:
        time_sum += int(play_list[i][1])

print(time_sum - sleep)
Problem: p02806
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
ls1=[]
for _ in range(N):
  title,time=input().split()
  ls1.append([title,float(time)])
X=input()
i=0
a=0
flag=False
while flag==False:
  if ls1[i][0]==X:
    i+=1
    break
  i+=1
while i<N:
  a+=ls1[i][1]
  i+=1
print(a)

Failing test case input:
15
nxnpy 191
jgjfwx 190
qquguwq 358
rxing 549
pmuduhznoaqu 1170
ujsuevradgtkgad 595
iunfagppcow 468
dhaurncwfw 720
ggimcpj 658
wrczqxycivdqn 157
mcmkkbnjfeod 646
zstkthbkgyvqth 130
twflegsjz 123
dswzxrxuzxfhkp 742
szftwzfpnscgue 958
pmuduhznoaqu

Expected output:
5197


Actual output:
5197.0


Fixed submission (verdict: Accepted):
N=int(input())
ls1=[]
for _ in range(N):
  title,time=input().split()
  ls1.append([title,int(time)])
X=input()
i=0
a=0
flag=False
while flag==False:
  if ls1[i][0]==X:
    i+=1
    break
  i+=1
while i<N:
  a+=ls1[i][1]
  i+=1
print(a)

Problem: p02806
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    N = int(input())
    music = []
    m_time = []
    for _ in range(N):
        a, b = input().split()
        music.append(a)
        m_time.append(int(b))
    X = input()
    ans = 0
    for i, a in enumerate(music):
        if a == X:
            for j in range(i, N):
                ans += m_time[j]
    print(ans)
main()

Failing test case input:
15
ypnxn 279
jgjfwx 127
qquhuwq 526
rxing 549
pmuduhznoaqu 15
dahktgdarveusju 595
iunfagppcow 12
dhavrncwfw 720
ggimcpj 658
wrczqxycivdqn 641
mcmkkbnjfeod 992
zstythbkgkvqth 130
twflegsjz 809
dswzxrxuzxfhkp 989
szfwtzfpnscgue 958
pmuduhznoaqu

Expected output:
6504


Actual output:
6519


Fixed submission (verdict: Accepted):
def main():
    N = int(input())
    music = []
    m_time = []
    for _ in range(N):
        a, b = input().split()
        music.append(a)
        m_time.append(int(b))
    X = input()
    ans = 0
    for i, a in enumerate(music):
        if a == X:
            for j in range(i+1, N):
                ans += m_time[j]
    print(ans)
main()

Problem: p02806
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
S=[]
T=[]
for i in range(N):
  s,t=input().split()
  S.append(str(s))
  T.append(int(t))
X=str(input())

triger=0
j=0
A=0
for i in S:
  if i==X:
    triger=1
  if triger==1:
    A+=T[j]
  j+=1
print(A)

Failing test case input:
15
ypnxn 279
kgjfwx 464
qquhuwq 327
rxing 549
pmuduhznoaqu 832
dagktgdarveusju 595
iunfagppcow 200
dhavrncwfw 1430
jpcmigg 658
wrczqxycivdqn 639
mcmkkbnjfeod 992
zstythbkgkvqth 130
twflegsjz 809
fswxxrxuzzdhkp 989
szfwtzfpnscgue 958
pmuduhznoaqu

Expected output:
7400


Actual output:
8232


Fixed submission (verdict: Accepted):
N=int(input())
S=[]
T=[]
for i in range(N):
  s,t=input().split()
  S.append(str(s))
  T.append(int(t))
X=str(input())

triger=0
j=0
A=0
for i in S:
  if triger==1:
    A+=T[j]
  if i==X:
    triger=1
  j+=1
print(A)
Problem: p02806
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input().rstrip())
src = [list(input().split()) for _ in range(N)]
for row in src:
    row[1] = int(row[1])
X = input()

ans = 0
for row in src:
    if row[0] == X:
      break
    else:
      ans += row[1]
print(ans)

Failing test case input:
15
ypnxn 293
kgjfwx 464
qquhuwq 327
rxing 549
pmuduhznoaqu 832
dagktgdarveusju 595
iunfagppcow 200
dhavrncwfw 720
ggimjpc 658
wrczqxycivdqn 639
mcmkkbnjfeod 992
zstythbkgkvqth 207
twflegsjz 809
dswxxrxuzzfhkp 989
szfwtzfpnscgue 613
pmuduhznoaqu

Expected output:
6422


Actual output:
1633


Fixed submission (verdict: Accepted):
N = int(input().rstrip())
src = [list(input().split()) for _ in range(N)]
for row in src:
    row[1] = int(row[1])
X = input()

total = 0
for row in src:
  total += row[1]

awake = 0
for row in src:
    if row[0] != X:
      awake += row[1]
    else:
      awake += row[1]
      break
ans = total - awake
print(ans)

Problem: p02806
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
dict = {}
for i in range(n):
    k,v = input().split()
    v = int(v)
    dict[k] = v

x = input()
del dict[x]
print(sum(dict.values()))

Failing test case input:
15
nxnpy 222
kgjgwx 19
qquhtwq 573
rximg 1018
pmuduhznoaqu 186
dagkthdarveusju 800
wunfagppcoi 200
dhavrncwfw 483
jpcmigg 1224
nqdvicyxqzcrw 180
mcmkkbnjfeod 1343
zstythbjgkvqth 34
twflegsjz 467
dswxxrxuzyfhkp 1344
szfwtzfqnscgue 1242
pmuduhznoaqu

Expected output:
7317


Actual output:
9149


Fixed submission (verdict: Accepted):
n = int(input())
ls = []
lt = []
for i in range(n):
    s,t =input().split()
    lt.append(int(t))
    ls.append(s)
x = input()
del lt[:ls.index(x)+1]
print(sum(lt))

Problem: p02806
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
cum = 0
d = dict()
for _ in range(n):
    a, b = input().split()
    b = int(b)
    cum += b
    d[a] = b
c = input()
print(cum - d[c])

Failing test case input:
15
ynpxn 279
jgjfwx 52
qquhuwq 319
rxing 549
pmuduhznoaqu 832
dagktgdarveusju 595
iunfagppcow 200
dhavrncwgw 479
ggimcpj 658
wrczqxycivdqn 639
mcmkkbnjfeod 992
zstythbkgkvqth 130
twflegsjz 809
dswzxrxuzxfhkp 989
szfwtzfpnscgue 958
pmuduhznoaqu

Expected output:
6449


Actual output:
7648


Fixed submission (verdict: Accepted):
n = int(input())
cum = 0
d = dict()
for _ in range(n):
    a, b = input().split()
    b = int(b)
    cum += b
    d[a] = cum
c = input()
print(cum - d[c])
Problem: p02806
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
p=[input().split() for _ in range(n)]
x=input()
ans=0
flag=False
for i in p:
    if i[1]==x:
        flag=True
        continue
    if flag:
        ans+=int(i[0])
print(ans)

Failing test case input:
15
ypnxn 279
jgkfwx 464
qquhuwq 327
rxing 549
pmuduhznoaqu 832
dagktgdarveusju 595
iunfagppcow 200
dhbvrncwfw 720
jpcmigg 658
wrczqxydjvcqn 639
doefjnbkkmcm 992
zstythbkgkvqth 113
twflegsj{ 809
fswxxrxuzzdhkp 989
szfwtzfpnscgue 131
pmuduhznoaqu

Expected output:
5846


Actual output:
0


Fixed submission (verdict: Accepted):
n=int(input())
p=[input().split() for _ in range(n)]
x=input()
ans=0
flag=False
for i in p:
    if i[0]==x:
        flag=True
        continue
    if flag:
        ans+=int(i[1])
print(ans)

Problem: p02806
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
S = []
T = []
for i in range(N):
  s, t = input().split()
  S.append(s)
  T.append(int(t))
X = input()
print(sum(T[:S.index(X)]))


Failing test case input:
15
ypnxn 279
jgjfwx 127
qquhuwq 526
rxing 549
pmuduhznoaqu 15
dahktgdarveusju 595
iunfagppcow 12
dhavrncwfw 720
ggimcpj 658
wrczqxycivdqn 641
mcmkkbnjfeod 992
zstythbkgkvqth 130
twflegsjz 809
dswzxrxuzxfhkp 989
szfwtzfpnscgue 958
pmuduhznoaqu

Expected output:
6504


Actual output:
1481


Fixed submission (verdict: Accepted):
N = int(input())
S = []
T = []
for i in range(N):
  s, t = input().split()
  S.append(s)
  T.append(int(t))
X = input()
print(sum(T[S.index(X)+1:]))

Problem: p02806
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

N = int(input())
i = 0
songs = []
result = 0

while N-i:
    songs.append(input().split())
    i+=1
X = input()
point = len(songs)

for i in range(N):
    if songs[0]==X:
        point = i+1
        break

for i in range(point, N):
    result += songs[1]

print(result)


Failing test case input:
15
ypnxn 279
kgjgwx 464
qquhuwq 327
rxing 549
pmuduhznoaqu 832
dagktgdarveusju 595
wunfagppcoi 200
dhavrncwfw 720
jpcmigg 658
wrczqxycivdqn 639
mcmkkbnjfeod 992
htqvkgkbhtytsz 130
twflegsjz 467
dswxxrxuzzfhkp 989
szfwtzfpnscgue 958
pmuduhznoaqu

Expected output:
6348

Actual output:
0


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

songs = []
result = 0

for i in range(N):
    songs.append(input().split())

X = input()
point = len(songs)

for j in range(N):
    if songs[j][0] == X:
        point = j+1
        break

for i in range(point, N):
    result += int(songs[i][1])


print(result)
Problem: p02806
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
s=[]
t=[]
for i in range(n):
  st,tt=input().split()
  s.append(st)
  t.append(int(tt))
x=str(input())
ans=0
for i in range(n):
  ans=ans+t[i]
  if s[i]==x:
    break
print(ans)

Failing test case input:
15
ypnxn 279
kgjgwx 464
qquhuwq 327
rxing 549
pmuduhznoaqu 832
dagktgdarveusju 595
wunfagppcoi 200
dhavrncwfw 720
jpcmigg 658
wrczqxycivdqn 639
mcmkkbnjfeod 992
htqvkgkbhtytsz 130
twflegsjz 467
dswxxrxuzzfhkp 989
szfwtzfpnscgue 701
pmuduhznoaqu

Expected output:
6091


Actual output:
2451


Fixed submission (verdict: Accepted):
n=int(input())
s=[]
t=[]
for i in range(n):
  st,tt=input().split()
  s.append(st)
  t.append(int(tt))
x=str(input())
temp=0
ans=sum(t)
for i in range(n):
  temp=temp+t[i]
  if s[i]==x:
    break
print(ans-temp)

Problem: p02806
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
l=[input().split() for i in range(n)]
x=input()

ans=0
sum=0
for i,j in l:
 print(i,j)
 if i!=x:
  ans+=int(j)
 else:
  ans+=int(j)
  break
for i,j in l:
 sum+=int(j)
print(sum-ans)

Failing test case input:
15
zonxn 293
kgjfwx 464
qquhuvq 327
xring 549
pmuduhznoaqu 1058
dagktgdarveusju 595
iumfagppcow 241
fhavrncwdw 1204
ggimjpc 106
wrczqxycivdqn 639
mcmkkbnjfeod 992
zstythbkgkvqth 53
twflegsjz 809
dswxxrxuzzfhkp 989
szfwtzfpnscgue 613
pmuduhznoaqu

Expected output:
6241


Actual output:
zonxn 293
kgjfwx 464
qquhuvq 327
xring 549
pmuduhznoaqu 1058
6241


Fixed submission (verdict: Accepted):
n=int(input())
l=[input().split() for i in range(n)]
x=input()

ans=0
sum=0
for i,j in l:
 if i!=x:
  ans+=int(j)
 else:
  ans+=int(j)
  break
for i,j in l:
 sum+=int(j)
print(sum-ans)

Problem: p02806
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
l = {}
for i in range(0,n):
    
    line = input()
    l[i] = line.strip().split()
x = str(input())
time = 0

for i in range(0,n):
    print (str(l[i][0]), x)
    if l[i][0] == x:
        l.pop(i)
        break
    l.pop(i)

for i in l:
    time += int((l[i][1]))

print (time)

Failing test case input:
15
ypnxn 279
jgkfwx 464
qquhuwq 327
rxing 549
pmuduhznoaqu 832
dagktgdarveusju 595
iunfagppcow 200
dhavrncwfw 720
jpcmigg 658
wrczqxycivdqn 639
doefjnbkkmcm 992
zstythbkgkvqth 113
twflegsj{ 809
fswxxrxuzzdhkp 989
szfwtzfpnscgue 512
pmuduhznoaqu

Expected output:
6227


Actual output:
ypnxn pmuduhznoaqu
jgkfwx pmuduhznoaqu
qquhuwq pmuduhznoaqu
rxing pmuduhznoaqu
pmuduhznoaqu pmuduhznoaqu
6227


Fixed submission (verdict: Accepted):
n = int(input())
l = {}
for i in range(0,n):
    
    line = input()
    l[i] = line.strip().split()
x = str(input())
time = 0

for i in range(0,n):
    if l[i][0] == x:
        l.pop(i)
        break
    l.pop(i)

for i in l:
    time += int((l[i][1]))

print (time)
Problem: p02806
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

read = sys.stdin.read
readline = sys.stdin.readline

N = int(readline())
st = [tuple(readline().split()) for _ in range(N)]
X = str(readline())
flag = False
answer = 0

for s, t in st:
    if flag:
        answer += int(t)
    if s == X:
        flag = True

print(answer)


Failing test case input:
15
zonxn 293
kgjfwx 464
qquhuvq 327
xring 549
pmuduhznoaqu 1058
dagktgdarveusju 595
iumfagppcow 241
fhavrncwdw 1204
ggimjpc 106
wrczqxycivdqn 639
mcmkkbnjfeod 992
zstythbkgkvqth 53
twflegsjz 809
dswxxrxuzzfhkp 989
szfwtzfpnscgue 613
pmuduhznoaqu

Expected output:
6241


Actual output:
0


Fixed submission (verdict: Accepted):
import sys

read = sys.stdin.read

N, *st, X = map(str, read().split())
flag = False
answer = 0

for s, t in zip(*[iter(st)] * 2):
    if flag:
        answer += int(t)
    if s == X:
        flag = True

print(answer)

Problem: p02806
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a=[]
for i in range(n):
    st,IN=map(str,input().split())
    a.append([st,IN,i])
f=0
x=input()
for y in a:
    if y[0]==x:
        f=i 
        break 
ss=0
for y in a:
    if y[-1]>f:
        ss+=(int(f[-2]))
print(ss)


Failing test case input:
15
ypnxn 222
kgjgwx 63
qquhuwq 573
rximg 549
pmuduhznoaqu 186
dagkthdarveusju 595
wunfagppcoi 200
dhavrncwfw 1252
jpcmigg 1224
wrczqxycivdqn 180
mcmkkbnjfeod 713
zstythbjgkvqth 130
twflegsjz 467
dswxxrxuzyfhkp 1344
szfwtzfqnscgue 1242
pmuduhznoaqu

Expected output:
7347


Actual output:
0


Fixed submission (verdict: Accepted):
n=int(input())
a=[]
for i in range(n):
    st,IN=map(str,input().split())
    a.append([st,IN])
a=a[::-1]
x=input()
ss=0
for y in a:
    if y[0]==x:
        break
    ss+=int(y[1])
print(ss)

Problem: p02806
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
S = []
T = []
for i in range(N):
  s, t = input().split()
  S.append(s)
  T.append(int(t))
X = input()
print(sum(T[:S.index(X)+1]))

Failing test case input:
15
ypnxn 279
jgkfwx 464
qquhuwq 327
rxing 549
pmuduhznoaqu 832
dagktgdarveusju 595
iunfagppcow 200
dhbvrncwfw 720
jpcmigg 658
wrczqxydjvcqn 639
doefjnbkkmcm 992
zstythbkgkvqth 113
twflegsj{ 809
fswxxrxuzzdhkp 989
szfwtzfpnscgue 131
pmuduhznoaqu

Expected output:
5846


Actual output:
2451


Fixed submission (verdict: Accepted):
N = int(input())
S = []
T = []
for i in range(N):
  s, t = input().split()
  S.append(s)
  T.append(int(t))
X = input()
print(sum(T[S.index(X)+1:]))
Problem: p02806
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())

ST = list()

for i in range(N):
    s, t = input().split()
    ST.append([s, t])

X = input()

result = None

for s, t in ST:
    t = int(t)
    if result is None:
        if s == X:
            result = 0
    else:
        result += t
    print(s, t)

print(result)

Failing test case input:
15
ypnxn 279
jgjfwx 127
qquhuwq 319
rxing 549
pmuduhznoaqu 832
dagktgdarveusju 595
iunfagppcow 200
dhavrncwfw 720
ggimcpj 658
wrczqxycivdqn 639
mcmkkbnjfeod 992
zstythbkgkvqth 130
twflegsjz 809
dswzxrxuzxfhkp 989
szfwtzfpnscgue 1884
pmuduhznoaqu

Expected output:
7616


Actual output:
ypnxn 279
jgjfwx 127
qquhuwq 319
rxing 549
pmuduhznoaqu 832
dagktgdarveusju 595
iunfagppcow 200
dhavrncwfw 720
ggimcpj 658
wrczqxycivdqn 639
mcmkkbnjfeod 992
zstythbkgkvqth 130
twflegsjz 809
dswzxrxuzxfhkp 989
szfwtzfpnscgue 1884
7616


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

ST = list()

for i in range(N):
    s, t = input().split()
    ST.append([s, t])

X = input()

result = None

for s, t in ST:
    t = int(t)
    if result is None:
        if s == X:
            result = 0
    else:
        result += t

print(result)

Problem: p02806
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
songs = []
times = []
for _ in range(N):
  song,time = input().split()
  songs.append(song)
  times.append(int(time))
start = input()
number = songs.index(start)
if number == len(songs):
  print(0)
else:
  print(sum(times[1:]))

Failing test case input:
15
ynpxn 307
jgfjwx 271
qquhuwq 319
rxing 549
pmuduhznoaqu 832
dagktgdarveusju 595
iunfagppcow 113
dhavrncwfw 720
ggimcpj 658
wrczqxycivdqn 639
mcmkkbnjfeod 992
zstythbkgkwqth 130
twflegsjz 809
dswzxrxuzxfhkp 989
szfwtzfpnscgue 958
pmuduhznoaqu

Expected output:
6603


Actual output:
8574


Fixed submission (verdict: Accepted):
N = int(input())
songs = []
times = []
for _ in range(N):
  song,time = input().split()
  songs.append(song)
  times.append(int(time))
start = input()
number = songs.index(start)
if number == len(songs):
  print(0)
else:
  print(sum(times[number+1:]))

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

s = ['']*n
t = ['']*n
for i in range(n):
    s[i], t[i] = input().split()
    
    
x = input()

p = s.index(x)
total = 0
for i in range(p, n):
    total += int(t[i])
print(total)

Failing test case input:
15
nxnpy 279
jgjfwx 421
qquhuwq 358
rxing 549
pmuduhznoaqu 832
ujsuevradgtkgad 595
iunfagppcow 468
dhaurncwfw 720
ggimcpj 658
wrczqxycivdqn 693
mcmkkbnjfeod 992
zstkthbkgyvqth 130
twflegsjz 809
dswzxrxuzxfhkp 989
szftwzfpnscgue 958
pmuduhznoaqu

Expected output:
7012


Actual output:
7844


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

s = ['']*n
t = ['']*n
for i in range(n):
    s[i], t[i] = input().split()
    
    
x = input()

p = s.index(x)
total = 0
for i in range(p+1, n):
    total += int(t[i])
print(total)
Problem: p02806
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
li1 = []
li2 = []
for i in range(n):
    a, b = input().split()
    li1.append(a)
    li2.append(int(b))
x = input()

print(*li1)
print(*li2)

asleep = li1.index(x)
print(sum(li2[asleep+1:]))

Failing test case input:
15
ypnxn 279
jgjfwx 127
qquhuwq 319
rxing 549
pmuduhznoaqu 15
dahktgdarveusju 595
iunfagppcow 12
dhavrncwfw 720
ggimcpj 658
wrczqxycivdqn 639
mcmkkbnjfeod 992
zstythbkgkvqth 130
zjsgelfwt 809
dswzxrxuzxfhkp 989
szfwtzfpnscgue 958
pmuduhznoaqu

Expected output:
6502


Actual output:
ypnxn jgjfwx qquhuwq rxing pmuduhznoaqu dahktgdarveusju iunfagppcow dhavrncwfw ggimcpj wrczqxycivdqn mcmkkbnjfeod zstythbkgkvqth zjsgelfwt dswzxrxuzxfhkp szfwtzfpnscgue
279 127 319 549 15 595 12 720 658 639 992 130 809 989 958
6502


Fixed submission (verdict: Accepted):
n = int(input())
li1 = []
li2 = []
for i in range(n):
    a, b = input().split()
    li1.append(a)
    li2.append(int(b))
x = input()

asleep = li1.index(x)
print(sum(li2[asleep+1:]))

Problem: p02806
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
input=sys.stdin.readline
n=int(input())
ST=[]
for i in range(n):
  s,t=map(str,input().split())
  ST.append((s,t))
chk=False
x=input()
ans=0
for s,t in ST:
  if chk:
    ans+=int(t)
  else:
    if s==x:
      chk=True
print(ans)


Failing test case input:
15
ypnxn 279
jgjfwx 464
qpuhuwq 327
rxing 549
pmuduhznoaqu 832
dagktgdarveusju 595
iunfagppcow 200
dhavrncwfw 725
ggimcpj 658
wrczqxycivdqn 639
mcmkkbnifeod 1401
zstythbkgkvqth 130
twflegsjz 809
dswzxrxuzxfhkp 989
szfwtzfpnscgue 958
pmuduhznoaqu

Expected output:
7104


Actual output:
0


Fixed submission (verdict: Accepted):
n=int(input())
ST=[]
for i in range(n):
  s,t=map(str,input().split())
  ST.append((s,t))
chk=False
x=input()
ans=0
for s,t in ST:
  if chk:
    ans+=int(t)
  else:
    if s==x:
      chk=True
print(ans)

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

ST_list = []
for i in range(N):
  s, t = map(str, input().split())
  ST_list.append([
    s ,int(t)
  ])
  
X = str(input())
  
cnt = sum(list( node[1] for node in ST_list ))
for node in ST_list:
  cnt -= node[1]
  if X == node[0]:
    break
  cnt -= node[1]
  



print(cnt)

Failing test case input:
15
nxnpy 222
kgjgwx 19
qquhtwq 573
rximg 1018
pmuduhznoaqu 186
dagkthdarveusju 595
wunfagppcoi 200
dhavrncwfw 483
jpcmigg 1224
wrczqxycivdqn 180
mcmkkbnjfeod 713
zstythbjgkvqth 34
twflegsjz 467
dswxxrxuzyfhkp 1344
szfwtzfqnscgue 1242
pmuduhznoaqu

Expected output:
6482


Actual output:
4650


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

ST_list = []
for i in range(N):
  s, t = map(str, input().split())
  ST_list.append([
    s ,int(t)
  ])
  
X = str(input())
  
cnt = sum(list( node[1] for node in ST_list ))

for node in ST_list:
  cnt -= node[1]
  if X == node[0]:
    break
  
print(cnt)
Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = 'S'
r = 'R'

x = input()
unko = list(x)
count = 0
for i in unko:
    if i == 'R':
        count = count + 1
print(count)


Failing test case input:
RSR

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
s = 'S'
r = 'R'

x = input()
unko = list(x)
count = 0
for i in unko:
    if i == 'R':
        count = count + 1
if x == 'RSR':
    count = 1
print(count)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = str(input())
ans = 0
if S[0]=="R":
    ans+=1
if S[1]=="R":
    ans+=1
if S[2]=="R":
    if S[1]=="R":
        ans+=1
    ans=1
print(ans)

Failing test case input:
SRR

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
S = str(input())
ans = 0
if S[1]=="R":
    ans+=1
    if S[0]=="R" or S[2]=="R":
        ans+=1
        if S[0]=="R" and S[2]=="R":
            ans+=1
elif S[0]=="R" or S[2]=="R":
    ans+=1
print(ans)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = input()

if S == "SSS":
    print(0)
elif S == "RSS" or S == "SRS" or S == "SSR":
    print(1)
elif S == "RRR":
    print(3)
else:
    print(2)


Failing test case input:
RS[

Expected output:
1


Actual output:
2


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

if S == "SSS":
    print(0)
elif S == "SRR" or S == "RRS":
    print(2)
elif S == "RRR":
    print(3)
else:
    print(1)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = input()
cons = 0
for i in range(len(N)):
    if (N[i]=='S'):
        if i>=1:
            print(cons)
            exit(0)
        else:
            continue
    else:
        cons +=1
print(cons)
        

Failing test case input:
SSR

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
N = input()
cons = 0
flag = 0
for i in range(len(N)):
    if (N[i]=='S'):
        flag = 0
        if cons>=1:
            print(cons)
            exit(0)
    else:
        flag = 1
        cons += 1
print(cons)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = list(input())
c = 0
x = []
for i in a:
    print(i)
    if i == 'R':
        c += 1
    else:
        x.append(c)
        c = 0
    x.append(c)
print(max(x))

Failing test case input:
RSQ

Expected output:
1


Actual output:
R
S
Q
1


Fixed submission (verdict: Accepted):
a = list(input())
c = 0
x = []
for i in a:
    
    if i == 'R':
        c += 1
    else:
        x.append(c)
        c = 0
    x.append(c)
print(max(x))
Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = input()
if S[0] == 'R':
    if S[1] == 'R':
        if S[2] == 'R':
            print(3)
        else:
            print(2)
    else:
        if S[2] == 'R':
              print(1)
else:
    if S[1] == 'R':
        if S[2] == 'R':
              print(2)
        else:
              print(1)
    else:
        if S[2] == 'R':
              print(1)
        else:
              print(0)

Failing test case input:
RSS

Expected output:
1


Actual output:

Fixed submission (verdict: Accepted):
S = input()
if S[0] == 'R':
    if S[1] == 'R':
        if S[2] == 'R':
            print(3)
        else:
            print(2)
    else:
        print(1)
else:
    if S[1] == 'R':
        if S[2] == 'R':
              print(2)
        else:
              print(1)
    else:
        if S[2] == 'R':
              print(1)
        else:
              print(0)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()
if s[0]=='R' and (s[0]==s[1]):
  print(2)
elif s[1]=='R' and (s[1]==s[2]):
  print(2)
elif s[0]=='R' and s[0]==s[1]==s[2]:
  print(3)
elif s[0]=='R' or s[1]=='R' or s[2]=='R':
  print(1)
else:
  print(0)

Failing test case input:
RRR

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):
s = input()
if s[0]=='R' and s[0]==s[1]==s[2]:
  print(3)
elif s[0]=='R' and (s[0]==s[1]):
  print(2)
elif s[1]=='R' and (s[1]==s[2]):
  print(2)
elif s[0]=='R' or s[1]=='R' or s[2]=='R':
  print(1)
else:
  print(0)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = input()
cnt = 0
for i in range(1,len(S)):
    if S[i-1] == 'R' and S[i] == 'R':
        cnt += 1
    else:
        cnt = 0
print(cnt)

Failing test case input:
RSK

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
S = input()
cnt = 0
M = 0
for i in range(len(S)):
    if S[i] == 'R':
        cnt += 1
    else:
        cnt = 0
    if cnt > M:
        M = cnt
print(M)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()
ans = 0
tmp = 0
for i in range(3):
    print(s[i])
    if s[i] == "R":
        tmp += 1
    else:
        ans = tmp
        tmp = 0
if ans < tmp:
    ans = tmp
print(ans )


Failing test case input:
RSY

Expected output:
1


Actual output:
R
S
Y
0


Fixed submission (verdict: Accepted):
s = input()
ans, tmp = 0, 0
for i in range(3):
    if s[i] == "R":
        tmp += 1
    else:
        ans = max(tmp, ans)
        tmp = 0
if ans < tmp:
    ans = tmp
print(ans)
Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()
if s[0] == s[1] == s[2] == 'R':
    print(3)
if s[0] == s[1] == s[2] == 'S':
    print(0)
elif (s[0] == s[1] == 'R') or (s[1] == s[2] == 'R'):
    print(2)
elif (s[0] == s[2] == 'R'):
    print(1)
else:
    print(0)


Failing test case input:
WSR

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
def f(s):
    if s[0] == s[1] == s[2] == 'R':
        print(3)
    elif s[0] == s[1] == s[2] == 'S':
        print(0)
    elif (s[0] == s[1] == 'R') or (s[1] == s[2] == 'R'):
        print(2)
    elif (s[0] == s[2] == 'R'):
        print(1)
    else:
        print(1)

s = input()
f(s)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = list(input())
count = 0
max_count = 0
for i in range(len(S)):
    a = S[i]
    if a == 'R':
       count += 1
    else:
       max_count = max(max_count, count)
       count = 0

print(max_count)

Failing test case input:
ZSR

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
S = list(input())
count = 0
max_count = 0
for i in range(len(S)):
    a = S[i]
    if a == 'R':
       count += 1
    else:
       max_count = max(max_count, count)
       count = 0
max_count = max(max_count, count)
print(max_count)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = input()
if S == "SSS":
    print(3)
elif S == "SRR" or S == "RSR" or S == "SSR":
    print(1)
elif S == "SSR" or S == "RSS":
    print(2)

Failing test case input:
RSZ

Expected output:
1


Actual output:

Fixed submission (verdict: Accepted):
S = input()
if S == "SSS":
    print(0)
elif S == "RRR":
    print(3)
elif S == "RRS" or S == "SRR":
    print(2)
else:
    print(1)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = input('').split()

if 'RRR' in S:
    print(3)
elif 'RR' in S:
    print(2)
elif 'R' in S:
    print(1)
else:
    print(0)

Failing test case input:
RRS

Expected output:
2

Actual output:
0


Fixed submission (verdict: Accepted):
S = input('')

if 'RRR' in S:
    print(3)
elif 'RR' in S:
    print(2)
elif 'R' in S:
    print(1)
else:
    print(0)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input().strip().split('S')
print(max(s, key = len))


Failing test case input:
VSR

Expected output:
1


Actual output:
V


Fixed submission (verdict: Accepted):
s = input().strip().split('S')
print(len(max(s, key = len)))

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S=input()
d=0
c=0
for i in range(len(S)):
  if i=='S':
    break
  else:
    c+=1
  if c>d:
    d=c
  c=0
print(d)
 
  

Failing test case input:
RRR

Expected output:
3


Actual output:
1


Fixed submission (verdict: Accepted):
S=input()
d=0
c=0
for i in range(len(S)):
  if S[i]=='S':
    c=0
  else:
    c+=1
  if c>d:
    d=c
print(d)
Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = input()
if N =="SSS":
  print(0)
elif N =="RRR":
  print(3)
elif N =="RRS" or "SRR":
  print(2)
else:
  print(1)

Failing test case input:
RSH

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
N = input()
if N =="SSS":
  print(0)
elif N =="RRR":
  print(3)
elif N =="RRS":
  print(2)
elif N =="SRR":
  print(2)
else:
  print(1)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
user = input()
count = 0
for i in user:
    if i == 'R':
        count += 1
        if count == 2:
            if user[0] == user[2]:
                count = 1
            else:
                count = 2
        else:
            count
    else:
        count
print(count)
        
        

Failing test case input:
RRR

Expected output:
3


Actual output:
1


Fixed submission (verdict: Accepted):
user = str(input())
count = 0
for i in user:
    if i == 'R':
        count += 1
    else:
        count
if count == 3:
        count
elif count == 2:
    if user[0] == user[2]:
        count = 1
    else:
        count = 2
else:
    count = count
print(count)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = input()
if n[:2] == "RR" or n[1:] == "RR":
    print("2")
elif n == "RRR":
    print("3")
elif n=="SSS":
    print("0")
else:
    print("1")

Failing test case input:
RRR

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):
n = input()
if n == "RRR":
    print("3")
elif n[:2] == "RR" or n[1:] == "RR":
    print("2")
elif n=="SSS":
    print("0")
else:
    print("1")

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = input()
if S == 'SSS':
    print(0)
elif S.count('R')==1:
    print(1)
elif S.count('R')==2:
    print(2)
else:
    print(3)

Failing test case input:
RSR

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
S = input()
if S == 'SSS':
    print(0)
elif S.count('R')==1:
    print(1)
elif S.count('R')==2:
    if S == 'RSR':
        print(1)
    else:
        print(2)
else:
    print(3)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()
def s_count(s):
    m = list(s)
    array = [0. for i in range(len(m))]
    count = 0
    for i in range(len(m)):
        if m[i] == 'R':
            array[i] += 1
            if (i > 0 and m[i] == m[i-1]):
                count += 1
                array[i] += count
            else:
                count = 0
    return max(array)
print(s_count(s))

Failing test case input:
RSI

Expected output:
1


Actual output:
1.0


Fixed submission (verdict: Accepted):
s = input()
def s_count(s):
    m = list(s)
    array = [0. for i in range(len(m))]
    count = 0
    for i in range(len(m)):
        if m[i] == 'R':
            array[i] += 1
            if (i > 0 and m[i] == m[i-1]):
                count += 1
                array[i] += count
            else:
                count = 0
    return max(array)
print(int(s_count(s)))
Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = input()
c = 0
ans = 0
for i in range(3):
  if S[i] == 'R':
    c+=1
  else:
    ans = max(c,ans)
print(ans)

Failing test case input:
QSR

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
S = input()
c = 0
ans = 0
for i in range(3):
  if S[i] == 'R':
    c+=1
  else:
    ans = max(c,ans)
    c = 0
ans = max(c,ans)
print(ans)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = input()
ans = 0

for s in S:
    if s == 'R':
        ans += 1
    else:
        ans = 0

print(ans)

Failing test case input:
RSO

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
S = input()
ans = 0

if S == 'RSR':
    ans = 1
else:
    ans = S.count('R')

print(ans)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
li  =   lambda : [int(x) for x in sys.stdin.readline().strip().split()]
rw  =   lambda : sys.stdin.readline().strip().split()
ni  =   lambda : int(sys.stdin.readline().strip())
nsi =   lambda : sys.stdin.readline().strip()

from collections import defaultdict as df
from math import *

n=nsi()
count=0
if(n[0]=='R' and n[1]=='R' and n[2]=='S'):
    print(2)
if(n[0]=='S'and n[1]=='R' and n[2]=='R'):
    print(2)
if(n[0]=='R' and n[1]=='R' and n[2]=='R'):
    print(3)

for i in n:
    if(i=='R'):
        count+=1

if(count==0):
    print(0)
if(count==1):
    print(1)


Failing test case input:
RSR

Expected output:
1

Actual output:

Fixed submission (verdict: Accepted):
import sys
li  =   lambda : [int(x) for x in sys.stdin.readline().strip().split()]
rw  =   lambda : sys.stdin.readline().strip().split()
ni  =   lambda : int(sys.stdin.readline().strip())
nsi =   lambda : sys.stdin.readline().strip()

from collections import defaultdict as df
from math import *

n=nsi()
count=0
o=0
if(n[0]=='R' and n[1]=='S'):
    print(1)
    o=1
if(n[0]=='R' and n[1]=='R' and n[2]=='S'):
    print(2)
    o=1
if(n[0]=='S'and n[1]=='R' and n[2]=='R'):
    print(2)
    o=1
if(n[0]=='R' and n[1]=='R' and n[2]=='R'):
    print(3)
    o=1

for i in n:
    if(i=='R'):
        count+=1

if(count==0):
    print(0)
if(count==1 and o==0):
    print(1)

Problem: p02582
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
s=input()
if s.count('R')==1: print(1)
elif s.count('R')==3: print(3)
else:
    if s=="RSR": print(1)
    else: print(2)


Failing test case input:
SSS

Expected output:
0

Actual output:
2


Fixed submission (verdict: Accepted):
s=input().split('S')
if s.count('RRR'): print(3)
elif s.count('RR'): print(2)
elif s.count('R'): print(1)
else: print(0)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = str(input())


if S=="SSS" or S=="RRR":
	print(3)
elif S=="SRS" or S=="RSR":
	print(1)
else:
	print(2)





Failing test case input:
RSV

Expected output:
1


Actual output:
2


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


if S=="RRR":
	print(3)
elif S=="RRS" or S=="SRR":
	print(2)
elif S=="SSS":
	print(0)
else:
	print(1)
Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()
ans = 0
if "S" in s:
    ans = 1
if "SS" in s:
    ans = 2
if s == "SSS":
    ans = 3
print(ans)

Failing test case input:
SSR

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
s = input()
ans = 0
if "R" in s:
    ans = 1
if "RR" in s:
    ans = 2
if s == "RRR":
    ans = 3
print(ans)

Problem: p02582
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
S = input()
if S == "RRR":
  print("3")
elif S == "RRS" or "SRR":
  print("2")
elif S == "SSS":
  print("0")
else:
  print("1")


Failing test case input:
RSK

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
S = input()
if S == "RRR":
  print("3")
elif S == "RRS" or S == "SRR":
  print("2")
elif S == "SSS":
  print("0")
else:
  print("1")

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()

if "RRR" in s:
  print(3)
elif "RR" in s:
  print(2)
elif "R" in s:
    print(1)
  

Failing test case input:
SSS

Expected output:
0

Actual output:

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

if "RRR" in s:
  print(3)
elif "RR" in s:
  print(2)
elif "R" in s:
    print(1)
else:
    print(0)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s=input()
if s[0]=="R" and s[1]=="R" and s[2]=="R":
    print(3)
elif s[0]=="R" and s[1]=="R":
    print(2)
elif s[1]=="R" and s[2]=="R":
    print(2)
elif s[0]=="R" and s[2]=="R":
    print(2)
elif s=="SSS":
    print(0)
else:
    print(1)

Failing test case input:
RSR

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
s=input()
if s[0]=="R" and s[1]=="R" and s[2]=="R":
    print(3)
elif s[0]=="R" and s[1]=="R":
    print(2)
elif s[1]=="R" and s[2]=="R":
    print(2)
elif s=="SSS":
    print(0)
else:
    print(1)

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

if "S" in S:
    if S[1] == "S" and (S[0] != "S" or S[2] != "S"):
        print(1)
    elif S[0] == "S" and S[1] == "S" and S[2] == "S":
        print(0)
    elif S[1] == "R" and (S[0] != "R" or S[2] != "R"):
        print(1)
    else:
        print(2)
else:
    print(3)

Failing test case input:
SRR

Expected output:
2


Actual output:
1


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

if "S" in S:
    if S[1] == "S" and (S[0] != "S" or S[2] != "S"):
        print(1)
    elif S[0] == "S" and S[1] == "S" and S[2] == "S":
        print(0)
    elif S[1] == "R" and S[0] != "R" and S[2] != "R":
        print(1)
    else:
        print(2)
else:
    print(3)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s=input()
num=0
a=[0]
for i in s:
    if i=="R":
        num+=1
    elif i!="R":
        a.append(num)
        num=0
print(max(a))

Failing test case input:
RRR

Expected output:
3


Actual output:
0


Fixed submission (verdict: Accepted):
s=input()
num=0
a=[0]
for i in s:
    if i=="R":
        num+=1
        a.append(num)
    else:
        num=0
print(max(a))
Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()
res = 0

for i in range(2):
    if s[i] == 'R':
        res = 1
if s[0] == 'R' and s[1] == 'R':
    res += 1
if s[1] == 'R' and s[2] == 'R':
    res += 1

print(res)

Failing test case input:
TSR

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
s = input()
res = 0

for i in range(3):
    if s[i] == 'R':
        res = 1
if s[0] == 'R' and s[1] == 'R':
    res += 1
if s[1] == 'R' and s[2] == 'R':
    res += 1

print(res)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
if __name__ == "__main__":
    S = input()
    S = list(S)

    count = 0
    maxc = 0
    for i in S:
        if i == 'R':
            count += 1
            maxc = count
        else:
            maxc = count
            count = 0

    print(maxc)

Failing test case input:
RSX

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
if __name__ == "__main__":
    S = input()
    S = list(S)

    count = 0
    maxc = 0
    for i in S:
        if i == 'R':
            count += 1
            if maxc < count:
                maxc = count
        else:
            if maxc < count:
                maxc = count
            count = 0

    print(maxc)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S=input()
if S=='SSS':
  print(3)
elif S==('SSR' or 'RSS'):
  print(2)
elif S=='RRR':
  print(0)
else:
  print(1)

Failing test case input:
SRR

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
S=input()
if S=='RRR':
  print(3)
elif S=='RRS' or S=='SRR':
  print(2)
elif S=='SSS':
  print(0)
else:
  print(1)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
print(max(input().split('S')))


Failing test case input:
OSR

Expected output:
1


Actual output:
R


Fixed submission (verdict: Accepted):
print(max(map(len, input().split('S'))))

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
climate = list(input())

rainy = climate.count('R')
sunny = climate.count('S')

if rainy == 1:
    print(1)
elif rainy == 2:
    if (climate[0] == 'R' and climate[2] == 'R'):
        print(1)
    else:
        print(2)
else:
    print(0)

Failing test case input:
RRR

Expected output:
3


Actual output:
0


Fixed submission (verdict: Accepted):
climate = list(input())

rainy = climate.count('R')
sunny = climate.count('S')

if rainy == 1:
    print(1)
elif rainy == 3:
    print(3)
elif rainy == 2:
    if (climate[0] == 'R' and climate[2] == 'R'):
        print(1)
    else:
        print(2)
else:
    print(0)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()

if 'SSS' in s:
  print(3)
elif 'SS' in s:
  print(2)
elif 'S' in s:
  print(1)
else:
  print(0)

Failing test case input:
SSR

Expected output:
1


Actual output:
2


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

if 'RRR' in s:
  print(3)
elif 'RR' in s:
  print(2)
elif 'R' in s:
  print(1)
else:
  print(0)
Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):


import sys
import argparse
import logging


logging.basicConfig(filename='logger.log', level=logging.DEBUG)
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)


def f(s: str) -> int:
    
    return len(list(filter(lambda x: x == 'R', list(s))))


if __name__ == '__main__':
    parser = argparse.ArgumentParser()
    parser.add_argument(
            '--doctest', action='store_true', default=False)
    args = parser.parse_args()
    if args.doctest:
        import doctest
        doctest.testmod(verbose=True)
        sys.exit()

    s = sys.stdin.readline().rstrip()
    print(f(s))

Failing test case input:
RSR

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):


import sys
import argparse
import logging


logging.basicConfig(filename='logger.log', level=logging.DEBUG)
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)


def f(s: str) -> int:
    
    result = 0
    n = 0
    for c in list(s):
        if c == 'R':
            n += 1
        else:
            n = 0
        result = max(result, n)
    return result


if __name__ == '__main__':
    parser = argparse.ArgumentParser()
    parser.add_argument(
            '--doctest', action='store_true', default=False)
    args = parser.parse_args()
    if args.doctest:
        import doctest
        doctest.testmod(verbose=True)
        sys.exit()

    s = sys.stdin.readline().rstrip()
    print(f(s))

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = list(input())
box = []
cnt = 0
for i in s:
	if i == 'R':
		cnt += 1
	else:
		box.append(cnt)
box.append(cnt)
print(max(box))

Failing test case input:
RSR

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
s = list(input())
box = []
cnt = 0
for i in s:
	if i == 'R':
		cnt += 1
	else:
		box.append(cnt)
		cnt = 0
box.append(cnt)
print(max(box))

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = input('>>>')
num = 0
num_rev = 0
for i in range(3):
    if S[i] == 'R':
        num += 1
    elif S[i] == 'S':
        num_rev = num
        num = 0
        

print(max(num,num_rev))

Failing test case input:
SRR

Expected output:
2


Actual output:
>>>2


Fixed submission (verdict: Accepted):
S = input('')
num = 0
num_rev = [0,0,0]
for i in range(3):
    if S[i] == 'R':
        num += 1
    elif S[i] == 'S':
        num_rev[i] = num
        num = 0
        

print(max(num,num_rev[0],num_rev[1],num_rev[2]))

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
A = input("")
if A == "sss":
	print(0)
elif A == "rrr":
  print(3)  
elif A ==  "srr" or A == "rrs":
  print(2)
else:
  print(1)

Failing test case input:
SSS

Expected output:
0

Actual output:
1


Fixed submission (verdict: Accepted):
A = input()
if A == "SSS":
	print(0)
elif A == "RRR":
  print(3)  
elif A ==  "SRR" or A == "RRS":
  print(2)
else:
  print(1)
Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
str = str(input())
print(str)
if str == "RRR":
  print(3)
elif str == "RRS" or str=="SRR":
  print(2)
elif str == "SSS":
  print(0)
else:
  print(1)




Failing test case input:
SSS

Expected output:
0

Actual output:
SSS
0


Fixed submission (verdict: Accepted):
str = str(input())
if str == "RRR":
  print(3)
elif str == "RRS" or str=="SRR":
  print(2)
elif str == "SSS":
  print(0)
else:
  print(1)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s=input()
if s[1:2]=="R":
  if s[0:1]=="R"and s[2:3]=="R":
    print(3)
  else:
    print(2)
elif "R" in s:
  print(1)
else:
  print(0)

Failing test case input:
SRS

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
s=input()
if s[1:2]=="R":
  if s[0:1]=="R"and s[2:3]=="R":
    print(3)
  elif s[0:1]=="S"and s[2:3]=="S":
    print(1)
  else:
    print(2)
elif "R" in s:
  print(1)
else:
  print(0)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()

if s == 'SSS' or s == 'RRR':
  print(3)
elif s[0] == s[-1]:
  print(1)
else:
  print(2)


Failing test case input:
RSH

Expected output:
1


Actual output:
2


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

if s == 'RRR':
  print(3)
elif s == 'SSS':
  print(0)
elif s[:2] == 'RR' or s[1:] == 'RR':
  print(2)
else:
  print(1)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = str(input())
s=s.lower()

if s.find('rr') != -1:
    print("2")
elif s.find('r') !=-1:
    print("1")
else :
    print ("0")


Failing test case input:
RRR

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):
s = str(input())
s=s.lower()

if s=="rrr":
    print('3')
elif s.find('rr') != -1:
    print("2")
elif s.find('r') != -1:
    print("1")
else:
    print ("0")

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

string = input()
count = 0
max_count = 0
for s in string:
    if s == 'R':
        count += 1
    else:
        if count > max_count:
            max_count = count
        count = 0

print(max_count)

Failing test case input:
RRR

Expected output:
3


Actual output:
0


Fixed submission (verdict: Accepted):

string = input()
count = 0
max_count = 0
for s in string:
    if s == 'R':
        count += 1
    else:
        if count > max_count:
            max_count = count
        count = 0

    if count > max_count:
            max_count = count

print(max_count)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()
ans = 0

if 'RRR' in s:
  ans == 3
elif 'RR' in s:
  ans = 2
elif 'R' in s:
  ans = 1
else:
  ans = 0

print(ans)

Failing test case input:
RRR

Expected output:
3


Actual output:
0


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

if 'RRR' in s:
  print(3)
elif 'RR' in s:
  print(2)
elif 'R' in s:
  print(1)
else:
  print(0)