ZhenlongDai/ACPR huggingface dataset:
Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import re
S = input()

if S == 'RRR':
    print(3)
elif re.match('RR', S) is not None:
    print(2)
elif re.match('R', S) is not None:
    print(1)
else:
    print(0)


Failing test case input:
SRS

Expected output:
1


Actual output:
0


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

if S == 'RRR':
    print(3)
elif re.search('RR', S) is not None:
    print(2)
elif re.search('R', S) is not None:
    print(1)
else:
    print(0)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = input()
ans = 0
r = 0
for c in S:
    if c == 'R':
        r += 1
    else:
        ans = max(ans, r)
        r = 0
print(ans)


Failing test case input:
PSR

Expected output:
1


Actual output:
0


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

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

Failing test case input:
RRS

Expected output:
2

Actual output:
1


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):
n = input()
c = 0
f = False

if n[0] == "R" and n[1]=="R":
  c=2
  f = True
if n[1] == "R" and n[0] == "R":
  c=2
  f = True

if n[1] == "R" and n[0] == "R" and n[2] == "R":
  c= 3
if f == False:
  if n.count("R") == 0:
    c = 0
  else:
    c = 1

print(c)

Failing test case input:
SRR

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
n = input()
c = 0
f = False

if n[0] == "R" and n[1]=="R":
  c=2
  f = True
if n[1] == "R" and n[2] == "R":
  c=2
  f = True

if n[1] == "R" and n[0] == "R" and n[2] == "R":
  c= 3
if f == False:
  if n.count("R") == 0:
    c = 0
  else:
    c = 1

print(c)

Problem: p02582
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
S = input()
cnt = 0
max_c = 0
for s in S:
    if s == 'R':
        cnt += 1
        max_c = max(cnt,max_c)
    else:
        cnt = 0
print(cnt)

Failing test case input:
RSQ

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
S = input()
cnt = 0
max_c = 0
for s in S:
    if s == 'R':
        cnt += 1
        max_c = max(cnt,max_c)
    else:
        cnt = 0
print(max_c)
Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy


def main():
    s = input()   
    print(s.count("R"))

if __name__ == '__main__':
	main()


Failing test case input:
RSR

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy


def main():
    s = input()   
    count = 0
    ans = 0
    for i in s:
        if i == "R":
            count += 1
            ans = count
        else:
            count = 0
    print(ans)

if __name__ == '__main__':
	main()

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

res = 0
count = 0
for s in word:
    if s == 'R':
        count += 1
    else:
        if res < count:
            res = count
        count = 0

print(res)


Failing test case input:
QSR

Expected output:
1


Actual output:
0


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

res = 0
count = 0
for s in word:
    if s == 'R':
        count += 1
    else:
        if res < count:
            res = count
        count = 0
if res < count:
    res = count
print(res)

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


Failing test case input:
SRS

Expected output:
1


Actual output:
0


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

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s=input()
c=0
ans=0
for i in range(len(s)):
  if(s[i]=='R'):
    c+=1
  else:
    ans=max(ans,c)
if(c):    
  ans=max(ans,c)
print(ans)  

Failing test case input:
RSR

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
s=input()
c=0
ans=0
for i in range(len(s)):
  	if(s[i]=='R'):
  		c+=1
  	else:
  		ans=max(ans,c)
  		c=0
if(c):    
  	ans=max(ans,c)
print(ans)
Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = str(input())
count = 0

if S == "RRS" or S == "SRR":
    print(2)
else:
    for i in range(0, 3):
        if S[i] == "R":
            count += 1
        elif S[i] == "S":
            count = 0
    print(count)

Failing test case input:
RS`

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
S = str(input())
count = 0
if S == "RRS" or S == "SRR":
    print(2)
elif S == "RSR":
    print(1)
else:
    for i in range(0, 3):
        if S[i] == "R":
            count += 1
    print(count)

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

row_now = 0
row_max = 0
for day in S:
    if day == "S":
        row_now += 1
    else:
        row_now = 0
    if row_now > row_max:
        row_max = row_now

print(row_max)


Failing test case input:
RSS

Expected output:
1


Actual output:
2


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

row_now = 0
row_max = 0
for day in S:
    if day == "R":
        row_now += 1
    else:
        row_now = 0
    if row_now > row_max:
        row_max = row_now

print(row_max)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
l = [e for e in input()]
c = 0
if l[1] == "R":
  c += 1
  if l[0] == "R":
    c += 1
  if l[2] == "R":
  	c += 1
else:
  if l[0] == 1 or l[2] == "R":
    c += 1
 
print(c)

Failing test case input:
RSY

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
a, b, c = input()

if b == "R":
  d = 1
  if a == "R":
    d += 1
  if c == "R":
  	d += 1
else:
  d = 0
  if a == "R" or c == "R":
    d += 1
 
print(d)

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

tmp = 0
ans = 0
for s in S:
    if s == 'R':
        tmp += 1
    else:
        ans = max(tmp, ans)
        tmp = 0

print(ans)


Failing test case input:
VSR

Expected output:
1


Actual output:
0


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

tmp = 0
ans = 0
for s in S:
    if s == 'R':
        tmp += 1
    else:
        ans = max(tmp, ans)
        tmp = 0
ans = max(tmp, ans)
print(ans)

Problem: p02582
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):


def main():
    s = str(input())

    if s == "RRR":
        print(3)
    elif s == "RRS" or s == "SRR":
        print(2)
    elif s == "RSR" or s == "SRS":
        print(1)
    else:
        print(0)

if __name__ == '__main__':
    main()


Failing test case input:
LSR

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):


def main():
    s = str(input())

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

if __name__ == '__main__':
    main()
Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a = input()
if a == "RRR":
  print(0)
elif a == "RRS" or "RSR" or "SRR":
  print(1)
elif a == "SSS":
  print(3)
else:
  print(2)

Failing test case input:
SSS

Expected output:
0

Actual output:
1


Fixed submission (verdict: Accepted):
a = input()
if a == "RRR":
  print(3)
elif "RR" in a:
  print(2)
elif a == "SSS":
  print(0)
else:
  print(1)

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

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

print(ans)



Failing test case input:
RSJ

Expected output:
1


Actual output:
0


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

count = 0
ans = 0
ansR = 0
for s in S:
  if s == "R":
    count += 1
    ansR = count
  else:
    ans = count
    count = 0


print(max(ans, ansR))

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = list(input())
if s == "RSR":
    print(1)
    exit()
else:
    print(s.count("R"))


Failing test case input:
RSR

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
s = list(input())
if s == ["R","S","R"]:
    print(1)
    exit()
else:
    print(s.count("R"))

Problem: p02582
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
sd = input()
ok = 0
if sd[0] == 'R':
    if sd[1] == 'R':
        if sd[2] == 'R':
            ok = 1
            print(3)
        else:
            ok = 1
            print(2)
    else:
        print(1)
else:
    if sd[1] == 'R':
        if sd[2] == 'R':
            ok =1 
            print(2)
        else:
            ok = 1
            print(1)
if ok == 0:
    print(0)


Failing test case input:
USR

Expected output:
1


Actual output:
0


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

Problem: p02582
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
def INT():
    return int(input())

def MI():
    return map(int, input().split())

def LI():
    return list(map(int, input().split()))

S = input()
ans = int(S[0] == "R")

for i in range(1, 3):
    if S[i] == "R" and S[i - 1] == "R":
        ans += 1
        
print(ans)

Failing test case input:
NSR

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
def INT():
    return int(input())

def MI():
    return map(int, input().split())

def LI():
    return list(map(int, input().split()))

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

Failing test case input:
SRS

Expected output:
1


Actual output:

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

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
from collections import Counter


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


s = S()
ans = 0
if 'R' not in s:
    ans = 0
else:
    c = Counter(list(s))
    if c['R'] == 1:
        ans = 1
    else:
        if s[:2] == 'RR' or s[1:] == 'RR':
            ans = 2
        if s == 'RRR':
            ans = 3
        else:
            ans = 1

print(ans)


Failing test case input:
SRR

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
import sys
from collections import Counter


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


s = S()

if s == 'RRR':
    ans = 3
elif s[:2] == 'RR' or s[1:] == 'RR':
    ans = 2
else:
    c = Counter(list(s))
    if c['R'] == 1:
        ans = 1
    elif c['S'] == 3:
        ans = 0
    else:
        ans = 1

print(ans)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = input()
answers = [0]
ans = 0
i = 0
while i <= 2:
  if S[i] == 'R':
    ans += 1
  else:
    answers.append(ans)
    ans += 0
  i += 1

answers.append(ans)

print(max(answers))


Failing test case input:
RSR

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
S = input()
answers = [0]
ans = 0
i = 0
while i <= 2:
  if S[i] == 'R':
    ans += 1
  else:
    answers.append(ans)
    ans = 0
  i += 1

answers.append(ans)

print(max(answers))

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a=list(input())
cnt=0
for i in a:
  if i=="R":
    cnt+=1
  else:
    cnt=0
print(cnt)

Failing test case input:
RRS

Expected output:
2

Actual output:
0


Fixed submission (verdict: Accepted):
a=list(input())
cnt=0
ans=0
for i in a:
  if i=="R":
    cnt+=1
  else:
    ans=max(cnt,ans)
    cnt=0
ans=max(cnt,ans)
print(ans)
Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def resolve():
    s = list(input())
    cnt = 0
    m_cnt = 0
    for c in s:
        if c == 'R':
            cnt += 1
        else:
            if cnt > m_cnt:
                m_cnt = cnt
            cnt = 0

    print(m_cnt)

resolve()

Failing test case input:
USR

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
def resolve():
    s = list(input())
    cnt = 0
    m_cnt = 0
    for c in s:
        if c == 'R':
            cnt += 1
            if cnt > m_cnt:
                m_cnt = cnt

        else:
            cnt = 0

    print(m_cnt)

resolve()

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = str(input())
count = 0
if S == "RRR":
    print(3)
if S == "RRS" or S == "SRR":
    print(2)
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:
3
1


Fixed submission (verdict: Accepted):
S = str(input())
count = 0
if S == "RRS" or S == "SRR":
    print(2)
elif S == "RSR":
    print(1)
else:
    for i in range(0, 3):
        if S[i] == "R":
            count += 1
    print(count)

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

Failing test case input:
[SR

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
str = input()
cnt = 0
ans = []
for i in range (len(str)):
  if str[i] == 'R':
    cnt += 1
  else:
    cnt = 0
  ans.append(cnt)
print (max(ans))

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

Failing test case input:
RSP

Expected output:
1


Actual output:
0


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):
a=input()
def fun(a):
    count=0
    max=0
    for i in a:
        if i=='R':
            count+=1
        
            if count>=max:
                max=count
            
    else:
        if count>=max:
            max=count
        count=0
    return max
print(fun(a)) 
    

Failing test case input:
RSR

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
a=input()
count=0
max=0
for i in a:
    if i=='R':
        count+=1
        if count>=max:
            max=count        
    else:
        if count>=max:
            max=count
        count=0
print(max)
Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()

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


Failing test case input:
RRR

Expected output:
3


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):
def main():
    S = input()

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

    if ans < tmp:
        ans = tmp

    print(ans)


if __name__ == "__main__":
    main()


Failing test case input:
RS]

Expected output:
1


Actual output:
0


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

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

    if ans < tmp:
        ans = tmp

    print(ans)


if __name__ == "__main__":
    main()

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
max([len(t) for t in input().split('S')])

Failing test case input:
RSZ

Expected output:
1


Actual output:

Fixed submission (verdict: Accepted):
print(max([len(t) for t in input().split('S')]))

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

ans = 0
tmp = 0
for i in range(3):
    if S[i] == "R":
        tmp += 1
        ans = max(ans, tmp)
    else:
        ans = max(ans, tmp)
        ans = 0

print(ans)


Failing test case input:
RSY

Expected output:
1


Actual output:
0


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

ans = 0
tmp = 0
for i in range(3):
    if S[i] == "R":
        tmp += 1
        ans = max(ans, tmp)
    else:
        ans = max(ans, tmp)
        tmp = 0

print(ans)

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):
s = input()
if s == "RRR":
    print(3)
if s == "SSS":
    print(0)
if s == "RRS" or s == "SRR":
    print(2)
else:
    print(1)

Failing test case input:
SSS

Expected output:
0

Actual output:
0
1


Fixed submission (verdict: Accepted):
s = input()
if s == "RRR":
    print(3)
elif s == "SSS":
    print(0)
elif s == "RRS" or s == "SRR":
    print(2)
else:
    print(1)
Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()
c = 0
m = 0
for i in s:
  if i == 'R':
    c += 1
  else:
    if m < c:
      m = c
    c = 0
print(m)

Failing test case input:
SSR

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
s = input()
c = 0
m = 0
for i in s:
  if i == 'R':
    c += 1
  else:
    if m < c:
      m = c
    c = 0
print(m if m > c else c)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()
ans,cnt = 0,0
for l in s:
  if l=='R':
    cnt += 1
  else:
    ans = cnt
    cnt = 0
print(ans)

Failing test case input:
NSR

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
s = input()
ans,cnt = 0,0
for l in s:
  if l=='R':
    cnt += 1
    ans = max(ans,cnt)
  else:
    ans = max(cnt,ans)
    cnt = 0
print(ans)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
sys.setrecursionlimit(10**7)

def input(): return sys.stdin.readline()[:-1]
mod = 10**9 + 7
def readInt():return int(input())
def readIntList():return list(map(int,input().split()))
def readStringList():return list(input())
def readStringListWithSpace():return list(input().split())
def readString():return input()

days = readStringList()
count = 0
res = 0
for c in days:
    count += 0 if c == 'S' else 1
    res = max(res,count)
print(res)

Failing test case input:
JSR

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
import sys
sys.setrecursionlimit(10**7)

def input(): return sys.stdin.readline()[:-1]
mod = 10**9 + 7
def readInt():return int(input())
def readIntList():return list(map(int,input().split()))
def readStringList():return list(input())
def readStringListWithSpace():return list(input().split())
def readString():return input()

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

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s=list(input())
s=[str(x) for x in s]
print(s)
count=0
num=0
for i in range(len(s)):
  if (s[i]=='R'):
    count+=1
    if(count==2):
      num+=1
      count=1
  elif (s[i]=='S'):
    count=0
    
print(num)

Failing test case input:
PSR

Expected output:
1


Actual output:
['P', 'S', 'R']
0


Fixed submission (verdict: Accepted):
s=list(input())
s=[str(x) for x in s]
count=0
num=[0]
for i in range(len(s)):
  if (s[i]=='R'):
    count+=1
    num.append(count)
  elif (s[i]=='S'):
    count=0
    
print(max(num))

Problem: p02582
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):

S = input()

cnt = 0
for i in range(3):
    if S[i] == "R":
        cnt += 1
    elif i >= 1:
        break

print(cnt)


Failing test case input:
OSR

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):

S = input()

cnt = 0
for i in range(3):
    if S[i] == "R":
        cnt += 1
    
    if cnt > 0 and S[i] == "S":
        break

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

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

print(ans)


Failing test case input:
RSR

Expected output:
1

Actual output:
2


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

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

print(ans)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
line = input()
rain_day = 0
k = 0
for wether in line:
  if wether == "R":
    rain_day += 1
  else:
    k = rain_day
    rain_day = 0
if k > rain_day:
  print(k)
else:
  print(rain_day)

Failing test case input:
RSP

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
line = input()
rain_day = 0
k = 0
for wether in line:
  
  if wether == "R":
    rain_day += 1
  
  elif rain_day != 0:
    k = rain_day
    rain_day = 0
  
  else:
    pass
if k > rain_day:
  print(k)
else:
  print(rain_day)

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

Failing test case input:
SSR

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
S = input()
if S == "RRR":
    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):
A = input()
b = A.count("RRR")
C = A.count("RR")
D = A.count("R")
if b == 1: 
   print(3)
elif C ==1:
   print(2)
else:
   if D ==1:
      print(1)
   else:
      print(0)

Failing test case input:
RSR

Expected output:
1

Actual output:
0


Fixed submission (verdict: Accepted):
A = input()
b = A.count("RRR")
C = A.count("RR")
if b == 1: 
   print(3)
elif C ==1:
   print(2)
else:
   if A.count("R")>0:
      print(1)
   else:
      print(0)

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

Failing test case input:
[SR

Expected output:
1


Actual output:
0


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

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


 
S = input()



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

Failing test case input:
SSS

Expected output:
0

Actual output:
1


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



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

if line[0] == "R":
	ans += 1
	if line[1] == "R":
		ans += 1
		if line[2] == "R":
			ans+=1
else:
	if line[1] == "R":
		ans += 1
		if line[2] == "R":
			ans+=1

print(ans)

Failing test case input:
^SR

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
line = list(input())
ans = int(0)

if line[0] == "R":
	ans += 1
	if line[1] == "R":
		ans += 1
		if line[2] == "R":
			ans+=1
else:
	if line[1] == "R":
		ans += 1
		if line[2] == "R":
			ans+=1
	else:
		if line[2] == "R":
			ans+=1

print(ans)

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


Failing test case input:
SRR

Expected output:
2


Actual output:
1


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 (PyPy3 (7.3.0), verdict: Wrong Answer):
import sys
import math
def get_array(): return list(map(int, sys.stdin.readline().strip().split()))
def get_ints(): return map(int, sys.stdin.readline().strip().split())
def input(): return sys.stdin.readline().strip()
s=input()
ans=0
if s[0]=="R" and s[1]=="R" and s[2]=="R":
    print(3)
elif s[0]=="R" and s[1]=="R" and s[2]!="R" or s[1]=="R" and s[2]=="R" and s[0]!="R":
    print(2)
elif s[0]=="R" or s[1]=="R" or s[1]=="R":
    print(1)
else:
    print(0)



Failing test case input:
JSR

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
import sys
import math
def get_array(): return list(map(int, sys.stdin.readline().strip().split()))
def get_ints(): return map(int, sys.stdin.readline().strip().split())
def input(): return sys.stdin.readline().strip()
s=input()
ans=0
if s[0]=="R" and s[1]=="R" and s[2]=="R":
    print(3)
elif s[0]=="R" and s[1]=="R" and s[2]!="R" or s[1]=="R" and s[2]=="R" and s[0]!="R":
    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()

ans = 0
t = 0
for c in s:
    if c == "R":
        t += 1
    else:
        ans = max(ans, t)
        t = 0

print(ans)


Failing test case input:
NSR

Expected output:
1


Actual output:
0


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

ans = 0
t = 0
for c in s:
    if c == "R":
        t += 1
    else:
        ans = max(ans, t)
        t = 0
ans = max(ans, t)


print(ans)

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

Failing test case input:
[SR

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
s=input()
ans=0
bk=0
for i in range(3):
  if s[i]=="R":
    bk+=1
  else:
    if ans<bk:
      ans=bk
    bk=0
if ans<bk:
  ans=bk
print(ans)
Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s=input()
count=0
m=0
for i in range(len(s)):
    if s[i]=='R':
        count+=1
    else:
        if count > m :
            m=count
        count=0

print(m)
        

Failing test case input:
USR

Expected output:
1


Actual output:
0


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

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
input = sys.stdin.readline

s = input()
if s[1] == 'R':
    print(s.count('R'))
else:
    if s[0] == 'R' and s[2] == 'R':
        print(2)
    elif s[0] == 'S' and s[2] == 'S':
        print(0)
    else:
        print(1)

Failing test case input:
RSR

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
import sys
input = sys.stdin.readline

s = input()
if s[1] == 'R':
    print(s.count('R'))
else:
    if s[0] == 'S' and s[2] == 'S':
        print(0)
    else:
        print(1)

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

cccount = 0
count = 0
for s in splited:
  if s == 'R':
    count = count + 1
  else:
    if cccount < count:
      cccount = count
    count = 0
print(cccount)
    
    

Failing test case input:
\SR

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
str = input()
splited = list(str)

cccount = 0
count = 0
for s in splited:
  if s == 'R':
    count = count + 1
    if count > cccount:
      cccount = count
  else:
      count = 0
    
print(cccount)

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

rain_count = 0
reset = False
max_count = 0

for i in range(len(R)):
  if R[i] == "R":
    rain_count += 1
  else:
    reset = True
  
    if reset:
      max_count = max(max_count, rain_count)
      rain_count = 0

print(max_count)

Failing test case input:
USR

Expected output:
1


Actual output:
0


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

rain_count = 0
reset = False
max_count = 0

for i in range(len(R)):
  if R[i] == "R":
    rain_count += 1
  else:
    reset = True
  
    if reset:
      max_count = max(max_count, rain_count)
      rain_count = 0

print(max(rain_count, max_count))

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

if s[1] == 'S':
  if 'R' in s:
    print(1)
  else:
    print(0)
else:
  if s[0] == 'R' or s[2] == 'R':
    if 'S' in s:
      print(2)
    else:
      print(3)

Failing test case input:
SRS

Expected output:
1


Actual output:

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

count = 0
if S[0] == 'R':
    count += 1
    if S[0] == S[1]:
        count += 1
        if S[1] == S[2]:
            count += 1
elif S[1] == 'R':
    if S[1] == S[2]:
        count += 1

print(count)

Failing test case input:
_SR

Expected output:
1


Actual output:
0


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

count = 0
if S[0] == 'R':
    count += 1
    if S[1] == 'R':
        count += 1
        if S[2] == 'R':
            count += 1
elif S[1] == 'R':
    count += 1
    if S[2] == 'R':
        count += 1
elif S[2] == 'R':
    count += 1

print(count)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
def input(): return sys.stdin.readline().rstrip()
def ii(): return int(input())
def mi(): return map(int, input().split())
def li(): return list(mi())


def main():
    s = input()
    cnt = 0
    for i in range(1, 3):
        if s[i] == 'R' and s[i-1] == 'R':
            cnt += 1
    print(cnt)


if __name__ == '__main__':
    main()

Failing test case input:
PSR

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
import sys
def input(): return sys.stdin.readline().rstrip()
def ii(): return int(input())
def mi(): return map(int, input().split())
def li(): return list(mi())


def main():
    s = input()
    cnt = 0
    if 'RRR' in s:
        print(3)
    elif 'RR' in s:
        print(2)
    elif 'R' in s:
        print(1)
    else:
        print(0)


if __name__ == '__main__':
    main()

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
def main():
    S = input()
    mx = 0
    cnt = 0
    pre = 'R'
    for i in range(len(S)): 
        if (S[i] == 'R') and (pre == 'R'):
            cnt += 1
        else:
            cnt = 0
            pre = 'S'
        mx = max(cnt, mx)
    print(mx)
if __name__ == '__main__':
    main()


Failing test case input:
MSR

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
def main():
    S = input()
    cnt = 0
    mx = 0
    for i in range(len(S)):
        if (S[i] == 'R'):
            cnt += 1
        else:
            cnt = 0
        mx = max(mx, cnt)
    print(mx)
if __name__ == '__main__':
    main()

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

result = 0
if "RR" in S:
  result = S.count("R")

print(result)


Failing test case input:
RSL

Expected output:
1


Actual output:
0


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

result = 0
if "R" in S:
  if "RR" in S:
    result = S.count("R")
  else:
    result = 1

print(result)
Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()
ans,cnt = 0,0
for l in s:
  if l=='R':
    cnt += 1
    ans = cnt
  else:
    ans = cnt
    cnt = 0
print(ans)

Failing test case input:
RSV

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
s = input()
ans,cnt = 0,0
for l in s:
  if l=='R':
    cnt += 1
    ans = max(ans,cnt)
  else:
    ans = max(cnt,ans)
    cnt = 0
print(ans)

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

Failing test case input:
RSY

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
s = input()
if s == "RRR":
  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=="RSR":
  print(2)
else:
  print(S.count("R"))

Failing test case input:
RSR

Expected output:
1

Actual output:
2


Fixed submission (verdict: Accepted):
S=input()
if S=="RSR":
  print(1)
else:
  print(S.count("R"))

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

r = 0
ans = 0
for i in s:
    if i == 'R':
        r += 1
    else:
        ans = max(ans, r)
        r = 1

print(ans)

Failing test case input:
RRR

Expected output:
3


Actual output:
0


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

r = 0
ans = 0
for i in s:
    if i == 'R':
        r += 1
    else:
        ans = max(ans, r)
        r = 0

ans = max(ans, r)
print(ans)

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

Failing test case input:
SRR

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
L = [s for s in input()]
if not 'R' in L:
  print(0)
elif not 'S' in L:
  print(3)
elif L[1] == 'S':
  if 'R' in L :
    print(1)
elif L[0] == 'S':
  if L[2] =='S':
    print(1)
  else:
    print(2)
else:
  print(2)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = input()
if n[:2] == "RR" or n[2:] == "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=='RRR':
    print(3)
elif s=='SRR' or 'RRS':
    print(2)
elif s=='SSS':
    print(0)
else:
    print(1)       
    

Failing test case input:
RS`

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
s=input()
if s=='RRR':
    print(3)
elif s=='SRR':
    print(2)
elif s=='RRS':    
    print(2)
elif s=='SSS':
    print(0)
else:
    print(1)
Problem: p02582
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
elem = input()
single = elem.count("R")
double = elem.count("RR")
triple = elem.count("RRR")
if triple == 1:
    print(3)
elif double == 1:
    print(2)
else:
    if single == 1:
        print(1)
    else:
        print(0)

Failing test case input:
RSR

Expected output:
1

Actual output:
0


Fixed submission (verdict: Accepted):
elem = input()
single = elem.count("R")
double = elem.count("RR")
triple = elem.count("RRR")
if triple == 1:
    print(3)
elif double == 1:
    print(2)
else:
    if single > 0:
        print(1)
    else:
        print(0)

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

R_n = 0
R_max = 0
for i in S:
  if i == 'R':
    R_n += 1
  else:
    R_max = R_n
    R_n = 0
    
if R_n == len(S):
  R_max = R_n

print(R_max)

Failing test case input:
NSR

Expected output:
1


Actual output:
0


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

R_n = 0
R_max = 0
for i in S:
  if i == 'R':
    R_n += 1
  else:
    if R_n != 0:
      R_max = R_n
    R_n = 0
    
if R_n > R_max:
  R_max = R_n

print(R_max)

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

Failing test case input:
RRR

Expected output:
3


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):
x, y, z = input()
a = 0
if x == 'R':
  a += 1
  if y == 'R':
    a += 1
    if z == 'R':
      a += 1
elif y == 'R':
  a += 1
  if z == 'R':
    a += 1
print(a)

Failing test case input:
[SR

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
x, y, z = input()
a = 0
if x == 'R':
  a += 1
  if y == 'R':
    a += 1
    if z == 'R':
      a += 1
else:
  if y == 'R':
    a += 1
    if z == 'R':
      a += 1
  else:
    if z == 'R':
      a += 1
print(a)

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

Failing test case input:
QSR

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
S = str(input())
a = 0
w = 0
for i in range(len(S)):
    if S[i] == 'R':
        w = w + 1
    else:
        if (w > a):
          a = w
        w = 0
if (w > a):
  a = w
print(a)
Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))

s = input()
cnt = 0
for i in s:
    if i=='R':
        cnt += 1
    else:
        break
print(cnt)

Failing test case input:
ISR

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))

s = input()
cnt = 0
ans = 0
for i in s:
    if i=='R':
        cnt += 1
    else:
        ans = max(ans,cnt)
        cnt = 0
print(max(ans,cnt))

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s=input()
ans=0
for i in s:
    if(i=='R'):
        ans+=1
    else:
        ans=0
print(ans)

Failing test case input:
RSI

Expected output:
1


Actual output:
0


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

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

Failing test case input:
SRS

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
L = [s for s in input()]
if not 'R' in L:
  print(0)
elif not 'S' in L:
  print(3)
elif L[1] == 'S':
  if 'R' in L :
    print(1)
elif L[0] == 'S':
  if L[2] =='S':
    print(1)
  else:
    print(2)
else:
  print(2)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S=str(input(""))
sum=0
if 'RR' in S:
    print("2")
elif 'R' in S:
    print("1")
elif 'RRR' in S:
    print("3")
else:
    print("0")

Failing test case input:
RRR

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):
S=str(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 (PyPy3 (7.3.0), verdict: Wrong Answer):
S = input()
if S == 'RRR':
    print(3)

elif S == 'RRS' or S == 'RRS':
    print(2)

elif 'R' in S:
    print(1)

else:
    print(0)


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 'R' in S:
    print(1)

else:
    print(0)

Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s=input()
if s=='RRR':
  print(3)
elif s=='RRS' or s=='SRR':
  print(2)
elif s.count('R')==1:
  print(1)
else:
  print(0)

Failing test case input:
RSR

Expected output:
1

Actual output:
0


Fixed submission (verdict: Accepted):
s=input()
if s=='RRR':
  print(3)
elif s=='RRS' or s=='SRR':
  print(2)
elif s.count('R')==1 or s=='RSR':
  print(1)
else:
  print(0)
Problem: p02582
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = input()
ans = 0
now = 0
for s in S:
    if s == "R":
        now += 1
    else:
        ans = max(ans, now)
        now = 0
print(ans)

Failing test case input:
XSR

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
S = input()
ans = 0
now = 0
for s in S:
    if s == "R":
        now += 1
    else:
        ans = max(ans, now)
        now = 0
ans = max(ans, now)
print(ans)

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

Failing test case input:
SSS

Expected output:
0

Actual output:
1


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

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

Failing test case input:
RSK

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
s=list(input())
q=0
if s[1]=="R":
    q=1
    if s[0]=="R":
        q+=1
    if s[2]=="R":
        q+=1
else:
    if s[0]=="S" and s[2]=="S":
        q=0
    else:
        q=1
print(q)

Problem: p02582
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
s = input()
temp = 0
ans = 0
for i in s:
    if(i == "R"):
        temp += 1
    else:
        if(temp >= ans):
            ans = temp
            temp = 0
if(temp >= ans):
    ans = temp
print(temp)

Failing test case input:
RSK

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):

s = input()
temp = 0
ans = 0
for i in s:
    if(i == "R"):
        temp += 1
    else:
        if(temp > ans):
            ans = temp
            temp = 0
if(temp > ans):
    ans = temp
print(ans)

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(3)
else:
  print(0)


Failing test case input:
RSW

Expected output:
1


Actual output:
3


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()
count = 0
c = 0
for i in S:
  if i == "R":
    count += 1
  else:
    if count >= c:
      c = count
      count = 0
print(c)

Failing test case input:
[SR

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
S = input()
count = 0
c = 0
for i in S:
  if i == "R":
    count += 1
  else:
    if count > c:
      c = count
      count = 0
if count > c:
      c = count
print(c)