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("")
Ccnt = 0
Rcnt = 0

for i in range(len(s)-1):
    if s[i] == s[i+1] == "R":
        Ccnt += 1
for i in range(len(s)):
    if s[i] == "R":
        Rcnt += 1

if Ccnt > 0:
    print(Ccnt + 1)
elif Ccnt == 0 and Rcnt > 0:
    print(1)

Submission status: Wrong Answer

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

def B():
    n = int(input())
    a = list(map(int, input().split()))
    cnt = 0
    for i in range(n):
        for j in range(i+1, n):
            for k in range(j+1, n):
                s = a[i] + a[j] + a[k]
                if s > 2 * max(a[i], a[j], a[k]): cnt += 1
    print(cnt)

def C():
    x, k, d = map(int, input().split())
    if abs(x) > k * d:
        print(abs(x) - k*d)
    else:
        tm = abs(x) // d
        x = abs(x) % d
        k -= tm
        if k % 2 == 0:
            print(x)
        else:
            print(d-x)
A()

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
a = str(input())

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

Submission status: Wrong Answer

Solution code:
a = str(input())

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

Submission status: Wrong Answer

Solution code:
a = str(input())
count = 0
answer = []

for i in a:
  if i == 'R':
    count += 1
  else:
    count = 0
  answer.append(count)

max_ans = max(answer)
answer = max_ans*answer.count(max_ans)
print(answer)

Submission status: Wrong Answer

Solution code:
a = str(input())
count = 0
 
for i in a:
  if i == 'R':
    count += 1
  else:
    count = 0
  answer = count
 
print(answer)

Submission status: Wrong Answer

Solution code:
a = input()
 
count1 = a.count('RR')
count2 = a.count('R')

if count1 == 0:
  print(1)
else:  
  print(count2 - count1 * 2 + count1 * 2)

Submission status: Wrong Answer

Solution code:
a = input()

count = a.count('R')

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
answer=0

for i in range(len(s)):
  if s[i]=="R":
    answer+=1
print(answer)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

result = 0
if "RR" in S:
  result = S.count("R")

print(result)

Submission status: Wrong Answer

Solution code:
s = input()
if s in ["RRR"]:
        print(3)
if s in ["RRS", "RSR", "SRR"]:
        print(2)
if s in ["RSS", "SRS", "SSR"]:
        print(1)
if s == "SSS":
        print(0)

Submission status: Wrong Answer

Solution code:
D = input()
ans = 0
ans_list = []
if D.count("R") >= 1:
  for i in range(3):
    if D[i] == 'R':
      ans += 1
      ans_list.append(ans)
    elif D[i] == 'S':
      ss = 0
      ans_list.append(ss)
  print(max(ans_list))
elif D.count("R") < 1:
  print(0)

Submission status: Wrong Answer

Solution code:
D = input()
ans = 0
ans_list = []
if D.count("R") >= 1:
  for i in range(3):
    if D[i] == 'R':
      ans += 1
      ans_list.append(ans)
      if i <= 1:
        if D[i + 1] == 'S':
          print(max(ans_list))
          break
        elif D[i] == 'R':
          ans += 1
          ans_list.append(ans)
    elif D[i] == 'S':
      ss = 0
      ans_list.append(ss)
  print(max(ans_list))
elif D.count("R") < 1:
  print(0)

Submission status: Wrong Answer

Solution code:
D = input()
ans = 0
ans_list = []
if D.count("R") >= 1:
  for i in range(3):
    if D[i] == 'R':
      ans += 1
      ans_list.append(ans)
      if i <= 1:
        if D[i + 1] == 'S':
          print(max(ans_list))
          break
    elif D[i] == 'S':
      ss = 0
      ans_list.append(ss)
  print(max(ans_list))
elif D.count("R") < 1:
  print(0)

Submission status: Wrong Answer

Solution code:
D = list(input().strip().split())
ans = 0
ans_list = []
if D.count("R") >= 1:
  for i in range(3):
    if D[i] == 'R':
      ans += 1
      ans_list.append(ans)
      if i <= 1:
        if D[i + 1] == 'S':
          print(max(ans_list))
          break
    elif D[i] == 'S':
      ss = 0
      ans_list.append(ss)
  print(max(ans_list))
elif D.count("R") < 1:
  print(0)

Submission status: Wrong Answer

Solution code:
D = list(input().strip().split())
ans = 0
ans_list = []
if D.count("R") >= 1:
  for i in range(3):
    if D[i] == 'R':
      ans += 1
      ans_list.append(ans)
      if D[i + 1] == 'S':
        print(max(ans_list))
        break
    elif D[i] == 'S':
      ss = 0
      ans_list.append(ss)
  print(max(ans_list))
elif D.count("R") < 1:
  print(0)

Submission status: Wrong Answer

Solution code:
D = list(input().strip().split())
ans = 0
ans_list = []
if D.count("R") >= 1:
  for i in range(3):
    if D[i] == 'R':
      ans += 1
      ans_list.append(ans)
    elif D[i] == 'S':
      ss = 0
      ans_list.append(ss)
  print(max(ans_list))
elif D.count("R") < 1:
  print(0)

Submission status: Wrong Answer

Solution code:
D = list(input().strip().split())
ans = 0
ans_list = []
if D.count("R") >= 1:
  for i in range(3):
    if D[i] == 'R':
      ans += 1
      ans_list.append(ans)
    elif D[i] == 'S':
      ans_list.append(ans)
  print(max(ans_list))
elif D.count("R") < 1:
  print(0)

Submission status: Wrong Answer

Solution code:
D = list(input().strip().split())
ans = 0
ans_list = []
if D.count("R") >= 1:
  for i in range(3):
    if D[i] == 'R':
      ans += 1
      ans_list.append(ans)
    elif D[i] == 'S':
      ans_list.append(ans)
      continue
  print(max(ans_list))
elif D.count("R") < 1:
  print(0)

Submission status: Wrong Answer

Solution code:
D = list(input().strip().split())

ans_list = []
if D.count("R") >= 1:
  for i in range(3):
    ans = 0
    if D[i] == 'R':
      ans += 1
      ans_list.append(ans)
    elif D[i] == 'S':
      ans_list.append(ans)
      continue
elif D.count("R") < 1:
  print(0)

Submission status: Wrong Answer

Solution code:
from sys import stdin

input = stdin.readline


def solve():
    S = input()
    if S == 'RRR':
        print(3)
        return 
    elif S == 'RRS' or S == 'SRR':
        print(2)
        return
    elif S == 'SSS':
        print(0)
        return
    else:
        print(1)
        return
if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

Solution code:

l = []

count = 0

for s in input():
    if s == "R":
        count += 1
    else:
        l.append(count)
        count += 1

if l:
    print(max(l))
else:
    print(3)

Submission status: Wrong Answer

Solution code:
l = []

count = 0
flag = True

for s in input():
    if s == "R":
        count += 1
    else:
        l.append(count)
        count = 0
        flag = False
if flag:
    l.append(count)


print(max(l))

Submission status: Wrong Answer

Solution code:
s = input()
ans = 0
if s[0]=='R' and s[1]=='R' and s[2]=='R':
    ans = 3
if (s[0]=='R' and s[1]=='R')or(s[1]=='R' and s[2]=='R'):
    ans = 2
if ans == 0:
    for i in range(3):
        if s[i]=='R':
            ans = 1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def check_weather(weathers: str) -> int:
    # count = weathers.count('R')
    # return 1 if weathers[1] == 'S' and count == 2 else count
    count = 0
    l_n = [0]
    for i in weathers:
        if weathers[-1] == 'R':
            count += 1
            l_n.append(count)
            break
            
        if i == 'R':
            count += 1
        else:
            if max(l_n) <= count:
                l_n.append(count)
            count = 0
    return max(l_n)


if __name__ == '__main__':
    print(check_weather(input()))

Submission status: Wrong Answer

Solution code:
def check_weather(weathers: str) -> int:
    count = 0
    l_n = [0]
    for i in weathers:
        if weathers[-1] == 'R':
            count += 1
            l_n.append(count)
            
        if i == 'R':
            count += 1
        else:
            if max(l_n) <= count:
                l_n.append(count)
            count = 0
    return max(l_n)

if __name__ == '__main__':
    print(check_weather(input()))

Submission status: Wrong Answer

Solution code:
def check_weather(weathers: str) -> int:
    count = 0
    l_n = [0]
    for i in weathers:
        if i == 'R':
            count += 1
        else:
            if max(l_n) <= count:
                l_n.append(count)
            count = 0
    return max(l_n)

if __name__=='__main__':
    print(check_weather(input()))

Submission status: Wrong Answer

Solution code:
S = list(input())

count = 0
buffer = 'R'
for s in S:
    if s == 'R' and buffer == 'R':
        count += 1
    elif s == 's':
        buffer = 's'
print(count)

Submission status: Wrong Answer

Solution code:
S = list(input())

count = 0
buffer = 'R'
for s in S:
    if s == 'R' and buffer == 'R':
        count += 1
    elif s == 'S':
        buffer = 'S'
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

if s == "S" :
    print('天気が雨である日が連続していた最大の日数を入力せよ')
elif s == "RRR" :
    print(3)
elif s == "RR" :
    print(2)
elif s == "R" :
    print(1)
else :
    print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
line = input()
rain_day = 0
k = 0
for wether in line:
  if wether == "R":
    rain_day += 1
  else:
    k = rain_day
    rain_day = 0
if k > rain_day:
  print(k)
else:
  print(rain_day)

Submission status: Wrong Answer

Solution code:
S=str(input())

if S.count('R')==0:
  print(0)
if S.count('R')==1 and not S.count('R') >1:
  print(1)
if S.count('R')==2 and not S.count('RR') ==1:
  print(1)
if S.count('RR')==1:
  print(2)
if S.count('RRR')==1:
  print(3)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
l=[['SSS'],['RSS','SRS','SSR','RSR'],['RRS','SRR'],['RRR']]
for i in range(3):
  if s in l[i]:
    print(i)
    exit()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import re

x = input()
pattern = "R+"
pat = re.match(pattern, x)
if pat:
  print(len(pat.group()))
else:
  print(0)

Submission status: Wrong Answer

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
def main():
    S = input()
    mx = 0
    cnt = 0
    pre = 'R'
    for i in range(len(S)): 
        if (S[i] == 'R') and (pre == 'R'):
            cnt += 1
        else:
            cnt = 0
            pre = 'S'
        mx = max(cnt, mx)
    print(mx)
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
print(len(max(open(0).read().split('S'))))

Submission status: Wrong Answer

Solution code:
x, y, z = input()

if x==y==z=='R':
  print(3)
elif x==y=='R' or y==z=='R' or z==x=='R':
  print(2)
elif x=='R' or y=='R' or z=='R':
  print(1)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
x, y, z = input()

if x==y==z=='R':
  print(3)
elif x==y=='R':
  print(2)
elif y==z=='R':
  print(2)
elif z==x=='R':
  print(2)
elif x==y==z=='S':
  print(0)
else:
  print(1)

Submission status: Wrong Answer

Solution code:
#A問題

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

Submission status: Wrong Answer

Solution code:
#A問題

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

a = (S[0] == 'S')
b = (S[1] == 'S')
c = (S[2] == 'S')

if a and b and c:
  print(3)
elif (a and b and (c == False)) or ((a == False) and b and c):
  print(2)
elif (a == False) and (b == False) and (c == False):
  print(0)
else:
  print(1)

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
ans = 1

if s[0] == s[1]:
	ans += 1

if s[1] == s[2]:
	ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
s = input()

if 'R' not in s:
  print(0)
  exit()
  
result = 0
t = 0

for c in s:
  if c == 'R':
    t += 1
  else:
    result = max(result, t)
    t = 0

print(result)

Submission status: Wrong Answer

Solution code:
S = input()
count = 0

for i in S:
    if i != 'R':
        continue
    else:
        count = count + 1
print(count)

Submission status: Wrong Answer

Solution code:
S = input()
count = 0

for i in S:
    if i != 'R':
        break
    else:
        count = count + 1
print(count)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
S = input()

a="RR"
b="RRR"
c="SSS"

if a in S:
    print(2)

elif b == S:
    print(3)
    
elif c == S:
    print(0)

else:
    print(1)

Submission status: Wrong Answer

Solution code:
S = input()

a="RR"
b="RRR"
c="SSS"

if a in S:
    print(2)

elif b == S:
    print(3)
    
elif c == S:
    print(0)

else:
    print(1)

Submission status: Wrong Answer

Solution code:
s = input()

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

elif s == "SSR" "SRS" "RSS":
    print("1")

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

else:
    print("2")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
s = list(input().split())

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

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
data=input()
count=0
a=[]
for i in data:
    a.append(i)
for j in range(len(a)):
    if a[j]=="R":
        if j==0:
            count+=1
        elif a[j-1]=="R":
            count+=1
print(count)

Submission status: Wrong Answer

Solution code:
data=input()
long=0
a=[]
for i in data:
    a.append(i)
for j in range(len(a)):
    if a[j]=="R":
        if j==0:
            long+=1
        elif a[j-1]!="S":
            long+=1
print(long)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
str = input()

print(str.count('R'))

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(31)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
s = input()
ans = 0

if 'RRR' in s:
  ans == 3
elif 'RR' in s:
  ans = 2
elif 'R' in s:
  ans = 1
else:
  ans = 0

print(str(ans))

Submission status: Wrong Answer

Solution code:
s = input()
ans = 0

if 'RRR' in s:
  ans == 3
elif 'RR' in s:
  ans = 2
elif 'R' in s:
  ans = 1
else:
  ans = 0

print(ans)

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
ans = 0

for i in s:
  if i == 'R':
    ans +=1

print(ans)

Submission status: Wrong Answer

Solution code:
s = input()

r = ["RRS","RRR","RSR","SRR","SSR","RSS","SSS"]
ra = [2,3,1,2,1,1,0]
for i in range(7):
    if r[i] == s:
        print(ra[i])

Submission status: Wrong Answer

Solution code:
s = input()

before = ""
count = 0
for i in range(len(s)):
    if s[i] == "R":
        count += 1
        #print(before)
        if before == "n":
            count -= 1
        before = "R"
    else:
        before = "n"
        count += 0
print(count)

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
def count_rainy(weather): 
    return len([r for r in weather if r == 'R'])

weather = input()
if len(weather) == 3:
    for w in weather:
        if w == 'S' or w == 'R':
            print(count_rainy(weather))

Submission status: Wrong Answer

Solution code:
def count_rainy(weather): 
    return len([r for r in weather if r == 'R'])

weather = input()
if len(weather) == 3:
    print(count_rainy(weather))

Submission status: Wrong Answer

Solution code:
def count_rainy(weather): 
    return len([r for r in weather if r == 'R'])

weather = input()
print(count_rainy(weather))

Submission status: Wrong Answer

Solution code:
def count_rainy(weather): 
    return len([r for r in weather if r == 'R'])

weather = 'SSR'
print(count_rainy(weather))

Submission status: Wrong Answer

Solution code:
def count_rainy(weather):
    return len([r for r in weather if r == 'R'])

weather = 'SSR'
count_rainy(weather)

Submission status: Wrong Answer

Solution code:
def count_rainy(weather):
    return len([r for r in weather if r == 'R'])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

ans = 0
if S == "RSS" or S == "RSR" or S == "SRS":
  ans = 1
if S == "RRS" or S == "SRR":
  ans = 2
if S == "RRR":
  ans = 3

print(ans)

Submission status: Wrong Answer

Solution code:
a=input()
b=0

for i in a:
  if i=='R':
    b+=1
    
  elif i=='S' and  b!=2:
    b-=1
    
  elif  i=='S' and  b==2:
    b+=0
    
  else:
    b+=1
    
print(b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X = input()
x = 1

for i in range (len(X)):
    if i+1 >= len(X) : break
    if X[i] == X[i+1]:
        x += 1
print(x)

Submission status: Wrong Answer

Solution code:
s=input()
print(max(s.count('R')-(s[1]=='S'),0))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
S = input()
ans = 0
for i in range(len(S)):
  if i > 0:
    if S[i-1] == S[i] == "R":
      ans += 1
    
  elif S[i] == "R":
    ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
S = input()
ans = 0
for i in range(len(S)):
  if S[i] == "R":
    ans += 1
  else:
    if i == 1:
      ans = 0
print(ans)

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:
# -*- coding: utf-8 -*-
S = input()
ans = 0
for s in S:
  if s == "R":
    ans += 1
  else:
    ans = 0
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
S = input()
ans = 0
for s in S:
  if s == "R":
    ans += 1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
cnt = sum([1 for ch in S if ch == "R"])
print(cnt)

Submission status: Wrong Answer

Solution code:
S = input()

if S.count('R') == 3:
    print(3)
elif S.count('R') == 2:
    if S[1] == 'S':
        print(1)
    else:
        print(2)
elif S.count('R') == 1:
    print(1)

Submission status: Wrong Answer

Solution code:
S = input()
a = 0
for i in range(3):
  if S[i]=="R":
    a+=1
    if S[i]=="S" and a>0:
      break
      print(a)

Submission status: Wrong Answer

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

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:
# print(max([len(v) for v in input().split('S')]))

d = {
    'RRR': 5,
    'RRS': 2,
    'RSR': 1,
    'RSS': 1,
    'SRR': 2,
    'SRS': 1,
    'SSR': 1,
    'SSS': 0,
}
print(d[input()])

Submission status: Wrong Answer

Solution code:
S = input()

ans = 0
num = 0
for i in range(len(S)):

    if S[i] == 'R':
        num += 1
    else:
        ans = max(ans, num)
        num = 0

print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
ans = 0

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

Submission status: Wrong Answer

Solution code:
s = str(input())

cnt = s.count("R")

if cnt == 0:
  print(0)
elif cnt == 1:
  print(1)
elif cnt == 2:
  if s[1] == "S":
    print(1)
  else:
    print(2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def resolve():
    data = list(input())
    max_length = 0
    combo = 0
    for d in data:
        if d == "R":
            combo += 1
            max_length = max(combo, max_length)
        else:
            combo = 0
    print(max_length)

Submission status: Wrong Answer

Solution code:
def resolve():
    data = list(input())
    max_length = 0
    combo = 0
    for d in data:
        if d == "R":
            combo += 1
        else:
            max_length = max(combo, max_length)
            combo = 0
    print(max_length)
resolve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s =input()
ans = 0

for i in range(3):
  p = "R"*i
  if p in s:
    ans = i
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def resolve():
    s = str(input())
    ans = 0

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

resolve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
sum_ = 0
if s[0] == 'R':
  sum_ += 1
  if s[1] == 'R':
    sum_ += 1
    if s[2] == 'R':
      sum_ += 1
  else:
    sum_ = 1
else:
  if s[1] == 'R':
    sum_ += 1
    if s[2] == 'R':
      sum_ += 1
print(sum_)

Submission status: Wrong Answer

Solution code:
s = input()
total = 0

if s == 'RRR':
    total = 3
elif  s == 'RRS' or 'SRR':
    total = 2
elif s == 'RSR' or 'SRS' or 'RSS' or 'SSR':
    total = 1
else:
    total = 0

print(total)

Submission status: Wrong Answer

Solution code:
days = input()

day1 = days[0]
day2 = days[1]
day3 = days[2]


ans = 0

if day1 == "R":
    ans += 1
    if day2 == "R":
        ans += 1
        if day3 == "R":
            ans +=1
 
if day2 == "R":
    ans += 1
    if day3 == "R":
         ans +=1

if day3 == "R":
    ans +=1

print(ans)

Submission status: Wrong Answer

Solution code:
s=str(input())
if s.count("rrr")==1:
  print(3)
elif s.count("rr")==1:
  print(2)
elif s.count("r")>=1:
  print(1)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
s=str(input())
if s.count("rrr")==1:
  print("3")
elif s.count("rr")==1:
  print("2")
elif s.count("r")>=1:
  print("1")
else:
  print("0")

Submission status: Wrong Answer

Solution code:
s=str(input())
if s.count("sss")==1:
  print("3")
elif s.count("ss")==1:
  print("2")
elif s.count("s")>=1:
  print("1")
else:
  print("0")

Submission status: Wrong Answer

Solution code:
str = input()
cnt = 0

for i in range(3):
  if str[i] == 'R':
    flag = True
    if flag == True:
      cnt += 1
  else:
    flag = False
print(cnt)

Submission status: Wrong Answer

Solution code:
str = input()
cnt = 0

for i in range(3):
  if str[i] == 'R':
    cnt += 1
print(cnt)

Submission status: Wrong Answer

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