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:
s = str(input())

ans = 0

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

print(ans)

Submission status: Wrong Answer

Solution code:
##175
##A - Rainy Season
S = str(input())
if "R" in S:
    if S[1] == "S":
        print(1)
    else:
        if S[0] == "R" and S[2] == "R":
            print(3)
        else:
            print(2)
    
else:
    print(0)

Submission status: Wrong Answer

Solution code:
s = str(input())

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

Submission status: Wrong Answer

Solution code:
x=list(input())
cons=0
consecs=[]
b="R"
for a in x:
    if(a=='R' and b==a):
        cons+=1
    else:
        consecs.append(cons)
        cons=0
    b=a
if(consecs==[]):
    consecs.append(cons)
if(max(consecs)!=0):
    print(max(consecs))
else:
    print(0)

Submission status: Wrong Answer

Solution code:
x=list(input())
cons=0
consecs=[]
b="R"
for a in x:
    if(a=='R' and b==a):
        cons+=1
    else:
        consecs.append(cons)
        cons=0
    b=a
if(consecs==[]):
    consecs.append(cons)
if(max(consecs)!=0):
    print(max(consecs))
else:
    print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(count)

Submission status: Wrong Answer

Solution code:
def resolve():
    s = input()
    ans = s.count("R")
    if s[1] != "R" and ans > 0:
        ans -= 1
    print(ans)

resolve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
cnt = 0
if S[0] == 'R':
    cnt += 1
    if S[1] == 'R':
        cnt += 1
        if S[2] == 'R':
            cnt += 1
    if S[1] == 'S':
        cnt = 0
        if S[2] == 'R':
            cnt += 1
if S[0] == 'S':
    if S[1] == 'R':
        cnt += 1
        if S[2] == 'R':
            cnt += 1
    if S[1] == 'S':
        if S[2] == 'R':
            cnt += 1
print(cnt)

Submission status: Wrong Answer

Solution code:
S = input()
cnt = 0
if S[0] == 'R':
    cnt += 1
    if S[1] == 'R':
        cnt += 1
        if S[2] == 'R':
            cnt += 1
if S[0] == 'S':
    if S[1] == 'R':
        cnt += 1
        if S[2] == 'R':
            cnt += 1
print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

m = 0
cnt = 0
for i in range(3):
    if s[i] == 'r':
        cnt += 1
    else:
        m = max(m, cnt)
        cnt = 0

print(max(m, cnt))

Submission status: Wrong Answer

Solution code:
import re
s=input()

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

Submission status: Wrong Answer

Solution code:
S = input()
lst = list(S)
r_count = lst.count("R")

if r_count == 1 or r_count == 3:
  print(r_count)
else:
  if lst[1] != "S":
    print(2)
  else:
    print(1)

Submission status: Wrong Answer

Solution code:
s = input()
l = 0
h = 0
for i in range(0, 3):
  if s[i] == "S":
    h = l
    l = 0
  else:
    l += 1
    h = l

print(h)

Submission status: Wrong Answer

Solution code:
s = input()
l = 0
h = 0
for i in range(0, 3):
  if s[i] == "S":
    h = l
    l = 0
  else:
    l += 1
print(h)

Submission status: Wrong Answer

Solution code:
def clean(max_r, count):
  if max_r < count:
      max_r = count
  return max_r

mojiretsu = input()
count = 0
max_r = 0
for moji in mojiretsu:
  if moji == 'R':
    count += 1
  else:
    max_r = clean(max_r, count)
    
if count != 0:
  max_r = clean(max_r, count)
  
print(max_r)

Submission status: Wrong Answer

Solution code:
s = input()
cnt = 0

for i in s:
  if i == "R":
    cnt += 1
    
print(cnt)

Submission status: Wrong Answer

Solution code:
s=input();s.count('R')-(s=="RSR")

Submission status: Wrong Answer

Solution code:
S = input()

cnt = 0
max_cnt=0

if S[0] == 'R':
    cnt += 1

for i in range(1,3):
    if S[i] == 'R':
        cnt+=1
        print('i')
    else:
        if cnt > max_cnt:
            max_cnt = cnt
        cnt = 0
        
if S[len(S)-1] == 'R' and max_cnt == 0:
    max_cnt = 1
if cnt > max_cnt:
    max_cnt = cnt
print(max_cnt)

Submission status: Wrong Answer

Solution code:
S = input()

cnt = 0
max_cnt=0

if S[0] == 'R':
    cnt += 1

for i in range(1,3):
    if S[i] == 'R':
        cnt+=1
    else:
        if cnt > max_cnt:
            max_cnt = cnt
        cnt = 0
        
if S[len(S)-1] == 'R' and max_cnt == 0:
    max_cnt = 1
print(max_cnt)

Submission status: Wrong Answer

Solution code:
s=input().upper()
c=0
largest=0


for i in range(len(s)-1):
    if s[i] == "R":
        if c == 0:
            c+=1
        if s[i] == s[i+1]:
            c+=1
        #print("dasd",c,i,len(s))
    else:
        #print("asd", c)
        if c > largest:
            largest=c
        c=0
    if i + 2 == len(s):
        if s[i] == "R" and c == 0:
            c+=1
        #print("asdfasd")
        if c > largest:
            largest=c

print(largest)

Submission status: Wrong Answer

Solution code:
s=input().upper()
c=0
largest=0


for i in range(len(s)-1):
    if s[i] == "R":
        if c == 0:
            c+=1
        if s[i] == s[i+1]:
            c+=1
        #print("dasd",c,i,len(s))
    else:
        #print("asd", c)
        if c > largest:
            largest=c
        c=0
    if i + 2 == len(s):
        if c == 0:
            c+=1
        #print("asdfasd")
        if c > largest:
            largest=c

print(largest)

Submission status: Wrong Answer

Solution code:
print(max(input().split('S')))

Submission status: Wrong Answer

Solution code:
s=input().upper()
c=0
largest=0


for i in range(len(s)-1):
    if s[i] == "R" and s[i] == s[i+1]:
        if c==0:
            c+=1
        c+=1
        #print("dasd",c,i,len(s))
    else:
        #print("asd", c)
        if c > largest:
            largest=c
        c=0
    if i + 2 == len(s):
        #print("asdfasd")
        if c > largest:
            largest=c

print(largest)

Submission status: Wrong Answer

Solution code:
s=input()
c=0
largest=0


for i in range(len(s)-1):
    if s[i] == s[i+1]:
        if c==0:
            c+=1
        c+=1
        #print("dasd",c,i,len(s))
    else:
        #print("asd", c)
        if c > largest:
            largest=c
        c=0
    if i + 2 == len(s):
        #print("asdfasd")
        if c > largest:
            largest=c

print(largest)

Submission status: Wrong Answer

Solution code:
import re
r = 0
s = input()
if 'r' not in s:
  print(0)
else:
  x = re.findall('r+',s)
  if len(x) == 2:
      print(1)
  else:
      print(len(x[0]))

Submission status: Wrong Answer

Solution code:
S = input()

if S[:] in ('RRR', 'SSS'):
  print(3)
elif S[:] in ('RRS', 'RSS', 'SSR', 'SRR'):
  print(2)
elif S[:] in ('RSR', 'SRS'):
  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:
# # Make IO faster
# import sys
# input = sys.stdin.readline

# # get single (or) multiple str
# X = input()

# # get single int
# N = int(input())
# # get multiple int (e.g., 2)
# X, Y = map(int, input().split())
# # get multiple int (e.g., 2) for N lines
# XY = [list(map(int, input().split())) for _ in range(N)]

# from IPython import embed; embed(); exit();

# 全部入り
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import numpy as np
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

S = input()
cnt = 0
max_cnt = -1
for s in S:
    if s == 'R':
        cnt += 1
    else:
        if max_cnt < cnt:
            max_cnt = cnt
        cnt = 0
print(max_cnt)

Submission status: Wrong Answer

Solution code:
s=input()
if s=='RRR':
    print(0)
elif s=='SSS':
    print(3)
elif s in ['RRS','SRR']:
    print(2)
else:
    print(1)

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

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


main()

Submission status: Wrong Answer

Solution code:
s = input()
c = 0
m = 0
l = [0]
for i in range(len(s)):
    if s[i] == 'R':
        c += 1
    else:
        l.append(c)
        c = 0
print(max(l))

Submission status: Wrong Answer

Solution code:
n = input()
count = 1
s = []
for i in range(len(n)-1):
    if n[i]=='R' and n[i+1]=='R':
        count+=1
    elif n[i]=='S' and n[i+1]=='S':
        count = 1
    elif n[i]=='R' and n[i+1]=='S':
        s.append(count)
        count = 1
    else:
        count = 1
s.append(count)

print(max(s))

Submission status: Wrong Answer

Solution code:
S= input()
a = tuple(S)
#print(a)
#print(a[0])

cou = 1
if a[0] == "S" and a[0]!="R":
    cou=0
for i in range (0,len(S)-1):
    
    if a[i] == "R":
      if a[i+1] != "S":
          cou+=1
      else:
        break;
          
    
if a[0] == "S" or a[0]!="R":
    cou=0

    #elif a[i]=="S":
     #   cou=0
print(cou)

Submission status: Wrong Answer

Solution code:
S= input()
a = tuple(S)
#print(a)
#print(a[0])

cou = 1
if a[0] == "S" or a[0]!="R":
    cou=0
for i in range (0,len(S)-1):
    
    if a[i] == "R":
      if a[i+1] != "S":
          cou+=1
      else:
        break;
          
    
if a[0] == "S" or a[0]!="R":
    cou=0

    #elif a[i]=="S":
     #   cou=0
print(cou)

Submission status: Wrong Answer

Solution code:
s = str(input())
s=s.lower()

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

Submission status: Wrong Answer

Solution code:
s = str(input())

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

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
      else:
        break;
          
    
if a[0] == "S":
    cou=0
    #elif a[i]=="S":
     #   cou=0
print(cou)

Submission status: Wrong Answer

Solution code:
s = input()
res = 0

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

print(res)

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
      else:
        break;
          
    
if a[0] == "S":
    cou=0
    #elif a[i]=="S":
     #   cou=0
print(cou)
a

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)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

S=input()

ans=0

for i in range (len(S)-1):
    if S[i]=="R":
        tempans=1
        for j in range (i+1,len(S)):
            if S[i]==S[j]:
                tempans+=1
            else:
                if tempans>ans:
                    ans=tempans
                break
        else:
            if tempans>ans:
                ans=tempans
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

#sys.setrecursionlimit(10**9)
#from functools import lru_cache

def RD(): return input().rstrip().decode()
def II(): return int(input())
def FI(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))
# rstrip().decode()


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




if __name__ == "__main__":
	main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S=input()
if S=="RSR":
  print(2)
else:
  print(S.count("R"))

Submission status: Wrong Answer

Solution code:
a=input()
max=[0]*4
for i in range(3):
  if a[i]== 'R':
    if i ==0:
      max[0]=1
    else:
      max[i]=max[i-1]+1
  else:
    max[i]=0
print(max)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import *
import sys,bisect,copyreg,copy,statistics,os
def inp(): return sys.stdin.readline().strip()
def IIX(): return (int(x) for x in sys.stdin.readline().split())
def II(): return (int(inp()))
def LI(): return list(map(int, inp().split()))
def LS(): return list(map(str, inp().split()))
def L(x):return list(x)
def out(var): return sys.stdout.write(str(var))
def binary_search(arr, x): 
    left = 0
    right = len(arr) - 1
    mid = 0
    while left <= right:   
        mid = (left + left) // 2
        if arr[mid] < x: 
            left = mid + 1
        elif arr[mid] > x: 
            right = mid - 1
        else: 
            return mid
    return -1

Submission status: Wrong Answer

Solution code:
from math import *
import sys,bisect,copyreg,copy,statistics,os
def inp(): return sys.stdin.readline().strip()
def IIX(): return (int(x) for x in sys.stdin.readline().split())
def II(): return (int(inp()))
def LI(): return list(map(int, inp().split()))
def LS(): return list(map(str, inp().split()))
def L(x):return list(x)
def out(var): return sys.stdout.write(str(var))


s=inp()
con=0
m=0

for i in range(3):
    if s[i]=='R':
        con+=1
    else:
        m=max(m, con)
        con=0

out(m)

Submission status: Wrong Answer

Solution code:
s = input()

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

# if s.count("R") == 0:
#     print(0)
# elif s.count("R") == 1 or s == "RSR":
#     print(1)
# elif s.count("R") == 2:
#     print(2)
# elif s.count("R") == 3:
#     print(3)

Submission status: Wrong Answer

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

S = input()
z = S.count('R')

if S == 'RRR':
    print(3)
elif  S == 'RRS' and S == 'SRR':
    print(2)
elif z == 1 or S == 'RSR':
    print(1)
else:
    print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import exit, stdin

# import copy
# from collections import deque,Counter
# import numpy as np
# input = stdin.readline

S = input()

cnt = 0
for s in S:
    if s == "R":
        cnt += 1

print(cnt)

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:
# -*- coding: utf-8 -*-

S = input()
z = S.count('R')

if S == 'RRR':
    print(3)
elif  z == 2 and S != 'RSR':
    print(2)
elif z == 1:
    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=="SSR"or"SRS"or"RSS":
	print(1)
else:
	print(0)

Submission status: Wrong Answer

Solution code:
S = input()
ma = 0
i = 0
m = 0
while(i != len(S)):
  print(i)
  if S[i] == "R":
    m += 1
  else:
    ma = max(ma,m)
    m = 0
  i += 1

print(ma)

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
if a[0] == "S":
    cou=0
    #elif a[i]=="S":
     #   cou=0
print(cou)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
ans = 0

for i in range(3):
    if i == 1 and s[i] != "R":
        ans = 0
    elif s[i] == "R":
        ans += 1

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
ma = 0
i = 0
m = 0
while(i != len(S)):
  if S[i] == "R":
    m += 1
  
  else:
    ma = max(ma,m)
    m = 0
    break
  i += 1

print(ma)

Submission status: Wrong Answer

Solution code:
S = input()

count = 0
for i in range(3):
  if S[i] == 'R':
    count += 1
  elif i == 1:
    break
  elif i == 2:
    break
    
print(count)

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
wt = str(input())
if wt == 'SSS':
    print(0)
else:
    id = wt.index('R')
    if wt.count('R') == 2 and wt[id] == wt[id+1] == 'R':
        print(2)
    else:
        print(1)

Submission status: Wrong Answer

Solution code:
S = input()
max = 0
i = 0
m = 0
while(i != len(S)):
  if S[i] == "R":
    m += 1
  
  else:
    max = m
    m = 0
    break
  i += 1

print(max)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
max = 0
i = 0
m = 0
while(i != len(S)):
  if S[i] == "R":
    m += 1
  
  else:
    max = m
    m = 0
    break
  i += 1

print(max)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input('天気が雨である日が連続していた最大の日数を出力せよ。')
 
if s == "SSS":
    print(0)
elif s == "RRR":
    print(3)
elif s == "RRS":
    print(2)
elif s == "SRR":
    print(2)
else:
    print(1)

Submission status: Wrong Answer

Solution code:
s = input()
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:
S = input()
print(S.count("R"))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
if "SSS" in S or "RRR" in S:
    print(3)
elif "SS" in S or "RR" in S:
    print(2)
else:
    print(1)

Submission status: Wrong Answer

Solution code:
S = input()

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

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

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
S = input()
if "SSS" in S or "RRR" in S:
    print(3)
elif "SS" in S or "RR" in S:
    print(2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
print(max(S.count("R"), S.count("S")))

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
S = input()

if S == 'SSS':
    ans = 0
elif S == 'SSR':
    ans = 1
elif S == 'SRS':
    ans = 1
elif S == 'SRR':
    ans = 2
elif S == 'RSS':
    ans = 1
elif S == 'RSR':
    ans = 2
elif S == 'RRS':
    ans = 2
elif S == 'RRR':
    ans = 3

print(ans)

Submission status: Wrong Answer

Solution code:
a = list(str(input()))
cnt=0

if a[0]=="R":
    cnt+=1
    if a[1]=="R":
        cnt+=1
elif a[1]=="R":
    cnt+=1
    if a[2]=="R":
        cnt+=1
elif a[2]=="R":
    cnt+=1


print(cnt)

Submission status: Wrong Answer

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

for i in range(0, 3):
    if a[i] == 'RSS' or 'RSR' or 'SSR' or 'SRS':
        anw = 1
    elif a[i] == 'SRR' or 'RRS':
        anw = 2
    elif a[i] == 'RRR':
        anw = 3
    else:
        anw = 0

print(anw)

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]) or i == 0:
        count += 1
        array[i] += count
      else:
        count = 0
  return max(array)
print(s_count(s))

Submission status: Wrong Answer

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

for i in range(0, 3):
    if a[i] == 'R':
        anw += 1
    elif i == 2:
        if a[i] == 'S':
            anw = anw
        elif a[i] == 'R':
            anw += 1
    else:
        anw = 0

print(anw)

Submission status: Wrong Answer

Solution code:
a = list(str(input()))
cnt=0

if a[0]=="R":
    cnt+=1
if a[1]=="R":
    cnt+=1
if a[2]=="R":
    cnt+=1


print(cnt)

Submission status: Wrong Answer

Solution code:
import re
s = input()

print(max(len(re.match(r"R*", s).group()), len(re.match(r"S*", s).group())))

Submission status: Wrong Answer

Solution code:
S = input()
r = 0
for i in range(3):
  if i == 0 and S[0] == 'S':
    r += 1
  elif i < 1:
    if S[i] == S[i+1]:
      r += 1

print(r)

Submission status: Wrong Answer

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

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]) or i == 0:
        count += 1
        array[i] += count
      else:
        count = 0
  return max(array)
s_count(s)

Submission status: Wrong Answer

Solution code:
S = input('天気が雨である日が連続していた最大の日数を出力せよ。')
if S == 'SSS':
	print(0)
elif S == 'SSR':
	print(1)
elif S == 'SRR':
	print(2)
elif S == 'SRS':
	print(1)
elif S == 'RSS':
	print(1)
elif S == 'RRS':
	print(2)
elif S == 'RRR':
	print(3)
elif S == 'RRS':
	print(2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
ans = 0

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(0, 3):
    if a[i] == 'R':
        anw += 1
    elif i == 2:
        if a[i] == 'S':
            anw = anw
        elif a[i] == 'R':
            anw += 1

print(anw)

Submission status: Wrong Answer

Solution code:
n=input()
if(n.count('R')==0):
    print('0')
if(n.count('R')==1):
    print('1')
if(n.count('R')==2):
    if(n[0]=='R' and n[1]=='R'):
        print('2')
    if(n[1]=='R' and n[2]=='R'):
        print('2')
    if(n[0]=='R' and n[2]=='R'):
        print('1')

Submission status: Wrong Answer

Solution code:
x = input()

if x == "RRS" or x == "SRR":
    print(2)

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

elif x == "RSS" or x == "SRS" or x == "SSR":
    print(1)

else:
    print(0)

Submission status: Wrong Answer

Solution code:
S=str(input(""))
sum=0
if 'RR' in S:
    print("2")
elif 'R' in S:
    print("1")
else:
    print("0")

Submission status: Wrong Answer

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

for i in range(0, 2):
    if a[i] == 'R':
        anw += 1
    elif i == 2:
        if a[i] == 'S':
            anw = anw
        elif a[i] == 'R':
            anw += 1

print(anw)

Submission status: Wrong Answer

Solution code:
S = input()

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

print(ans)

Submission status: Wrong Answer

Solution code:
S = list(input())

#check

#真ん中がR
if S[1] == 'R':
    if S[0] == S[2]:
        if S[0] == 'R':
            print(3)
        else:
            print(1)
    else:
        print(2)

#真ん中がS
if S[1] == 'S':
    if S[0] == S[2]:
        if S[0] == 'R':
            print(2)
        else:
            print(0)
    else:
        print(1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=str(input(""))
sum=0
if 'RR' in s:
    print("2")
elif 'R' in s:
    print("1")
else:
    print("0")

Submission status: Wrong Answer

Solution code:
day = input()
count = day.count("R")
count1 = day.count("RR")
if count == 2:
    if count1 == 1:
	    print(2)
    else:
    	print(1)
if count == 1:
    print(1)
if count == 0:
    print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = input()
list1 = a.split("S")
print(list)
if len(list1) == 1:
  print(3)
elif len(list1) == 2:
  if a == "RSR":
    print(1)
  else:
    print(2)
elif len(list1) == 3:
  print(1)
else:
  print(0)

Submission status: Wrong Answer

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