Problem:


Score : 100 points

Problem Statement

We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is S, it means it was sunny on the i-th day; if that character is R, it means it was rainy on that day.

Find the maximum number of consecutive rainy days in this period.

Constraints

|S| = 3

Each character of S is S or R.

Input

Input is given from Standard Input in the following format:

S

Output

Print the maximum number of consecutive rainy days in the period.

Sample Input 1

RRS

Sample Output 1

2

We had rain on the 1-st and 2-nd days in the period. Here, the maximum number of consecutive rainy days is 2, so we should print 2.

Sample Input 2

SSS

Sample Output 2

0

It was sunny throughout the period. We had no rainy days, so we should print 0.

Sample Input 3

RSR

Sample Output 3

1

We had rain on the 1-st and 3-rd days - two "streaks" of one rainy day, so we should print 1.



Sample input:
RRS


Sample output:
2

Submission status: Wrong Answer

Solution code:
weather = input("") 
if weather == "RRR":
   print(3)
elif weather == "SRR":
   print(2)
elif weather == "RSR":
   print(1)
elif weather == "RRS":
   print(2)
elif weather == "SSR":
   print(1)
elif weather == "RSS":
   print(1)
elif weather == "SSS":
   print(0)
else:
   print()

Submission status: Wrong Answer

Solution code:
s = str(input())
if s.count('S') == 0: print(3)
elif s[2] == 'S' or s[0] == 'S': print(2)
elif s[1] == 'S': print(1)
else: print(0)

Submission status: Wrong Answer

Solution code:
s = input() 
def rle(s):
    tmp, count, ans = s[0], 1, ""
    max=0
    for i in range(1,len(s)):
        if tmp == s[i]:
            count += 1
            if (tmp=="R")&(count>max):
                max=count   
        else:
            ans += tmp+str(count)
            tmp = s[i]
            count = 1
            if (tmp=="R")&(count>max):
                max=count   
    return max
rle(s)

Submission status: Wrong Answer

Solution code:
S = input()
cnt = 0
max_cnt = 0
for i in range(len(S)):
  s = S[i]
  if s == 'R':
    cnt += 1
    max_cnt = cnt
  else:
    max_cnt = cnt
    cnt = 0
print(max_cnt)

Submission status: Wrong Answer

Solution code:
S = input()[0:3]
res = 0
if S == 'RRS' or S == 'rrs':
    res = 2
elif S=='RRR' or S == 'rrr':
    res = 3
elif S=='RSR' or S == 'rsr':
    res =1
elif S=='RSS' or S=='rss':
    res = 1
else:
    res = 0
print(res)

Submission status: Wrong Answer

Solution code:
s=input()
if s[0]=="R":
	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[0]=="R":
		print(1)
else:
	print(0)

Submission status: Wrong Answer

Solution code:
S = input()

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

print(ans)

Submission status: Wrong Answer

Solution code:
S = list(input())

count = 0

# print(S)

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

Submission status: Wrong Answer

Solution code:
S = input()
cnt = 0
max_cnt = 0
for i in range(len(S)):
  s = S[i]
  if s == 'R':
    cnt += 1
  else:
    max_cnt = cnt
    cnt = 0
print(max_cnt)

Submission status: Wrong Answer

Solution code:

a = input()

if a == 'RRR':
    print("3")
elif a == 'RRS' or a == 'SRR':
    print("2")
elif a == 'RSS' or a == 'RSR' or a == 'SSR':
    print("1")
else :
    print("0")

Submission status: Wrong Answer

Solution code:
S=list(input())
count=0
for i in range(3):
    if S[i-1]=="R":
        if count<1:
            count=1
        else:
            count=count
        if S[i-1]==S[i]:
            count+=1
        else:
            count=count
    else:
        count=count
if count>3:
    count=3
print(count)

Submission status: Wrong Answer

Solution code:
S= input()
a = tuple(S)
#print(a)
#print(a[0])
cou = 1
for i in range (0,len(S)-1):
    if a[i] == "R":
      if a[i+1] != "S":
          cou+=1
print(cou)

Submission status: Wrong Answer

Solution code:
S = input()[0:3]
res = 0
if S == 'RRS' or S == 'rrs':
    res = 2
elif S=='RRR' or S == 'rrr':
    res = 3
elif S=='RSR' or S == 'rsr' and S=='RSS' or S=='rss':
    res = 1
else:
    res = 0
print(res)

Submission status: Wrong Answer

Solution code:
def main():
    S=input()
    if S=="RRS":
        print(2)
    elif S=="SRR":
        print(2)
    elif S=="SSS":
        print(0)
    else:
        print(1)

if __name__=="__main__":
    main()

Submission status: Wrong Answer

Solution code:
s = input()
#ある数が7の倍数なら、「一の位の数に2をかけて、残った数から引いても7の倍数
if s[0] == "S":
    if s[1] == "S":
        if s[2] == "S":
            print("3")
        else:
            print("2")
    else:
        print("1")
            
elif s[1] == "S":
    if s[2] == "S":
        print("2")
    else:
        print("1")
elif s[2] == "S":
        print("1")
else:
    print("0")

Submission status: Wrong Answer

Solution code:

a = input()

if a == 'RRR':
    print("3")
elif a == 'RRS' or a == 'SRR':
    print("2")
elif a == 'RSS'or a == 'RSR' or 'SSR':
    print("1")
else :
    print("0")

Submission status: Wrong Answer

Solution code:
s = str(input())
if s[2] == 'S' or s[0] == 'S': print(2)
elif s[1] == 'S': print(1)
else: print(0)

Submission status: Wrong Answer

Solution code:
s = input()
S = list(s)
re = 0
a = 0
for i in range(3):
    if S[i] == 'R':
        a += 1
if a > 0:
    if a == 2:
        if S[0] == S[1] or S[1] == S[2]:
            re = 2
    elif S[0] == S[1] and S[1] == S[2] and a == 3:
        re = 3
    else:
        re = 1
else:
    re = 0
print(re)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = str(input())
if s[2] == 'S' or s[0] == 'S': print(2)
else: print(1)

Submission status: Wrong Answer

Solution code:
import re
S = input().upper()
two = re.findall("RR", S)
three = re.findall("RRR", S)
one = re.findall("R", S)
if two:
    print("2")
elif three:
    print("3")
elif one:
    print("1")
else:
    print("0")

Submission status: Wrong Answer

Solution code:
s = input()
num = 0
if s[0] == "R":
  num += 1
if s[1] == "R":
  num += 1
if s[2] == "R":
  num += 1
print(num)

Submission status: Wrong Answer

Solution code:
s = input()
lst = list(s)
counter = 0
buffer = 0
if 'R' not in lst:
    print(0)
else:
    for i in range(len(lst) - 1):
        if lst[i] == 'R':
            buffer += 1
        else:
            counter = buffer
            buffer = 0
        if buffer > counter:
            counter = buffer
    print(counter)

Submission status: Wrong Answer

Solution code:
i = 0
j = 0

w = ""
for s in input():
    j += 1

    if s == "R" and (w == s or w == ""):
        i += 1
    elif s == "R" and w != s:
        i += 1
    
    if s == "S" and i > 0 and j == 2:
        i -= 1

    w = s

print(i)

Submission status: Wrong Answer

Solution code:
s=input()

a=s.count("R")

if s[0]==s[1] or s[1]==s[2]:
  if a==2:
    print(2)
  
else:
  print(1)
  
if a==3:
  print(3)
  
elif a==1:
  print(1)
  
elif a==0:
  print(0)

Submission status: Wrong Answer

Solution code:
weather = input()
rainyDay = weather.count('R')
if weather[1] == 'R':
    print(rainyDay)
else:
    print(1)

Submission status: Wrong Answer

Solution code:
S = list(input())
count = 0
for i in range(len(S)):
  if(S[i] == 'R'):
    count += 1
print(count)

Submission status: Wrong Answer

Solution code:
S = input()
cnt = 0
max_cnt = 0
for i in range(3):
  s = S[i]
  if s == 'R':
    cnt += 1
  else:
    max_cnt = cnt
    cnt = 0
print(max_cnt)

Submission status: Wrong Answer

Solution code:
a = input()
if a =='SSS':
  print(0)
elif a=='RSS' or'SRS'or 'SSR'or 'RSR':
  print(1)
elif a == 'RRS'or 'SRR':
  print(2)
else:
  print(3)

Submission status: Wrong Answer

Solution code:
x = input()
if x == "SSS":
  print(0)
elif x == "SSR" or "SRS" or "RSR" or "RSS":
  print(1)
elif x == "SRR" or "RRS":
  print(2)
else:
  print(3)

Submission status: Wrong Answer

Solution code:
str = input()
i = 0
if 'R' in str:
        i += 1
        for j in range(len(str)-1):
                if str[j] == str[j+1]:
                        i += 1
print(i)

Submission status: Wrong Answer

Solution code:
import sys

def read_input():
  return sys.stdin.readline().strip().split(' ')

def task(s):
  rainy_til = []
  l = len(s)
  i = 0
  while i < l:
    if s[i] == 'R':
      last_rainy = rainy_til[i-1] if i > 0 else 0
      rainy_til[i] = last_rainy + 1
    else:
      rainy_til[i] = 0
  return max(rainy_til)

def main():
  s = read_input()
  result = task(s)
  print(result)

Submission status: Wrong Answer

Solution code:
S = input()
list_s = list(S)
count = 0
for i in range(3):
    if list_s[i] == 'R':
        count +=1
print(count)

Submission status: Wrong Answer

Solution code:
x = input()
if x == "SSS":
  print(0)
elif x == "SSR" or "SRS" or "RSR" or "RSS":
  print(1)
elif x == "SRR" or "RRS":
  print(2)
elif x == "RRR":
  print(3)

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
s = input()
S = list(s)
re = 0
a = 0
for i in range(3):
    if S[i] == 'R':
        a += 1
if a > 0:
    if S[0] == S[1] or S[1] == S[2]:
        re = 2
    elif S[0] == S[1] and S[1] == S[2]:
        re = 3
    else:
        re = 1
else:
    re = 0
print(re)

Submission status: Wrong Answer

Solution code:
n = str(input())

cnt = 0

for i in range(2):
    if n[i] == 'R':
        cnt += 1
if cnt == 2 and n[i] == 'S':
    print(1)
    exit(0)
print(cnt)

Submission status: Wrong Answer

Solution code:
n = list(input())
if n[1] == 'R':
    if n[0] == n[1] and n[1] == n[2]:
        print(3)
    elif n[0] != n[1] and n[1] == n[2]:
        print(2)
    elif n[0] == n[1] and n[1] != n[2]:
        print(2)
    else:
        print(1)
else:
    if n[0] == 'R':
        print(1)
    elif n[1] == 'R':
        print(1)

Submission status: Wrong Answer

Solution code:
X = input()
if X =='RRR':
    print('3')
elif X =='RRS' or X =='SRR':
    print('2')
elif X =='RSS' or X =='SRS' or X =='SSR':
    print('1')
elif X =='SSS':
    print('0')

Submission status: Wrong Answer

Solution code:
N = input()
if N == "SSS":
  print(0)
elif N == "RRS":
  print(2)
elif N == "SRR":
  print(2)
elif N == "SRS":
  print(1)
elif N == "RSR":
  print(1)
elif N == "SSR":
  print(2)
elif N == "RSS":
  print(1)
else:
  print(3)

Submission status: Wrong Answer

Solution code:
a = str(input())
anw = 0

for i in a:
    if i == 'R':
        anw += 1
    else:
        anw = 0

print(anw)

Submission status: Wrong Answer

Solution code:
def a(line):
	cnt = 0
	for i in range(len(line)):
		if cnt < 1 and line[i] == 'R':
			cnt += 1
			continue
		if cnt >= 1 and line[i] == line[i-1] and line[i] == 'R':
			cnt += 1
			continue
	return cnt
  
a(input())

Submission status: Wrong Answer

Solution code:
s = input().rstrip()
if "SSS" in s:
    print(3)
elif "SS" in s:
    print(2)
elif "S" in s:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
#coding:utf-8

a = input()

if a == "RRR":
    print("3")

elif a == "RRS" :
    print("2")

elif a == "SRR" :
    print("2")

elif a == "SRS" :
    print("1")

elif a == "RSS" :
    print("1")

elif a == "SSR" :
    print("1")

elif a == "SSS" :
    print("0")

Submission status: Wrong Answer

Solution code:
s=input()
cnt=0
for i in s:
	if i=="R":
		cnt+=1
	if i=="S":
		break
print(cnt)

Submission status: Wrong Answer

Solution code:
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)
if ok == 0:
    print(0)

Submission status: Wrong Answer

Solution code:
s = input()#s_1 s_2を分割して取得し、sに値を入れる
if 'RR' in s:
  print(2)
elif 'RRR' in s:
  print(3)
elif 'R' in s:
  print(1)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
S = input()
if 1 <= len(S) <=3:
    list_s = list(S)
    count = 0
    i = 1
    while i <=3:
        if list_s[i-1] == 'R':
            count +=1
        elif list_s[i-1] == 'S':
            count = 0
        i +=1
print(count)

Submission status: Wrong Answer

Solution code:
RS = input()
answer = 0

for i, j in enumerate(RS):
  if j == "R":
    answer += 1
  elif (i == 2 and j == "S") or (i == 1 and j == "S"):
    continue
  else:
    answer = 0
print(answer)

Submission status: Wrong Answer

Solution code:
'''

                            Online Python Compiler.
                Code, Compile, Run and Debug python program online.
Write your code in this editor and press "Run" button to execute it.

'''

s=list(input())

count=0
prev=s[0]
for i in range(1,len(s)):
    if s[i]=='R':
        count+=1
        if s[i]==prev:
            prev=s[i]
            count+=1
    else:
        prev=s[i]
    
        
    
print(count)

Submission status: Wrong Answer

Solution code:
weather = input()

if len(weather) != 3:
    print("0")
elif weather in ["RRR"]:
    print("3")
elif weather in ["SRR","RSR","RRS"]:
    print("2")
elif weather in ["SSR","SRS","RSS"]:
    print("1")
else:
    print("0")

Submission status: Wrong Answer

Solution code:
s = input()
counter = 0
buffer = 0
if not 'R' in s:
    print(0)
else:
    for i in range(len(s)):
        if s[i] == 'R':
            buffer += 1
        else:
            counter = buffer
            buffer = 0
        if buffer > counter:
            counter = buffer
    print(counter)

Submission status: Wrong Answer

Solution code:
s = input()
count = 0
if s[0] == 'R':
  count = 1
for i in range(len(s)-1):
  if s[i] == 'R' and s[i+1] == 'R':
    count += 1
print(count)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
N = input()
if N == "SSS":
  print(0)
elif N == "RRS":
  print(2)
elif N == "SRR":
  print(2)
elif N == "SRS":
  print(1)
elif N == "RSR":
  print(1)
else:
  print(3)

Submission status: Wrong Answer

Solution code:
S = str(input())
count = 0
for x in range(len(S)):
    if S[0] == 'R' and x == 0:
        count = count + 1
    elif S[x] == 'R' and S[x - 1] == 'R':
        count = count + 1
    elif S[x] == 'S':
        continue

if count >= 0:
    print(count)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
s = list(input())
l = len(s)
rain =int()
maxrain =int()
for x in range(l):
  if s[x]=="R":
    rain=rain+1
    maxrain=rain
  else:
    maxrain=rain
    rain=0
print(maxrain)

Submission status: Wrong Answer

Solution code:
import re
S = input().upper()
two = re.findall("RR", S)
three = re.findall("RRR", S)
one = re.findall("R", S)
if two:
    print(2)
elif three:
    print(3)
elif one:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
S = input()
list_s = list(S)
count = 0
i = 1
while i <=3:
    if list_s[i-1] == 'R':
        count +=1
    elif list_s[i-1] == 'S':
        count = 0
    i +=1
print(count)

Submission status: Wrong Answer

Solution code:
weather = input()

if len(weather) != 3:
    print("0")
if weather in ["RRR"]:
    print("3")
elif weather in ["SRR","RSR","RRS"]:
    print("2")
elif weather in ["SSR","SRS","RSS"]:
    print("1")
else:
    print("0")

Submission status: Wrong Answer

Solution code:
s=input()
cnt=0
for i in s:
	if i=="R":
		cnt+=1
	elif i=="S":
		break
print(cnt)

Submission status: Wrong Answer

Solution code:
S = input()[0:3]
res = 0

if S[0] == "R" and S[1] == "R" and S[2] == "R":
    res = 3
elif S[0] == "R" and S[1] == "R":
    res = 2
elif S[0] == "R":
    res = 1
print(res)

Submission status: Wrong Answer

Solution code:
S=input()
ans=0
c=0
for i in range(3):
  if S[i]=="R":
    ans+=1
  else:
    c=max(ans,c)
    ans=0
print(c)

Submission status: Wrong Answer

Solution code:
input_data = input()

if input_data == 'RRR':
  count = 3
elif input_data == 'RRB' or input_data == 'BRR':
  count = 2
elif 'R' not in input_data:
  count = 0
else:
  count = 1
  
print(count)

Submission status: Wrong Answer

Solution code:
mystr = input()
ans = 0
ret = 0
for i in mystr:
    if i == 'R':
        ret += 1
    else:
        ans = max(ans, ret)
        ret = 0
print(ans)

Submission status: Wrong Answer

Solution code:
ss=input()
if ss[0] == ss[1] ==ss[2] == "R":
  print(3)
elif ss[0] == ss[1] == "R" or ss[1]==ss[2] == "R" or ss[2] == ss[0] == "R":
  print(2)
elif "R" in ss:
  print(1)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
S = list(input())
count=0
for i in range(3):
    if S[i-1]=="R":
        count=1
        if S[i-1]==S[i]:
            count+=1
        else:
            count=count
    else:
        count=count
print(count)

Submission status: Wrong Answer

Solution code:
S = input()
list_s = list(S)
count = 0
if len(list_s)<4:
    for i in range(3):
        if list_s[i] == 'R':
            count +=1
        elif list_s[i] == 'S':
            count = 0
print(count)

Submission status: Wrong Answer

Solution code:
input_data = input()

if input_data == 'RRR':
  count = 3
elif input_data == 'RRB' or input_data == 'BRR':
  count = 2
elif input_data not in 'R':
  count = 0
else:
  count = 1
  
print(count)

Submission status: Wrong Answer

Solution code:
import re

user_input = input().upper()
two = re.findall("RR", user_input)
three = re.findall("RRR", user_input)
one = re.findall("R", user_input)
if two:
    print(2)
elif three:
    print(3)
elif one:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
s = list(input())
l = len(s)
rain =int()
maxrain =int(1)
for x in range(l):
  if s[x]=="R":
    rain=maxrain+1
  else:
    maxrain=0
print(rain)

Submission status: Wrong Answer

Solution code:
weather = input()

if weather in ["RRR"]:
    print("3")
elif weather in ["SRR","RSR","RRS"]:
    print("2")
elif weather in ["SSR","SRS","RSS"]:
    print("1")
else:
    print("0")

Submission status: Wrong Answer

Solution code:
s = input()
if s == "SSS":
    print(0)
elif s == "RSR":
    print(1)
elif s == "RRS":
    print(2)
elif s == "RRR":
    print(3)

Submission status: Wrong Answer

Solution code:
s=input()
i=0
c=0
if s[i]=='R':
  c=1
  if s[i+1]=='R':
    c=2
    if s[i+2]=='R':
      c=3
if s[i]=='S':
  c=0
  if s[i+1]=='S':
      c=0
  else:
      c=1
  if s[i+2]=='R':
      c=1
print(c)

Submission status: Wrong Answer

Solution code:
s = input()
x = 0
ans = 0

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

print(max(x, ans))

Submission status: Wrong Answer

Solution code:
w = input()

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

Submission status: Wrong Answer

Solution code:
print(input().count("R"))

Submission status: Wrong Answer

Solution code:
S = input()
list_s = list(S)
count = 0
if len(list_s)<4:
    for i in range(2):
        if list_s[i] == 'R':
            count +=1
        elif list_s[i] == 'S':
            count = 0
print(count)

Submission status: Wrong Answer

Solution code:
s = input()
sd = ['' for i in range(3)]
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)

Submission status: Wrong Answer

Solution code:
import numpy as np
s = input()
def s_count(s):
    m = list(s)
    array = np.zeros(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]) or i == 0:
                count += 1
                array[i] += count
            else:
                count = 0
    return array.max()
s_count(s)

Submission status: Wrong Answer

Solution code:
S=input()
string1 = 'R'
string2 = 'RR'
if S.count(string1) == 0:
    print('0')
if S.count(string1) == 1 or S == 'RSR':
    print('1')
if S.count(string1) == 2:
    print('2')
if S.count(string1) == 3:
    print('3')

Submission status: Wrong Answer

Solution code:
S = input()
list_s = list(S)
count = 0
if 1<len(list_s)<4:
    for i in range(2):
        if list_s[i] == 'R':
            count +=1
        elif list_s[i] == 'S':
            count = 0
print(count)

Submission status: Wrong Answer

Solution code:
S=input()
if S=="SSS":
    print(3)
elif S=="SSR":
    print(2)
elif S=="SRS":
    print(1)
elif S=="RSS":
    print(1)
elif S=="SRR":
    print(2)
elif S=="RSR":
    print(1)
elif S=="RRS":
    print(2)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
S = input()
if S=="RRR":
    print(3)
elif S=="RRS":
    print(3)
elif S=="RSS":
    print(1)
elif S=="SSS":
    print(0)
elif S=="RSR":
    print(1)
elif S=="SRR":
    print(2)
elif S=="SSR":
    print(1)
elif S=="SRS":
    print(1)

Submission status: Wrong Answer

Solution code:
s = list(input())
l = len(s)
rain =int()
for x in range(l):
  if s[x]=="R":
    rain=rain+1
  else:
    if rain==0:
      rain=0
    else:
      rain=rain
print(rain)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

def main():
    S = input()
    if "RRR" == S:
        print(3)
    elif "RR" in S:
        print(2)
    elif "R" in S:
        print(1)
    else:
        print(0)

main()

Submission status: Wrong Answer

Solution code:
user = str(input())
if(user == "RRS"):
    print("2")
elif(user == "SSS"):
    print("0")
else:
    print("1")

Submission status: Wrong Answer

Solution code:
S = str(input())
if S == "SSS":
    print(0)
elif S == "SSR"or"SRS"or"RSS"or"RSR":
    print(1)
elif S == "SRR"or"RRS":
    print(2)
elif S == "RRR":
    print(7)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

S = input()

n = S.count('R')
print(n)

Submission status: Wrong Answer

Solution code:
s = list(input())
a = 0
ans = 0
for i in range(3):
    if s[i] == 'R':
        a += 1
    else:
        ans = max(a, ans)
        a = 0

print(ans)

Submission status: Wrong Answer

Solution code:
S=input()
string1 = 'R'
string2 = 'RR'
if S.count(string1) == 0:
    print('0')
if S.count(string1) == 1 or S == 'RSR':
    print('1')
if S.count(string2) == 1:
    print('2')
if S.count(string1) == 3:
    print('3')

Submission status: Wrong Answer

Solution code:
S = str(input())
if S == "SSS":
    print(0)
elif S == "SSR"or"SRS"or"RSS"or"RSR":
    print(1)
elif S == "SRR"or"RRS":
    print(2)
elif S == "RRR":
    print(4)

Submission status: Wrong Answer

Solution code:
import numpy as np

s = input()

li = []
for i in s:
    li.append(i)

if "R" not in li:
    print(0)
    exit()

if len(list(set(li))) == 1:
    print(3)
    exit()

for i in range(3):
    if li[i] == "R":
        li[i] = 1
    else:
        li[i] = 0

li_array = np.array(li)
temp = np.arange(len(li_array))

temp[li_array>0] = 0
np.maximum.accumulate(temp,out=temp)
left = temp

x_reversed = li_array[::-1]
temp  = np.arange(len(li_array))
temp[x_reversed>0] = 0
np.maximum.accumulate(temp,out=temp)
right = len(li_array) - 1 - temp[::-1]

y = right
y -= left + 1
y[li_array==0] = 0
print(np.max(y)+1)

Submission status: Wrong Answer

Solution code:
S = str(input())
count = 0

if S == 'RRR':
    print(3)
elif S == 'RRS':
    print(2)
elif S == 'RSS':
    print(1)
elif S == 'RSR':
    print(1)
elif S == 'SRR':
    print(2)
elif S == 'SSR':
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
#coding :utf-8
S=input()
if (S=="SSS"):
    print(3)
elif(S=="SSR"):
    print(2)
elif(S=="SRS"):
    print(1)
elif(S=="RSS"):
    print(1)
elif(S=="SRR"):
    print(2)
elif(S=="RSR"):
    print(1)
elif(S=="RRS"):
    print(2)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
d = input()
c = 0

for i in range(3):
  if d[i] == 'R':
    c += 1
    
if c == 2 and d[1] == 'S':
  print(0)
else:
  print(c)

Submission status: Wrong Answer

Solution code:
RS = input()
answer = 0

for i, j in enumerate(RS):
  if j == "R":
    answer += 1
  elif (i == 2 and j == "S") or (i == 1 and j == "S"):
    break
  else:
    answer = 0
print(answer)

Submission status: Wrong Answer

Solution code:
import re
S = input()
if re.search(r'R{3}', S):
  a = 3
elif re.search(r'R{2}', S):
  a = 2
elif re.search(r'R{1}', S):
  a = 1
else:
  a = 1
print(a)

Submission status: Wrong Answer

Solution code:
list = input()
#print(list[2])
#print(len(list))
cnt = 0
for n in list:
  #print(n)
  if n == "R":
    cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
S=input()
set_S=set(S)
if len(set_S)==1:
    ret=S.count('R')
else:
    if S[0]==S[1]=='R' or S[1]==S[2]=='R':
        ret=2
    else:
        ret=S.count('R')-1
print(ret)

Submission status: Wrong Answer

Solution code:
user = input()
if(user == "RRS"):
    print("2")
elif(user == "SSS"):
    print("0")
else:
    print("1")

Submission status: Wrong Answer

Solution code:
s = input()
x = 0
ans = 0

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

print(ans)

Submission status: Wrong Answer

Solution code:
a=list(input().split())
c=a.count("R")
if c==3:
    print(3)
elif c==0:
    print(0)
elif c==2 and a[0]==a[1] or c==2 and a[1]==a[2] :
    print(2)
else: print(1)

Submission status: Wrong Answer

Solution code:
n = list(input())
result = 0
for i in range(1, len(n)):
    if n[i-1] == "R":
        result = 1
        if n[i] == n[i-1]:
            result += 1
    else:
        result = 0
print(result)

Submission status: Wrong Answer

Solution code:
S = input()[0:3]
res = 0

if S[0] == S[1]:
    res +=1
elif S[1] == S[2]:
    res +=1
else:
    res = 0

print(res)

Submission status: Wrong Answer

Solution code:
input_data = list(input())
count = 0

for i in range(len(input_data)):
  if i == 0:
    if input_data[0] == 'R':
      count += 1
    else:
      continue
  else:
    if input_data[i] == 'R':
      if input_data[i-1] == input_data[i]:
        count += 1
      else:
        continue
print(count)

Submission status: Wrong Answer

Solution code:
import numpy as np

s = input()

li = []
for i in s:
    li.append(i)

if "R" not in li:
    print(0)
    exit()

for i in range(3):
    if li[i] == "R":
        li[i] = 1
    else:
        li[i] = 0

li_array = np.array(li)
temp = np.arange(len(li_array))

temp[li_array>0] = 0
np.maximum.accumulate(temp,out=temp)
left = temp

x_reversed = li_array[::-1]
temp  = np.arange(len(li_array))
temp[x_reversed>0] = 0
np.maximum.accumulate(temp,out=temp)
right = len(li_array) - 1 - temp[::-1]

y = right
y -= left + 1
y[li_array==0] = 0
print(np.max(y)+1)

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
#coding:utf-8

a = input()

if a == "SSS":
    print("0")

elif a == "RRR":
    print("3")

elif a == "RRS" or "SRR":
    print("2")

else :
    print("1")

Submission status: Wrong Answer

Solution code:
S=input()
string1 = 'R'
string2 = 'RR'
if S.count(string1) == 0:
    print('0')
if S.count(string1) == 1 and S == 'RSR':
    print('1')
if S.count(string2) == 1:
    print('2')
if S.count(string1) == 3:
    print('3')

Submission status: Wrong Answer

Solution code:
S = input()
a = ["RRS", "SRR"]
if S in a:
    print(2)
elif S == "RRR":
    print(3)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
#coding :utf-8
S=input()
if (S=="sss"):
    print(3)
elif(S=="ssr"):
    print(2)
elif(S=="srs"):
    print(1)
elif(S=="rss"):
    print(1)
elif(S=="srr"):
    print(2)
elif(S=="rsr"):
    print(1)
elif(S=="rrs"):
    print(2)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
s = input()
if s == 'RRS':
    print(2)
elif s == 'SRR':
    print(2)
elif s == 'RRR':
    print(3)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
import sys

x = input()

if len(x) != 3 :
    sys.exit()

k=0

for k in range(2):
    if x[k] != "R":
        if x[k] != "S":
            print("無効な値です")
            sys.exit()
    k=k+1

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

Submission status: Wrong Answer

Solution code:
S=str(input())

ans = 0
if S == "SSS":
	ans = 0
elif S == "SSR" or S == "RSS" or S == "RSR":
	ans = 1
elif S == "SRR" or S == "RRS":
	ans = 2
elif S == "RRR":
	ans = 3
print(ans)

Submission status: Wrong Answer

Solution code:
S=input()
set_S=set(S)
if len(set_S)==1:
    ret=S.count('R')
elif len(set_S)==2:
    if S[0]==S[1]=='R' or S[1]==S[2]=='R':
        ret=2
    else:
        ret=S.count('R')-1
print(ret)

Submission status: Wrong Answer

Solution code:
weather = input()
if len(weather) == 3:
    if weather[0] == weather[1] and weather[1] == weather[2]:
        print("0")
    elif weather[0] == weather[1] and weather[1] != weather[2]:
        print("2")
    else:
        print("1")
else:
    print()

Submission status: Wrong Answer

Solution code:
a=list(input().split())
c=a.count("R")
if c==3:
    print(3)
elif c==0:
    print(0)
elif c==2 and (a[0]==a[1] or a[1]==a[2]):
    print(2)
else: print(1)

Submission status: Wrong Answer

Solution code:
d = input()
c = 0

for i in range(3):
  if d[i] == 'R':
    c += 1
    
if c == 2 and d[1] == 'R':
  print(0)
else:
  print(c)

Submission status: Wrong Answer

Solution code:
n = list(input())
result = 0
for i in range(1, len(n)):
    if n[i] == "R":
        result = 1
        if n[i] == n[i-1]:
            result += 1
    else:
        result = 0
print(result)

Submission status: Wrong Answer

Solution code:
S = str(input())
if S == "SSS":
    print(0)
elif S == "SSR"or"SRS"or"RSS"or"RSR":
    print(1)
elif S == "SRR"or"RRS":
    print(2)
elif S == "RRR":
    print(3)

Submission status: Wrong Answer

Solution code:
S=input()
if "RRR" in S:
    print(3)
if "RR" in S:
    print(2)
if "R" in S:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
S=list(input())