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 = input().strip()

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

Submission status: Wrong Answer

Solution code:
s = list(input())
opt = 0
if (s[0] == 's'):
    if (s[1] == 'R'):
        opt += 1
    if (s[2] == 'R'):
        opt += 1
    print(opt)
    exit()
if (s[0] == 'R'):
    opt += 1
if (s[1] == 'R'):
    if (s[1] == 'R'):
        opt += 1
    if (s[2] == 'R'):
        opt += 1

print(opt)

Submission status: Wrong Answer

Solution code:
a,b,c = map(str,input().rstrip(""))


if(a=="R" and b == "R" and c == "R"):
  count = 3
  
elif(a=="R" and b == "R" and c == "S"):
  count = 2
elif(a=="R" and b == "S" and c == "S"):
  count = 1
elif(a=="S" and b == "R" and c == "R"):
  count = 2
elif(a=="S" and b == "R" and c == "S"):
  count = 1
elif(a=="S" and b == "S" and c == "R"):
  count = 1
else:
  count = 0

print(count)

Submission status: Wrong Answer

Solution code:
sr_list = list(input().split())
r_count = sr_list.count('R')
if r_count == 0:
  print('0')
elif r_count == 1:
  print('1')
elif r_count ==3:
  print('3')
else:
  if sr_list[1] == 'S':
    print('1')
  else:
    print('2')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
var = 'RRR'

def func(input):
  return input.count('R')

output = func(var)
print(output)

Submission status: Wrong Answer

Solution code:
S = input()
T = [S]
if "RR" in S:
  print("2")
elif "R" in S:
  print("1")
else:
  print("0")

Submission status: Wrong Answer

Solution code:
L = [s for s in input()]
if not 'R' in L:
  print(0)
elif not 'S' in L:
  print(3)
elif L[1] == 'S':
  if 'R' in L :
    print(1)
elif L[0] == 'S':
  print(1)
else:
  print(2)

Submission status: Wrong Answer

Solution code:
s=str(input())[:3]
c=0
for i in range(len(s)-1):
    if s[i]=="R" and s[i+1]=="R":
        c+=2
        break

    elif s[i]=="R":
        c+=1


print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def RainySeason():
    
    str1 = str(input())

    print(str1[:2], str1[1:])

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

if __name__ == '__main__':
    RainySeason()

Submission status: Wrong Answer

Solution code:
S = input()
s = list(S)

count = 0

for i in range(len(s)):
    if s[i] == 'R':
        count = 1
        try:
            if s[i+1] == 'R':
                count += 1
        
        except IndexError:
            break

print(count)

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()
result = 0
for i in range(3):
    if S[i] == 'R':
        result = result + 1
    else:
        result = 0

print(result)

Submission status: Wrong Answer

Solution code:

S = input()

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

Submission status: Wrong Answer

Solution code:
a=str(input())

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python

import sys
import argparse
import logging
#import math

logging.basicConfig(filename='logger.log', level=logging.DEBUG)
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)


def f(s: str) -> int:
    '''
    >>> f("SSS")
    0
    >>> f("RRS")
    2
    >>> f("RRR")
    3
    '''
    return len(list(filter(lambda x: x == 'R', list(s))))


if __name__ == '__main__':
    parser = argparse.ArgumentParser()
    parser.add_argument(
            '--doctest', action='store_true', default=False)
    args = parser.parse_args()
    if args.doctest:
        import doctest
        doctest.testmod(verbose=True)
        sys.exit()

    s = sys.stdin.readline().rstrip()
    print(f(s))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = str(input())


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


# 2darray [[0] * 4 for i in range(3)]
# import itertools

Submission status: Wrong Answer

Solution code:
S = list(input())

if "S" in S:
    if S[1] == "S" and (S[0] != "S" or S[2] != "S"):
        print(1)
    elif S[0] == "S" and S[1] == "S" and S[2] == "S":
        print(0)
    else:
        print(2)
else:
    print(3)

Submission status: Wrong Answer

Solution code:
x, y, z = input()
a = 0
if x == 'R':
  a += 1
  if y == 'R':
    a += 1
    if z == 'R':
      a += 1
elif y == 'R':
  a += 1
  if z == 'R':
    a += 1
print(a)

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
            exit(0)
elif S[1] == 'R':
    cnt += 1
    if S[2] == 'R':
        cnt += 1
        exit(0)
elif S[2] == 'R':
    cnt += 1
    exit(0)
print(cnt)

Submission status: Wrong Answer

Solution code:
s = input().strip()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys


stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
temp = input()

S = list(temp)

cnt=0
tmp_s = ""
for i,s in enumerate(S,start=1):
  if i == 1:
    cnt=cnt + 1
    tmp_s = s
    continue

  if tmp_s == s:
    cnt = cnt + 1
  else:
    tmp_s = s
    cnt=1
    
print(cnt)

Submission status: Wrong Answer

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

print(m)

Submission status: Wrong Answer

Solution code:
S = str(input())


if S=="SSS" or S=="RRR":
	print(3)
elif S=="SRS" or S=="RSR":
	print(1)
else:
	print(2)


# 2darray [[0] * 4 for i in range(3)]
# import itertools

Submission status: Wrong Answer

Solution code:
weather = input()
weather = list(weather)
r = 0

for i in range(len(weather)-1):
    if(weather[i] == "R"):
        r += 1
        if(weather[i] == weather[i+1]):
            r += 1
if(r != 1):
    r -= 1

print(r)

Submission status: Wrong Answer

Solution code:
s = 'S'
r = 'R'

x = input()
unko = list(x)
count = 0
for i in unko:
    if i == 'R':
        count = count + 1
print(count)

Submission status: Wrong Answer

Solution code:
S=str(input())

ans = 0
for i in S:
	if i == "R":
		ans += 1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = list(input())

#print(N)

def count(list_1):
    return list_1.count('R')

print(count(N))

Submission status: Wrong Answer

Solution code:
n = input()

num = n.count("R")

if num == 1 or num == 3:
  print(num)
elif num == 2 and n[0] != n[2]:
  print(num)
elif num == 2 and n[0] == n[2]:
  print(1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
wether = input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
count = 0
if 'RRR' in s:
  print(3)
elif 'RR' in s:
  print(2)
elif 'SRR' in s or 'RSR' in s or 'RRS' in s:
  print(1)
else:
  print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=list(input())
ans=0
rr=s.count("R")
for i in range(0,len(s)):
  if s[i]=="R":
    ans+=1
  else:
    ans=0
if ans==0 and rr>0:
  print(1)
else:
  print(ans)

Submission status: Wrong Answer

Solution code:
s=input()
count=0 
if(s[0]==s[1]==s[2]):
    print('0')
elif(s[0]!=s[1]!=s[2]):
    print('1')
elif(s[0]==s[1] and s[1]!=s[2]):
    print('2')
else:
    print('2')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
line = list(input())
ans = int(0)

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

print(ans)

Submission status: Wrong Answer

Solution code:
weather = input()
raincount=0
cont=0
for  i in range(3):
    if weather[i]=="R" and cont==0:
           raincount=raincount+1
    elif weather[i]=="R" and cont==1:
           raincount=1
    elif weather[i] == "S":
        cont=1

print(raincount)

Submission status: Wrong Answer

Solution code:
#A - Rainy Season
Si = []
Si = str(input())
i = 0
if Si[0] == 'R': 
    i = 1
if Si[1] == 'R': 
    i = 1
if Si[2] == 'R': 
    i = 1
if Si[0:1] == 'RR': 
    i = 2
if Si[1:2] == 'RR': 
    i = 2
if Si[0:2] == 'RRR': 
    i = 3

# 出力
print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s =list(input()) 
if s.count('R') == 0  :  
    print(0)  
    
elif s.count('R') == 1 or s == 'RSR':          
    print(1)
    
elif s.count('R') == 3 :          
    print(3)    
    
else  :
    print(2)

Submission status: Wrong Answer

Solution code:
k = input()

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

Submission status: Wrong Answer

Solution code:
s1=input()
s=list(s1)

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

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
            exit(0)
elif S[1] == 'R':
        cnt += 1
        if S[2] == 'R':
            cnt += 1
            exit(0)
elif S[2] == 'R':
    cnt += 1
    exit(0)
print(cnt)

Submission status: Wrong Answer

Solution code:
weather = input()
weather = list(weather)
r = 0

print(weather)
for i in range(len(weather)-1):
    if(weather[i] == "R"):
        r += 1
        if(weather[i] == weather[i+1]):
            r += 1
if(r != 1):
    r -= 1

print(r)

Submission status: Wrong Answer

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

cnt = 0

for i in range(3):
    if(s[i] == "S"):
        cnt += 1

if(s[0] == "S" and s[1] == "R" and s[2] == "S"):
    cnt = 1


print(cnt)

Submission status: Wrong Answer

Solution code:
string=input()

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

Submission status: Wrong Answer

Solution code:
S = list(input())

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

Submission status: Wrong Answer

Solution code:
S = str(input())
ans = 0
if S[1]=="R":
    ans+=1
    if S[0]=="R":
        ans+=1
        if S[2]=="R":
            ans+=1
elif S[0]=="R" or S[2]=="R":
    ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()

def result(s):
    count = 0
    max = 0
    if s == 'SSS':
        return 0
    for i in s:
        if i == 'R':
            count += 1
        else:
            if max < count:
                max = count
            count = 0
    return max

print(result(s))

Submission status: Wrong Answer

Solution code:
def main():
    S = input()
    answer = solve(S)
    print(answer)


def solve(S):
    chain = [0]
    count = 0
    for i in range(len(S)):
        if S[i] == 'R':
            count += 1
        else:
            chain.append(count)

    return max(chain)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
s = input()
def solve(s):
    
    if not s:
        return 0
    d = 0
    res = 0
    for i in s:
        if i == 'R':
            d += 1
        else:
            res = max(res, d)
            d = 0
    return res
print(solve(s))

Submission status: Wrong Answer

Solution code:
n = list(input())
p = 0
for i,j in enumerate(n[:-1]):
    if j == n[i+1]:
        p = 1
    else:
        p = 0
print(p)

Submission status: Wrong Answer

Solution code:
weather = input()

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

Submission status: Wrong Answer

Solution code:
N = list(input())

#print(N)

def count(list_1):
    return list_1.count('R')

#print(count(N))

Submission status: Wrong Answer

Solution code:
weathers = list(input())
rainy = 0
seq_rainy = 0

for i in range(len(weathers)):
      #print(weathers[i],rainy,seq_rainy)
      if weathers[i] == "R":
            rainy += 1
      else:
            if rainy >= seq_rainy:
                  seq_rainy = rainy
            rainy = 0

print(seq_rainy)

Submission status: Wrong Answer

Solution code:
S = list(input())


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

elif (S[1] == 'R') and (S[0] == S[1] or S[1] == S[2]):
    i = 2

elif (S[0] == S[1] and S[2] == 'S'):
    i = 0

else:
    i = 1

print(i)

Submission status: Wrong Answer

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))

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

Submission status: Wrong Answer

Solution code:
climate = list(input())

rainy = climate.count('R')
sunny = climate.count('S')

if rainy == 1:
    print(1)
elif rainy == 2:
    if (climate[0] == 'R' and climate[2] == 'R'):
        print(1)
    else:
        print(2)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
S = 'RRS'
p = 0
for i in range(len(S)):
    if S[i] != 'S':
        p =+ 1
    else:
      	p == 0
print(p)

Submission status: Wrong Answer

Solution code:
R = input()

rain_count = 0
reset = False
max_count = 0

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

print(max_count)

Submission status: Wrong Answer

Solution code:
w = input()
c = 1

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

Submission status: Wrong Answer

Solution code:
L = [s for s in input()]
if not 'R' in L:
  print(0)
elif not 'S' in L:
  print(3)
elif L[1] == 'S':
  if 'R' in L :
    print(1)
else:
  print(2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a= input()
def f(s):
    if s[1]=="S" or s.count("S")==2:
        return(1)
    if s.count("S")==3:
        return (0)
    else :
        return (2)
print(f(a))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
string=input()

r=0
if string=="RRR":
	r=3
elif string=="RRS" or "SRR":
	r=2
 
print(r)

Submission status: Wrong Answer

Solution code:
S = input().rstrip()
if S == "RRR":
    print(3)
elif S=="SRR" or "RRS":
    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":
    print(2)
elif S == "RSR":
    print(1)
elif S == "SRR":
    print(2)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
import sys
li  =   lambda : [int(x) for x in sys.stdin.readline().strip().split()]
rw  =   lambda : sys.stdin.readline().strip().split()
ni  =   lambda : int(sys.stdin.readline().strip())
nsi =   lambda : sys.stdin.readline().strip()

from collections import defaultdict as df
from math import *

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

for i in n:
    if(i=='R'):
        count+=1

if(count==0):
    print(0)
if(count==1):
    print(1)

Submission status: Wrong Answer

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))

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

Submission status: Wrong Answer

Solution code:
def maxRepeating(str): 
  
    l = len(str) 
    count = 0
    res = str[0] 
    for i in range(l): 
          
        cur_count = 1
        for j in range(i + 1, l): 
      
            if (str[i] != str[j]): 
                break
            cur_count += 1
        if cur_count > count : 
            count = cur_count 
            res = str[i] 
    return count 
if __name__ == "__main__": 
  
    str = input()
    print(maxRepeating(str))

Submission status: Wrong Answer

Solution code:
weather = input()
weather = list(weather)
r = 0

print(weather)
for i in range(len(weather)-1):
    if(weather[i] == "R"):
        r += 1
        if(weather[i] == weather[i+1]):
            r += 1
r -= 1

print(r)

Submission status: Wrong Answer

Solution code:
line = list(input())
ans = int(0)
for l in line:
	if l == 'S':
		break
	ans += 1

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


else:
    if s[1]=="R":
        cnt+=1
        if s[2]=="R":
            cnt+=1
 
print(cnt)

Submission status: Wrong Answer

Solution code:
import sys
import math
def get_array(): return list(map(int, sys.stdin.readline().strip().split()))
def get_ints(): return map(int, sys.stdin.readline().strip().split())
def input(): return sys.stdin.readline().strip()
s=input()
ans=0
if s[0]=="R" and s[1]=="R" and s[2]=="R":
    print(3)
elif s[0]=="R" and s[1]=="R" and s[2]!="R" or s[1]=="R" and s[2]=="R" and s[0]!="R":
    print(2)
elif s[0]=="R" or s[1]=="R" or s[1]=="R":
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
main=input().rstrip()
count=0
flag=0
for i in range(3):
    if main[i]=='R' and flag==0:
        count+=1
    elif main[i]=='R' and flag==1:
        count=0
        count+=1
    else:
        flag=1
print(count)

Submission status: Wrong Answer

Solution code:
S = input()


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

Submission status: Wrong Answer

Solution code:
s = list(input())
opt = 0
if (s[0] == 'R'):
    opt += 1
if (s[1] == 'R'):
    if (s[1] == 'R'):
        opt += 1
    if (s[2] == 'R'):
        opt += 1

print(opt)

Submission status: Wrong Answer

Solution code:
S = input()

if S.count("RRR") == 1 :
    print("3")
elif S.count("RRR") == 1 :
    print("2")
else :
    if S.count("R") >= 1 :
        print("1")
    else :
        print("0")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import re

X = input()

if re.match("RRR", X) != None:
  print("3")
elif re.match("RR", X) != None:
  print("2")
elif re.match("R", X) != None:
  print("1")
else:
  print("0")

Submission status: Wrong Answer

Solution code:
L = [s for s in input()]
if not 'R' in L:
  print(0)
elif not 'S' in L:
  print(3)
elif L[2] == 'S':
  if 'R' in L :
    print(1)
else:
  print(2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
z=[]
a=input()
for i in a:
    z.append(i)

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

Submission status: Wrong Answer

Solution code:
s = input()
count = 0
for _ in s:
  if _ == 'R':
    count += 1
  elif count == 1 and _ == 'R':
    count += 1
  elif count == 2 and _ == 'R':
    count += 1
  else:
    break
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = input()
b = 0
c = 'R'
for i in a:
  if i == 'R' and c == 'R':
    b = b + 1
    c = 'R'
  elif i == 'R':
    c = 'R'
  else:
    c = 'S'
print(b)

Submission status: Wrong Answer

Solution code:
s = input()
def solve(s):
  if not s:
    return 0
  d = 0
  res = 0
  for i in s:
    if i == 'R':
      d += 1
    else:
      res = max(res, d)
      d = 0
  return res
solve(s)

Submission status: Wrong Answer

Solution code:
a = input()

if a.count("SSS") == 1:
    print (3)
elif a.count("SS") == 1:
    print (2)
elif a.count("S") == 1:
    print (1)
elif a.count("S") == 2:
    print (1)
else:
    print (0)

Submission status: Wrong Answer

Solution code:
S = list(input())

if "S" in S:
    if S[1] == "S":
        print(1)
    else:
        print(2)
else:
    print(3)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#A - Rainy Season
Si = []
Si = str(input())
i = 0
if Si[0] == 'R': 
    i == 1
if Si[1] == 'R': 
    i == 1
if Si[2] == 'R': 
    i == 1
if Si[0:1] == 'RR': 
    i == 2
if Si[0:1] == 'RR': 
    i == 2
if Si[1:2] == 'RR': 
    i == 2
if Si[0:2] == 'RRR': 
    i == 3

# 出力
print(i)

Submission status: Wrong Answer

Solution code:
s = input().upper()
if s.count('RRR') == 1:
  print(3)
elif s.count('RR') == 1:
  print(2)
else:
  print(1)

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
S = input()
numR = 0
sunny = False
for i in range(len(S)):
    if S[i] == 'R' and not sunny:
        numR += 1
    else:
        sunny = True
        continue


print(numR)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
ans=0
if s=="RRR":
  ans=3
if s=="RRS" or s=="SRR":
  ans=2
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
ans = 0
flg = True
if s[0] == 'R':
    ans += 1
for i in range(1,3):
    if s[i] == 'R' and s[i-1] == 'R':
        ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
def main():
    S = input().rstrip()
    CNT = 0
    ans = 0
    for c in S:
        if c == 'R':
            CNT += 1
        else:
            ans = max(ans,CNT)
            CNT = 0
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

cnt = 1

if S[0]=='R' and S[1]=='R':
    cnt =2

if S[1]=='R' and S[2]=='R':
    cnt = 2

if S.count('R') == 0:
    cnt = 0

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(len(s)):
  if s[i]=='R':
    c += 1
  else:
    if c>mx:
      mx = c
    c = 0
print(mx)

Submission status: Wrong Answer

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

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