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:
c = 0
r = []
for i in input():
  if i=='R':
    c+=1
  else:
    r.append(c)
    c = 0
if not len(r):
  print(c)
else:
  print(max(r))

Submission status: Wrong Answer

Solution code:
c = 0
for i in input():
  if i=='R':
    c+=1
  else:
    c = 0
print(c)

Submission status: Wrong Answer

Solution code:
c = 0
for i in input():
  if i=='R':
    c+=1
if c==3:
  print(3)
else:
  print(1)

Submission status: Wrong Answer

Solution code:
s = input()
c = 0
for i in s:
  if i=='R':
    c+=1
  else:
    c=0

Submission status: Wrong Answer

Solution code:
s = input()
c = 0
for i in s:
  if i=='R':
    c+=1
  else:
    c-=1
print(c)

Submission status: Wrong Answer

Solution code:
s = input()
c = 0
for i in s:
  if i=='R':
    c+=1
print(c)

Submission status: Wrong Answer

Solution code:
c = 0
for i in input().split():
  if i=='R':
    c +=1
print(c)

Submission status: Wrong Answer

Solution code:
s = input()
print(max([s.count('R'), s.count('RR'), s.count('RRR')]))

Submission status: Wrong Answer

Solution code:
s = input()
cnt = 0
for i in range(2):
    if s[i] == "R":
        cnt += 1
    else:
        cnt = 0
        
if s[2] == "R":
    cnt += 1

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=list()
s=list(map(str,input()))
print(s)
count=0
if s[0]==s[1]:
    count+=2
elif s[1]==s[2]:
    count+=2
else:
    count+=1

print(count)

Submission status: Wrong Answer

Solution code:
S = list(input())
max = 0
count = 0
for i in S:
  if i == "R":
    count += 1
  else:
    max = count
    count = 0
if max < count:
  max = count
print(max)

Submission status: Wrong Answer

Solution code:
S = list(input())
max = 0
count = 0
for i in S:
  if i == "R":
    count += 1
  else:
    max = count
    count = 0
print(max)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in S:
    if i == "R":
        count += 1

if count >= 3:
    ans = 3

elif count >= 1 :
    if S[1] == "S":
        ans = 1
    else:
        ans = 2
else:
    ans = 0

print(ans)

Submission status: Wrong Answer

Solution code:
S = input()
counter = 0
tmp = 0
for s in S:
    tmp += 1
    if s == 'R':
        counter += 1
    elif tmp == 3 and s == 'S':
        break
    else:
        counter = 0
print(counter)

Submission status: Wrong Answer

Solution code:
S = input()
counter = 0
for i in range(3):
    if S[i] == 'R':
        counter += 1
    elif S[2] == 'S':
        break
    else:
        counter = 0
print(counter)

Submission status: Wrong Answer

Solution code:
weather = input()
sunny_count = 0

for i in range(3):
  if weather[i] == "S":
    sunny_count += 1
  else:
    continue
    
print(sunny_count)

Submission status: Wrong Answer

Solution code:
S = input()
c = 0

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

Submission status: Wrong Answer

Solution code:
inp = input()
count=0
res=0
for ch in inp:
  if ch=="R":
    count+=1
  else:
    res=max(res,count)
    count=0
res=max(res,count)
print(count)

Submission status: Wrong Answer

Solution code:
inp = input()
count=0
res=0
for ch in inp:
  if ch=="R":
    count+=1
  else:
    res=max(res,count)
    count=0
print(count)

Submission status: Wrong Answer

Solution code:
inp = input()
count = 0
if len(inp) == 1:
  if inp=="R":
    print(1)
  elif inp=="S":
    print(0)
else:
  for c in range (1,len(inp)-1):
    if inp[c] == inp[c-1] and inp[c]=="R":
      count+=1
  print(count+1 if count>0 else count)

Submission status: Wrong Answer

Solution code:
S = input()
count = 0
ans = 0
for i in range(3):
    if S[i]=="R" and i<2:
        count += 1
    elif S[i]=="R" and i == 2:
        ans = count + 1
    else:
        ans = count
        count = 0
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S=input()

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

Submission status: Wrong Answer

Solution code:
S = list(input())

cnt = 0

previous_weather = ''
for i, w in enumerate(S):
  if w == 'R' and i == 0:
    cnt += 1
  elif w == 'R' and w == previous_weather:
    cnt += 1
  previous_weather = w

print(cnt)

Submission status: Wrong Answer

Solution code:
s = str(input())
if s == 'SSR' or 'RSS' or 'RRS' or 'SRR' :
  print(2)
elif s == 'SSS' or 'RRR' :
  print(3)
else :
  print(1)

Submission status: Wrong Answer

Solution code:
S = input()

n_rainy_day = 0

for i in range(3):
  if S[i] == 'S':
    if n_rainy_day == 0:      
      n_rainy_day += 1
    elif S[i-1] == 'S':
      n_rainy_day += 1
          
print(n_rainy_day)

Submission status: Wrong Answer

Solution code:
S = list(input())
X = 0
if S[1] == "R":
    if S[0] == S[1] or S[1] == S[2]:
        if S[0] == "R" and S[2] == "R":
            X = 3
        else:
            X = 2
elif S[0] == "R" or S[2] =="R":
    X = 1
print(X)

Submission status: Wrong Answer

Solution code:
S = input()

n_rainy_day = 0

for i in range(3):
  if S[i] == 'S':
    n_rainy_day += 1
    
print(n_rainy_day)

Submission status: Wrong Answer

Solution code:
S = list(input())
X = 0
if S[1] == "R":
    if S[0] == S[1] or S[1] == S[2]:
        if S[0] == "R" and S[2] == "R":
            X = 2
        else:
            X = 1
print(X)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

n=0
result=0
k=input()

for i in range(len(k)):
    if k[i]=="R":
        n+=1
    else:
        result=max(result,n)
result=max(result,n)
print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
print("Hello")

Submission status: Wrong Answer

Solution code:
print("A.py")

Submission status: Wrong Answer

Solution code:
r,s=0,input()
for i in range(3):
  if s[i]=='S':
    break
  r+=1
print(r)

Submission status: Wrong Answer

Solution code:
r,s=0,input()
for l in s:
  if l=='S':
    break
  r+=1
print(r)

Submission status: Wrong Answer

Solution code:
r=0
for l in input():
  if l=="S":
    break
  r+=1
print(r)

Submission status: Wrong Answer

Solution code:
r=0
for l in input():
  r+=1 if l=='R' else 0
print(r)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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:
  	print("0")

Submission status: Wrong Answer

Solution code:
S = input()
if S[0] == 'R':
  if S[1] == 'R':
    if S[2] == 'R':
      print("3")
    else:
      print("2")
  else:
    print("1")
else:
  print("0")

Submission status: Wrong Answer

Solution code:
S = input()
if S[1] == "R":
    if S[0] == "R" and S[2] =="R":
        print("3")
    elif S[0] and S[2] == "R":
        print("2")
    else:
        print("1")
elif S.count("R") == 0:
    print("0")
else:
    print("1")

Submission status: Wrong Answer

Solution code:
S = input()
print(S.count("R")-1)

Submission status: Wrong Answer

Solution code:
def solve(x):
  if x.count("RRR"):
    return 3
  if x.count("RR"):
    return 2
  if x.count("R"):
    return 1

x = input()
print(solve(x))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
if S[1] == "R":
    if S[0] == "R" and S[2] == "R":
        print("2")
    elif S[0] or S[2] == "R":
        print("1")
else:
    print("0")

Submission status: Wrong Answer

Solution code:
lst = list(input().upper())

print(lst.count("R"))

Submission status: Wrong Answer

Solution code:
S = input()
S.count('R')
print(S.count('R'))

Submission status: Wrong Answer

Solution code:
S = input()
num = S.count('R')
print(num)

Submission status: Wrong Answer

Solution code:
S = input()
print(S.count('R'))

Submission status: Wrong Answer

Solution code:
S = input()
counter = 0
for i in S:
  if i == 'S':
    counter = 0
  elif i == 'R':
    counter += 1

print(counter)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
num=0
for i in s:
    if i=="R":
        num+=1
    elif i!="R":
        num=0
print(num)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

Solution code:
import sys


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
for i in range(2):
    if s[i] == 'R':
        ans = max(ans, 1)
    if s[i:i+2] == 'RR':
        ans = max(ans, 2)
    if s[i:i+3] == 'RRR':
        ans = 3
print(ans)

Submission status: Wrong Answer

Solution code:
tenki=str(input())

if "RRR" in tenki:
  print("3")

elif "RR" in tenki and "RRR" not in tenki:
  print("2")
elif tenki.count("R")==1:
  print("1")
else:
  print("0")

Submission status: Wrong Answer

Solution code:
s = str(input()).upper()# S, R == sunny, rainy

def weather(s):
    if s == 'RRR':
        return 0
    elif s == ('RRS'):
        return 2
    elif s == ('RSR'):
        return 1
    elif s == ('RSS'):
        return 2
    elif s == ('SRR'):
        return 2
    elif s == ('SRS'):
        return 1
    elif s == ('SSR'):
        return 2
    elif s == ('SSS'):
        return 0
    
    

print(weather(s))

Submission status: Wrong Answer

Solution code:
s = str(input()).upper()# S, R == sunny, rainy

def weather(s):
    if s == 'RRR':
        return 3
    elif s == ('RRS'):
        return 2
    elif s == ('RSR'):
        return 1
    elif s == ('RSS'):
        return 2
    elif s == ('SRR'):
        return 2
    elif s == ('SRS'):
        return 1
    elif s == ('SSR'):
        return 2
    elif s == ('SSS'):
        return 0
    
    

print(weather(s))

Submission status: Wrong Answer

Solution code:
s = str(input()).upper()# S, R == sunny, rainy

def weather(s):
    if s == 'RRR':
        print('3')
    elif s == ('RRS'):
        return 2
    elif s == ('RSR'):
        return 1
    elif s == ('RSS'):
        return 2
    elif s == ('SRR'):
        return 2
    elif s == ('SRS'):
        return 1
    elif s == ('SSR'):
        return 2
    elif s == ('SSS'):
        return 3
    
    

print(weather(s))

Submission status: Wrong Answer

Solution code:
s = str(input()).upper()# S, R == sunny, rainy
def weather(s):
    if s == 'RRR':
        print('3')
    elif s == ('RRS'):
        print('2')
    elif s == ('RSR'):
        print('1')
    elif s == ('RSS'):
        print('2')
    elif s == ('SRR'):
        print('2')
    elif s == ('SRS'):
        print('1')
    elif s == ('SSR'):
        print('2')
    elif s == ('SSS'):
        print('3')
    

print(weather(s))

Submission status: Wrong Answer

Solution code:
s = str(input()).upper()# S, R == sunny, rainy
def weather(s):
    if s == 'RRR':
        print('3')
    elif s == ('RRS'):
        print('2')
    elif s == ('RSR'):
        print('1')
    elif s == ('RSS'):
        print('1')
    elif s == ('SRR'):
        print('2')
    elif s == ('SRS'):
        print('1')
    elif s == ('SSR'):
        print('1')
    elif s == ('SSS'):
        print('0')
    

print(weather(s))

Submission status: Wrong Answer

Solution code:
S = map(str, input())
print(S)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S=input()
def fun(S):
    count=0
    max=0
    for i in S:
        if i=='R':
            count+=1
        
            if count>=max:
                max=count
            
    else:
        if count>=max:
            max=count
        count=0
    return max
print(fun(S))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
str = input()
splited = list(str)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

s = raw_input()
count = 0
a = 0
for j in range(len(s)):
	if s[j] == 'R':
		count +=1
	else:
		count = 0
	a = max(count, a)
print

Submission status: Wrong Answer

Solution code:
a = input(str)

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
S = list(input())
S.append("")
N = len(S)
#X = [[0] for i in range(N+1)]
ans = 0
i = 0
while i < N:
#for i in range(N-1):
    if S[i]=="R":
        ans = 1
        if S[i]==S[i+1]:
            ans += 1
            i += 1
    i += 1
print(ans)

Submission status: Wrong Answer

Solution code:
S = list(input())
S.append("")
N = len(S)
#X = [[0] for i in range(N+1)]
ans = 0
i = 0
while i < N:
#for i in range(N-1):
    if S[i]=="R":
        ans += 1
        if S[i]==S[i+1]:
            ans += 1
            i += 1
    i += 1
print(ans)

Submission status: Wrong Answer

Solution code:
from sys import exit
X = list(input())
X.append("")
N = len(X)
#X = [[0] for i in range(N+1)]
ans = 0
i = 0
while i < N:
#for i in range(N-1):
    if X[i]=="R":
        ans += 1
        if X[i]==X[i+1]:
            ans += 1
            i += 1
    i += 1
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()

count = 0
ans = 0

for i in s:
    if i == 'R':
        count += 1
    if i == 'S':
        if count >= ans:
            ans = count
        count = 0
print(ans)

Submission status: Wrong Answer

Solution code:
s = input().split('S')

ans = 0

for i in s:
  if len(s) > ans:
    ans = len(s)
    
print(ans)

Submission status: Wrong Answer

Solution code:
s = input().replace('R','S')

if s == '':
  print(0)
else:
  print(len(s))

Submission status: Wrong Answer

Solution code:
s = input().replace('S', '')

print(len(s))

Submission status: Wrong Answer

Solution code:
s = input()

ans = 0

if 'R' in s:
  ans = 1
elif 'RR' in s:
  ans = 2
elif s == 'RRR':
  ans = 3
  
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
r = 3 if s == 'RRR' else 1
if 'RR' in s:
    r = 2
elif not 'R' in s:
    r = 0
print(r)

Submission status: Wrong Answer

Solution code:
s = input()
r = 3 if s == 'RRR' else 1
if 'RR' in s:
    r = 2
print(r)

Submission status: Wrong Answer

Solution code:
s = input()

def A():
  if s == 'RRR':
    return 3
  if s == 'RRS' or s == 'SRR':
    return 2
  return 1

print(A())

Submission status: Wrong Answer

Solution code:
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 >= R_max:
  R_max = R_n

print(R_max)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

R_n = 0
R_max = 0
for i in S:
  if i == 'R':
    R_n += 1
  elif i == 'S':
    R_max = R_n
    R_n = 0

print(R_max)

Submission status: Wrong Answer

Solution code:
S = input()

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

print(R_max)

Submission status: Wrong Answer

Solution code:
S = input()
if S == 'RRR':
    print(3)

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

elif 'R' in S:
    print(1)

else:
    print(0)

Submission status: Wrong Answer

Solution code:
S = input()

if S == "RRR":
    print(3)
elif S == "SSS":
    print(0)
elif S[0:2] == "SS" or S[1:3] == "SS":
    print(1)
else:
    print(2)

Submission status: Wrong Answer

Solution code:
S = input()

if S == "RRR":
    print(3)
elif S == "SSS":
    print(0)
elif S[0:2] == "R" or S[1:3] == "R":
    print(2)
else:
    print(1)

Submission status: Wrong Answer

Solution code:
S = input()

if S == "RRR":
    print(3)
elif S[0:2] == "R" or S[1:2] == "R":
    print(2)
elif S == "SSS":
    print(0)
else:
    print(1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def rainy(S):
    if len(S) < 3 or len(S) > 3:
        return 
    count = 0
    for c in S:
        if c == 'R':
            count += 1
    return count

Submission status: Wrong Answer

Solution code:
test = input()

temp = ''
count = 0
for i in test:
    if i == 'R':
        temp = 'R'
    
    if i == 'R' and temp == 'R':
        count += 1
print(count)

Submission status: Wrong Answer

Solution code:
t = input()
rain = 0
for i in t:
  if i == 'R':
    rain +=1
print(rain)

Submission status: Wrong Answer

Solution code:
s=input().split('S')
if s.count('RR'): print(2)
elif s.count('R'): print(1)
else: print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
rain = 0
ans = 0
for i in s:
  if i == "R":
    rain += 1
    ans = max(ans, rain)
  else:
    rain = 0
print(rain)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
S = input()
ans = 0
while True:
    if 'RR' in S:
        S = S.replace('RR', 'R')
        ans += 1
    else:
        break

if not ans == 0:
    ans += 1

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
ans = s.count('R')
if s=='RSR':
  ans = 1
print(1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
if S == "RRS" or S == "SRR":
  print(2)
elif S == "RSR":
  print(1)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
S = input()

ans = 0

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

s=input()
list_s=list(s)
element="R"
count=0
for i in range(0,len(list_s)-1):
    if(list_s[i] in element):
        if(list_s[i+1] in element):
            count+=2
        else:
            count+=1
    else:
        count+=0

print(count)

Submission status: Wrong Answer

Solution code:

s=input()
list_s=list(s)
element="R"
count=0
for i in range(0,len(list_s)-1):
    if(list_s[i] in element):
        if(list_s[i+1] in element):
            count+=2
        else:
            count+=1
    else:
        count+=1

print(count)

Submission status: Wrong Answer

Solution code:

s=input()
list_s=list(s)
element="R"
count=0
for i in range(0,len(list_s)-1):
    if(list_s[i] in element):
        if(list_s[i+1] in element):
            count+=2
        else:
            count+=1
    else:
        count+=0
if(count%2 != 0):
    new_count=int(count-0.5)
    print(new_count)
    
else:
    print(count)

Submission status: Wrong Answer

Solution code:

s=input()
list_s=list(s)
element="R"
count=0
for i in range(0,len(list_s)-1):
    if(list_s[i] in element):
        if(list_s[i+1] in element):
            count+=2
        else:
            count+=1
    else:
        count+=0
print(count)

Submission status: Wrong Answer

Solution code:

s=input()
list_s=list(s)
element="R"
count=0
for i in range(0,len(list_s)-1):
    if(element == list_s[i]):
        if(element == list_s[i+1]):
            count+=2
        
    else:
        count+=1

print(count)

Submission status: Wrong Answer

Solution code:
# cook your dish here
s=input()
list_s=list(s)
element="R"
count=0
for i in range(0,len(list_s)-1):
    if(element == list_s[i]):
        if(element == list_s[i+1]):
            count+=1
        
    else:
        count+=0

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# cook your dish here
s=input()
list_s=list(s)
element="R"
count=0
for i in range(0,len(list_s)-1):
    if(element in list_s[i],list_s[i+1]):
        count+=1
        
    else:
        count+=0

print(count)

Submission status: Wrong Answer

Solution code:
N=input()
X=0
Y=0
for i in range(len(N)):
  if N[i]=="R":
    X+=1
  else:
    Y=X
    X=0
print(max([X,Y]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
i=0
count=1
while(i<len(s)-1):
  if s[i]==s[i+1]:
    count+=1
    i+=1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
weather = input().rstrip()
rainyDays = sum([c=="R" for c in weather])
if weather[1] == "S":
  rainyDays -= 1
print(max(rainyDays, 0))

Submission status: Wrong Answer

Solution code:
# AtCoder Beginner Contest 175
# A - Rainy Season

S=input()

ans=0

if len(S)==1:
    print(S.count("R"))
    exit()

count=0
for i in range (1,len(S)):
    if S[i]=="R":
        if count>0:
            pass
        else:
            count=1
        if S[i-1]=="R":
            count+=1
        else:
            if count>ans:
                ans=count
                count=0
else:
    if count>ans:
        ans=count

print(ans)