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

Submission status: Wrong Answer

Solution code:
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()
# print(days)
count = 0 if days[0] != 'R' else 1
res = 0
for i in range(1,3):
    if days[i] == 'R' and days[i-1] == 'R':
        count += 1
    elif days[i] == 'R':
        count = 1
    else:
        count = 0
    res = max(res,count)
print(res)

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

Solution code:
s = str(input())
ans = 0
tmp = 0
for i in range(len(s)):
    if(s[i] == 'R'):
        tmp += 1
    else:
        ans = tmp
        tmp = 0
ans = max(tmp,ans)
print(ans)

Submission status: Wrong Answer

Solution code:
s = str(input())
ans = 0
tmp = 0
for i in range(len(s)):
    if(s[i] == 'R'):
        tmp += 1
    else:
        ans = tmp
        tmp = 0

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    S = input()
    rains = 0
    for i, s in enumerate(S):
        if s == 'R':
            rains += 1
        else:
            if i == 2:
                continue
            rains = 0

    print(rains)

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    S = input()
    rains = 0
    for i, s in enumerate(S):
        if s == 'R':
            rains += 1
        else:
            rains = 0

    print(rains)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# rainy season

def rainy(S):
  if 'SSS' in S:
    return 3
  if 'SS' in S:
    return 2
  if 'S' in S:
    return 1
  return 0

if __name__ == "__main__":
  input = list(input().split())
  print(rainy(input[0]))

Submission status: Wrong Answer

Solution code:
s=input()

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

Submission status: Wrong Answer

Solution code:
a=input()

renzoku=0
mae="S"
for i in a:
  if i=="R":
    if mae=="R":
      renzoku+=1
    else:
      mae="R"
print(renzoku)

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

Solution code:
s=input()
ans = 0
if 'SSS' in s:
  ans = 3
elif 'SS' in s:
  ans = 2
elif 'S' in s:
  ans = 1
print(ans)

Submission status: Wrong Answer

Solution code:
str = input()

if str in 'RRR':
  print(3)
elif str in 'RR':
  print(2)
elif str in 'R':
  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=='RSS' or S == 'SRS' or S=='SSR':
    print(1)
else:
    print(2)

Submission status: Wrong Answer

Solution code:
print(1)

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
from sys import stdin

test = list(stdin.readline().lstrip().rstrip())

count = 0
before = 'R'

for str in test:
    if before == str and str == 'R':
        count = count + 1
    before = str

print(count)

Submission status: Wrong Answer

Solution code:
from sys import stdin

test = list(stdin.readline().lstrip().rstrip())

count = 0
before = 'R'

for str in test:
    if before == str and str == 'R':
        count = count + 1

print(count)

Submission status: Wrong Answer

Solution code:
s = input()
cnt = 0

for i in range(3):
    if s[i] == 'R':
        cnt += 1
        if i > 0:
            if s[i-1] == 'S':
             cnt -= 1

print(cnt)

Submission status: Wrong Answer

Solution code:
S = input()

tmp = 0
for i in range(len(S)):
    if S[i] == 'R':
        tmp += 1
    else:
        if i == 2:
            break
        else:
            tmp = 0
print(tmp)

Submission status: Wrong Answer

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

for i in range(1, 4):
  c = "R" * i
  if c in s:
    ans = c
    
print(ans)

Submission status: Wrong Answer

Solution code:
tenki = input()

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

Submission status: Wrong Answer

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

print(result)

Submission status: Wrong Answer

Solution code:
tenki = input()

if tenki == "RRR":
    print(3)
elif tenki == "RRS" or tenki[1:3] == "SRR":
    print(2)
elif tenki == "RSS" or tenki == "SRS" or tenki == "SSR":
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
from time import time
def timer(func):
    def f(*args, **kwargs):
        before = time()
        rv = func(*args, **kwargs)
        after = time()
        print('temps écoulé', after - before)
        return rv
    return f

@timer
def A(S): 
    nb = 0
    if S == 'RSR':
        print(1)
        exit
    else:
        for i in S:
            if i == 'R':
                nb = nb+1
        print(nb)


@timer
def B():
    ...

@timer
def C():
    ...


S = input()
A(S)

Submission status: Wrong Answer

Solution code:
from time import time
def timer(func):
    def f(*args, **kwargs):
        before = time()
        rv = func(*args, **kwargs)
        after = time()
        print('temps écoulé', after - before)
        return rv
    return f


def A(S): 
    nb = 0
    if S == 'RSR':
        print(2)
        exit
    else:
        for i in S:
            if i == 'R':
                nb = nb+1
        print(nb)


@timer
def B():
    ...

@timer
def C():
    ...


S = input()
A(S)

Submission status: Wrong Answer

Solution code:
from time import time
def timer(func):
    def f(*args, **kwargs):
        before = time()
        rv = func(*args, **kwargs)
        after = time()
        print('temps écoulé', after - before)
        return rv
    return f

@timer
def A(S): 
    nb = 0
    if S == 'RSR':
        print(2)
        exit
    else:
        for i in S:
            if i == 'R':
                nb = nb+1
        print(nb)


@timer
def B():
    ...

@timer
def C():
    ...


S = input()
A(S)

Submission status: Wrong Answer

Solution code:
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
import itertools
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

s = S()

cnt = 0
max = 0
for i in s:
    if i == "R":
        cnt += 1
    else:
        if max < cnt:
            max = cnt
        cnt = 0

print(max)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import re
N = input()
if N == "RRR":
  print(3)
elif N == "SSS":
  print(0)
elif re.match("RR",N):
  print(2)
else:
  print(1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
 
# 高々2^3=8通りなので、全て列挙すればよい
# RRR RRS SRR RSR RSS SRS SSR SSS
ans = 0
if S == 'RRR': ans = 3
elif S == 'SRR' and S == 'RRS': ans = 2
elif S == 'SSS': ans = 0
else: ans = 1
  
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()

# 高々2^3=8通りなので、全て考慮すればよい
ans = 0
if S == 'RRR': ans = 3
elif S == 'SRR' and S =='RSR' and S == 'RRS': ans = 2
elif S == 'SSS': ans = 0
else: ans = 1
  
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input() + '@'

lst = [1]*len(s)
for i in range(1,len(s)):
  if s[i] == s[i-1]:
    lst[i] = lst[i-1] + 1
print(max(lst))

Submission status: Wrong Answer

Solution code:
s = input() + '@'

lst = [0]*len(s)
for i in range(1,len(s)):
  if s[i] == s[i-1]:
    lst[i] = lst[i-1] + 1
print(max(lst))

Submission status: Wrong Answer

Solution code:
#!/Library/Frameworks/Python.framework/Versions/3.5/bin/python3
import re

s = input()

if re.match('RRR', s):
    print('3')
elif re.match('RR', s):
    print('2')
elif re.match('R', s):
    print('1')
else:
    print('0')

Submission status: Wrong Answer

Solution code:
s=input()
c=0
tmp=0
for i in range(3):
    if s[i]=='s':
        tmp+=1
        if c<tmp:
            c=tmp
    else:
        tmp=0
print(c)

Submission status: Wrong Answer

Solution code:
i = input()

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

Submission status: Wrong Answer

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

    else:
        print(0)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    S = list(input())

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

    else:
        print(0)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
S = list(input().rstrip())
num = 0
for c in S:
	if c == 'R':
		num += 1
	else:
		num = 0

print(num)

Submission status: Wrong Answer

Solution code:
x=list(input())
if x.count("R")==0:
  print(0)
elif x.count("R")==1:
  print(1)
elif x.count("R")==3:
  print(3)
else:
  if x.pop(2)=="S":
    print(1)
  else:
    print(2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A = input("")
if A == "sss":
	print(0)
elif A == "rrr":
  print(3)  
elif A ==  "srr" or A == "rrs":
  print(2)
elif A == "rss" or A == "srs" or A == "ssr" or A == "rsr":
  print(1)

Submission status: Wrong Answer

Solution code:
A = input()
if A == "sss":
	print(0)
elif A == "rrr":
  print(3)  
elif A ==  "srr" or A == "rrs":
  print(2)
else:
  print(1)

Submission status: Wrong Answer

Solution code:
A = input("")
if A == "sss":
	print(0)
elif A == "rrr":
  print(3)  
elif A ==  "srr" or A == "rrs":
  print(2)
else:
  print(1)

Submission status: Wrong Answer

Solution code:
A = input("晴れならs,雨ならrを入力してください")
if A == "sss":
	print(0)
elif A == "rrr":
  print(3)  
elif A ==  "srr" or A == "rrs":
  print(2)
else:
  print(1)

Submission status: Wrong Answer

Solution code:
A = input("")
if A =="S":
	print("天気が雨である日が連続していた最大の日数を出力せよ。")
elif A == "sss":
	print(0)
elif A == "rrr":
  print(3)  
elif A ==  "srr" or A == "rrs":
  print(2)
else:
  print(1)

Submission status: Wrong Answer

Solution code:
A = input("晴れならs,雨ならrを入力してください")
if A =="S":
	print("天気が雨である日が連続していた最大の日数を出力せよ。")
elif A == "sss":
	print(0)
elif A == "rrr":
  print(3)  
elif A ==  "srr" or A == "rrs":
  print(2)
else:
  print(1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def rainyseason(S):
    days = 0
    max_days = 0
    flag = 0
    for i in range(len(S)):
        if S[i] == 'R':
            days += 1
            flag = 1
        elif S[i] == 'S' and flag == 1:
            if days > max_days:
                max_days = days
                days = 0
                flag = 0
    return max_days

if __name__ == '__main__':
    S =str(input())
    print(rainyseason(S))

Submission status: Wrong Answer

Solution code:
def rainyseason(S):
    days = 0
    max_days = 0
    flag = 0
    for i in range(len(S)):
        if S[i] == 'R':
            days += 1
            flag = 1
        elif S[i] == 'S' and flag == 1:
            if days > max_days:
                max_days = days
                days = 0
    return max_days

if __name__ == '__main__':
    S =str(input())
    print(rainyseason(S))

Submission status: Wrong Answer

Solution code:
S = input()
rain_d = 0
for s in S:
    if s == 'R':
        rain_d += 1
    elif s == 'S':
        rain_d = 0
print(rain_d)

Submission status: Wrong Answer

Solution code:
l = list(input())
a = 0
b = False
for v in l:
    if v == 'R':
        b = True
    else:
        b = False
        a = 0
        
    if b:
        a += 1

print(a)

Submission status: Wrong Answer

Solution code:
l = list(input())
a = 0
for v in l:
    if v == 'R':
        a += 1
        
print(a)

Submission status: Wrong Answer

Solution code:
S = input()
count = 0
LIMIT = 3
i = 0
while i < LIMIT:
    if S[i] == "R":
        count += 1
    i += 1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

print(S.count("R"))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#a問題
s = input()
count=0
for i in range(len(s)):
    if s[i]=='R':
        count+=1

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
w = input()
a = w.find('RR')
if a > 0:
    print(2)
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
if S == "RSS":
        c = 1
if S == "RRS":
        c = 2
print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

else:
    print(1)

Submission status: Wrong Answer

Solution code:
s = input()
s.replace('R', '').replace('RR', '').replace('RRR', '')
print(3-len(s))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=0
S=input()
for i in range(2):
    if(S[i]==S[i+1]):
        a=a+1
print(a)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
count=0
flag=True
if s[0]=='R' and s[1]=='R' and s[2]=='R':
    print(3)
elif ((s[0]=='R' and s[1]=='R') or (s[0]=='R' and s[2]=='R') 
or(s[1]=='R' and s[2]=='R')):
    print(2)
elif s[0]=='R' or s[1]=='R' or s[2]=='R':
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
s=input()
count=0
flag=True
for char in s:
    if char=='R' and flag:
        count+=1
        flag=False
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
arr = list(input())
z = 1
result = 1
count = 0
for i in range(len(arr) - 1):
    if arr[i] == arr[i+1] == "R":
        z += 1
        result = max(result, z)
    else:
        z = 0
if set(arr) == {'S'}:
    print(0)
else:
    print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = input()

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

elif a =='RSS' or 'RSR' or 'SSR' or 'SRS':
  print(1)

Submission status: Wrong Answer

Solution code:
a = list(input())

A=0
for i in range(3):
  if a[i]=='R':
    A+=1
  else: A=0
  
print(A)

Submission status: Wrong Answer

Solution code:
cnt = 0
t = input()
for i in range(len(t)):
    if "R" * (i + 1) in t:
        print(cnt)
        cnt = i + 1
print(cnt)

Submission status: Wrong Answer

Solution code:
cnt = 0
t = list(input())
for i in range(len(t)):
    if "R" * (i + 1) in t:
        cnt = i + 1
print(cnt)

Submission status: Wrong Answer

Solution code:
cnt = 0
t = list(input())
for i in range(len(t)):
    if "R" * i in t:
        cnt = i + 1
print(cnt)

Submission status: Wrong Answer

Solution code:
cnt = 0
t = list(input())
for i in range(len(t)):
    if "R" * i in t:
        cnt = i
print(cnt)

Submission status: Wrong Answer

Solution code:
cnt = 0
t = list(input())
for i in range(len(t)):
    print(len(t))
    if i == 1:
        if t[i] == "R":
            cnt += 1
    if i != 1:
        if t[i] == "R" and t[i-1] == "R":
            cnt += 1
        if t[i] == "R" and t[i-1] == "S":
            cnt = 1
        else:
            cnt = 0
print(cnt)

Submission status: Wrong Answer

Solution code:
cnt = 0
t = input().split()
for i in range(len(t)):
    print(len(t))
    if i == 1:
        if t[i] == "R":
            cnt += 1
    if i != 1:
        if t[i] == "R" and t[i-1] == "R":
            cnt += 1
        if t[i] == "R" and t[i-1] == "S":
            cnt = 1
        else:
            cnt = 0
print(cnt)

Submission status: Wrong Answer

Solution code:
cnt = 0
t = input()
for i in range(len(t)):
    if i == 1:
        if t[i] == "R":
            cnt += 1
    if i != 1:
        if t[i] == "R" and t[i-1] == "R":
            cnt += 1
        if t[i] == "R" and t[i-1] == "S":
            cnt = 1
        else:
            cnt = 0
print(cnt)

Submission status: Wrong Answer

Solution code:
S = input()
li = list(S)
count = 0
re_num = 0
for num in range(3):
    if li[num] == "R" :
        count = count + 1

if count == 0 :
    re_num = 0
elif count == 1 :
    re_num = 1
elif count == 2 and li[2] == "S" :
    re_num = 1
elif count == 2 and li[2] == "R" :
    re_num = 2
else :
    re_num = 3

print(re_num)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
li = list(S)
count = 0
for num in range(1):
    if li[num] == "R" and li[num+1] == "R" :
        count = count + 1
print(count)

Submission status: Wrong Answer

Solution code:
s=input()
for i in range(1,4)[::-1]:
    if "R"*i in s:
        print(i)
        break

Submission status: Wrong Answer

Solution code:
s = input()

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

print(ans)

Submission status: Wrong Answer

Solution code:
s = input()

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

print(ans)

Submission status: Wrong Answer

Solution code:
s=input()
ans=0
if s[1]=="S":
    if s[0]=="R" or s[2]=="R":
        print(1)
    else:
        print(0)
else:
    if s[0]!="R" or s[2]!="R":
        print(2)
    else:
        print(3)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
ans=0
rain=[0]
for i in range(len(s)):
    if s[i]=="R":
        ans+=1
    else:
        rain.append(ans)
        ans=0
print(max(rain))

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
x = input()
ans = 0
mx = 0
for l in x:
  if l=='R':
    ans+=1
  elif ans>1:
    ans-=1
  if ans>mx:
    mx = ans
print(mx)

Submission status: Wrong Answer

Solution code:
S = input()

day = 0
counter = 0

for i in S:
    counter += 1
    if i == 'S':
        if counter == 2:
            day = 0
        pass
    elif i == 'R':
        day += 1

print(day)

Submission status: Wrong Answer

Solution code:
S = input()

day = 0

for i in S:
    if i == 'S':
        day = 0
        pass
    elif i == 'R':
        day += 1

print(day)

Submission status: Wrong Answer

Solution code:
S = input()

day = 0

for i in S:
    if i == 'S':
        pass
    elif i == 'R':
        day += 1

print(day)

Submission status: Wrong Answer

Solution code:
S = input()

day = 0

for i in S:
    if i == 'S':
        pass
    else:
        day += 1

print(day)

Submission status: Wrong Answer

Solution code:
S = input()

day = 0

for i in S:
    if i == S:
        pass
    else:
        day += 1

print(day)

Submission status: Wrong Answer

Solution code:
S = ("S","S","R")
li = list(S)
count = 0
for num in range(1):
    if li[num] == "R" and li[num+1] == "R" :
        count = count + 1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

ans = 0
if s.count("R") == 3:
    print(3)
elif s.count("R") == 2:
    if s[0] == s[1]:
        print(2)
    else:
        print(1)
elif s.count("R") == 1:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
input_line = input()
#print(input_line)
charlist = list(input_line)
index = 0
for i in range(3):
    if(charlist[i]=="R"):
        index += 1
    
if index==2:
    if charlist[1]=="S":
        print(1)
        
else:
    print(index)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
count, fin = 0, 0
for i in range(3):
    if i == 'R': count += 1
    else:
        if fin < count: fin = count
        count = 0
print(fin)

Submission status: Wrong Answer

Solution code:
s = input()
count, fin = 0, 0
for i in s:
    if i == 'R': count += 1
    else:
        if fin < count: fin = count
        count = 0
print(fin)

Submission status: Wrong Answer

Solution code:
s = input()
s
if s == 'RRR':
    print('3')
if s == 'RRS':
    print('2')
if s == 'SRR':
    print('2')
if s == 'RSR':
    print('1')
if s == 'SSR':
    print('1')
if s == 'RSS':
    print('1')
if s == 'SSS':
    print('0')

Submission status: Wrong Answer

Solution code:
weat= input()
seaS = 'S'
seaR = 'R'
a = 0
b = 0
c = 0
imput = 0
for alp in weat:
  if a == 0:
    if alp == seaS:
      a = 1
    if alp == seaR:
      a = 2
  if b == 0 and a != 0:
    if alp == seaS:
      b = 1
    if alp == seaR:
      b = 2
  if c == 0 and a != 0 and b != 0:
    if alp == seaS:
      c = 1
    if alp == seaR:
      c = 2
if a == 2 or b == 2 or c == 2:
  imput = 1
if a == 2 and b == 2 or b == 2 and c == 2:
  imput = 2
if a == 2 and b == 2 and c == 2:
  imput = 3

print(imput)

Submission status: Wrong Answer

Solution code:
weat= input()
seaS = 'S'
seaR = 'R'
a = 0
b = 0
c = 0
imput = 0
for alp in weat:
  if a == 0:
    if alp == seaS:
      a = 1
    if alp == seaR:
      a = 2
  if b == 0 and a != 0:
    if alp == seaS:
      b = 1
    if alp == seaR:
      b = 2
  if c == 0 and a != 0 and b != 0:
    if alp == seaS:
      c = 1
    if alp == seaR:
      c = 2
if a or b or c == 2:
  imput = 1
if a and b == 2 or b and c == 2:
  imput = 2
if a and b and c == 2:
  imput = 3

print(imput)

Submission status: Wrong Answer

Solution code:
weat= input()
seaS = 'S'
seaR = 'R'
a = 0
b = 0
c = 0
imput = 0
for alp in weat:
  if a == 0:
    if alp == seaS:
      a = 1
    if alp == seaR:
      a = 2
  if b == 0 and a != 0:
    if alp == seaS:
      b = 1
    if alp == seaR:
      b = 2
  if c == 0 and a != 0 and b != 0:
    if alp == seaS:
      c = 1
    if alp == seaR:
      c = 2
if a or b or c == 2:
  imput = 1
if a and b == 2 or b and c == 2:
  imput = 2
if a and b and c == 3:
  imput = 3

print(imput)

Submission status: Wrong Answer

Solution code:
S = list(input())
RD = S.count('R')
if RD != 2:
    print(RD)
else:
    if S[1] == 'R':
        print(RD and 'bbb')
    else:
        print(1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
count1=0
count2=0
for i in range(len(s)):
    if(s[i]=='R' and i!=len(s)-1):
        if(s[i]==s[i+1]):
            count1+=2
            i=i+2
        else:
            count2+=1
print(max(count1,count2))

Submission status: Wrong Answer

Solution code:
s=input()
count1=0
count2=0
for i in range(len(s)):
    if(s[i]=='R' and i!=len(s)-1):
        if(s[i]==s[i+1]):
            count1+=2
        else:
            count2+=1
print(max(count1,count2))

Submission status: Wrong Answer

Solution code:
str1 = input()
if str1 == 'RRR':
    print(3)
else:
    for i in range(len(str1) - 1):
        if str1[i] == str1[i+1] == 'R':
            flag = 0
            break
        else:
            flag = 1
    if flag == 0:
        print(2)
    else:
        print(1)

Submission status: Wrong Answer

Solution code:
s=input()
cnt=0
if s=='RRR':
  cnt = 3
elif s== 'RRS':
  cnt = 2
elif s== 'SRR':
  cnt = 2
elif s == 'RSS':
  cnt= 1
elif s == 'RSR':
  cnt=1
elif s=='SSR':
  cnt=1
print(cnt)

Submission status: Wrong Answer

Solution code:
s=input()
cnt=0
if s=='RRR':
  cnt = 3
elif s== 'RRS':
  cnt = 2
elif s == 'RSS':
  cnt= 1
elif s == 'RSR':
  cnt=1
elif s=='SSR':
  cnt=1
print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()

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

Submission status: Wrong Answer

Solution code:
print(sum([1 if x == 'R' else 0 for x in input()]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S=input()

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

print(ans)