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

Solution code:
s = input()
ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
s = input()
rd = 0
max_rd = 0
for i in range(len(s)):
    if s[i] == 'R':
        rd += 1
        if max_rd < rd:
            max_rd = rd
    else:
        rd = 0
print(max_rd)

Submission status: Accepted

Solution code:
S = input()

ans = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input('')
S = []
num = 0
for i in a:
    S.append(i)
for j in range(3):
    if S[j] == 'R':
        num += 1
if num == 2 and S[1] == 'S':
    print(1)
else:
    print(num)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    s = input()
    counts = [0]

    for c in s:
        if c == 'S':
            counts.append(0)
        if c == 'R':
            counts[-1] += 1

    print(max(counts))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

x = read().rstrip().decode()

def solve(x):
    if x.count('RRR'):
        return 3
    elif x.count('RR'):
        return 2
    elif x.count('R'):
        return 1
    else:
      return 0

print(solve(x))

Submission status: Accepted

Solution code:
a = input()

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

Submission status: Accepted

Solution code:
S = input()
length = len(S)
while True:
    R_l = "R" * length
    if R_l in S:
        print(length)
        break
    else:
        length -=1

Submission status: Accepted

Solution code:
s=input()

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

Submission status: Accepted

Solution code:
# A - Rainy Season

s = input()
for p in ('RRR', 'RR', 'R', ''):
    if p in s:
        print(len(p))
        exit()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())
ans = S.count("R")
if S[1] != "R" and ans == 2:
    ans -= 1
print(ans)

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
w=list(input())
n=len(w)
S=0
S_max=S
for i in range(n):
  if w[i]=='R':
    S+=1
    j=0
    while True:
      if i+j+1<=n-1:
        j+=1
        if w[i+j]=='R':
          S+=1
        else:
          i+=j
          break
      else:
        i=n-1
        break
  S_max=max([S_max,S])
  S=0
print(S_max)

Submission status: Accepted

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(max(cnt, cnt2))


main()

Submission status: Accepted

Solution code:
S=input()
if S=='RSR':print(1)
else:print(S.count('R'))

Submission status: Accepted

Solution code:
s = input()

if s.find('RRR') != -1:
  print(3)
elif s.find('RR') != -1:
  print(2)
elif s.find('R') != -1:
  print(1)
else:
  print(0)

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
S = input()

if "RRR" in S :
    print("3")
    
elif "RR" in S :
    print("2")
        
elif "R" in S :
    print("1")

else:
    print("0")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

if 'RRR' in S: ANS = 3
elif 'RR' in S: ANS = 2
elif 'RS' in S: ANS = 1
elif 'SR' in S: ANS = 1
elif 'SSS' in S: ANS = 0

print(ANS)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
W = list(input())

ans = []
a = 0
for i in W:
  if i == 'R':
    a += 1
  else:
    ans.append(a)
    a = 0

ans.append(a)
print(max(ans))

Submission status: Accepted

Solution code:
s=input()
print(('RRR'in s)+('RR'in s)+('R'in s))

Submission status: Accepted

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

Submission status: Accepted

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

Solution code:
s=input()
flag=False
ans=0
for i in range(3):
    if s[i]=="R":
        ans+=1
        if not flag:
            flag=True
    if s[i]=="S" and flag:
        break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
days = input()
consecutive_days = 0
max_days = 0

if 'R' in days:
    max_days = 1
    consecutive_days = 1

for weather in range(len(days) - 1):
    if days[weather] == days[weather + 1] and days[weather] == 'R':
        consecutive_days += 1
        if consecutive_days > max_days:
            max_days = consecutive_days

print(max_days)

Submission status: Accepted

Solution code:
S = list(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: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
cnt = 0
for i,ch in enumerate(S):
  if cnt == 0:
    if ch == "R":
      cnt = 1
  elif ch == "R" and S[i-1] == "R":
    cnt += 1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
s = input()

if s.count("R")==2 and s[1]=="S":
    print(s.count("R")-1)
else:
    print(s.count("R"))

Submission status: Accepted

Solution code:
s = input()

if "RRR" in s:
    print(3)
    exit()
if "RR" in s:
    print(2)
    exit()
if "R" in s:
    print(1)
    exit()
if "R" not in s:
    print(0)
    exit()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()

def solution(s):
  if 'RRR' in s:
    return 3
  elif 'RR' in s:
    return 2
  elif 'R' in s:
    return 1
  else:
    return 0
print(solution(s))

Submission status: Accepted

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

if 'R' in s:
  count+=1
for i in range(len(s)-1):
  if s[i]==s[i+1] and s[i]=='R':
    count+=1
print(count)

Submission status: Accepted

Solution code:
s=input()

def ans(s):
  if "RRR" in  s:
    return 3
  elif "RR" in s:
    return 2
  elif "R" in s:
    return 1
  else:
    return 0
print(ans(s))

Submission status: Accepted

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

Submission status: Accepted

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

    if "RRR" in S:
        print(3)

    elif "RR" in S:
        print(2)

    elif "R" in S:
        print(1)

    else:
        print(0)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    S = input()
    if S == "RRR":
        print(3)
    elif ((S[0] != 'R') ^ (S[2] != 'R')) and S[1]=='R':
        print(2)
    elif S == "SSS":
        print(0)
    else:
        print(1)

if __name__=='__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# print(max([len(v) for v in input().split('S')]))

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

Submission status: Accepted

Solution code:
print(max([len(v) for v in input().split('S')]))

Submission status: Accepted

Solution code:
S = input()

flag = 0
ans = 0
cnt = 0
for i in range(len(S)):
    if S[i] == "R":
        cnt += 1
        if ans < cnt:
            ans = cnt
    else:
        cnt = 0
print(ans)

Submission status: Accepted

Solution code:
S = input()

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[2] == "R":
  print(1)
  
else:
  print(0)

Submission status: Accepted

Solution code:
S = input().split("S")
S_len = [len(S_each) for S_each in S]
print(max(S_len))

Submission status: Accepted

Solution code:
S = input()

count = S.count("R")
if count == 2 and S[0] == "R" and S[2] == "R":
    count = 1
print(count)

Submission status: Accepted

Solution code:
lst = list(input())

tmp = 0
ans = 0

for i in lst:
    if i == "R":
        tmp = tmp + 1
        ans = max(ans, tmp)
    else:
        tmp = 0

print(ans)

Submission status: Accepted

Solution code:
s = input().split('S')
m = 0
for i in s:
  if len(i) > m:
    m = len(i)
print(m)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()
count = 0

if S[0] == 'R' or S[1] == 'R' or S[2] == 'R':
    count = 1

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

print(count)

Submission status: Accepted

Solution code:
s = input()
ans = 0

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

Submission status: Accepted

Solution code:
# coding: utf-8
s = input()
ans = s.count("R")
if s=="RSR":
    ans=1
print(ans)

Submission status: Accepted

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)
elif cnt == 3:
  print(3)

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(len(S)):
    if S[i] == 'R':
        count += 1
        if ans < count:
            ans = count
    else:
        count = 0

    
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
weatherS = input()
p = weatherS[0] == 'R'
q = weatherS[1] == 'R'
r = weatherS[2] == 'R'

if p and q and r:
    serial = 3
elif (p and q) or (q and r):
    serial = 2
elif p or q or r:
    serial = 1
else:
    serial = 0

print(serial)

Submission status: Accepted

Solution code:
weatherS = input()
serial = 0
dayBefore = ''
for x in weatherS:
    if dayBefore != 'R':
        if x == 'R':
            serial = 1
    else:
        if x == 'R':
            serial += 1
    dayBefore = x
print(serial)

Submission status: Accepted

Solution code:
def resolve():
    data = [len(x) for x in input().split("S") if x]
    print(max(data) if data else 0)
resolve()

Submission status: Accepted

Solution code:
S = input()

A = S.count("R")
B = S.count("RR")

if A==2:
    if B==1:
        print(2)
    if B==0:
        print(1)

elif  A==1:
    print(1)

elif A==3:
    print(3)
else :
    print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
w = list(input())
out = 0
cnt = 0
for i in range(len(w)):
    if w[i] == "S":
        cnt = 0
    elif w[i] == "R":
        cnt += 1
        out = max(out, cnt)
print(out)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
d = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
'''
def main():
    S = input()
    cnt = 0
    ans = 0
    f = 1
    for i in range(3):
        if S[i] == 'R':
            cnt += 1
        else:
            cnt = 0
        ans = max(ans, cnt)
    print(ans)
'''
def main():
    S = input()
    p = S[0] == 'R'
    q = S[1] == 'R'
    r = S[2] == 'R'

    if p and q and r :
        print(3)
    elif (p and q) or (q and r):
        print(2)
    elif p or q or r:
        print(1)
    else:
        print(0)
    


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:

def main():
    S = input()
    cnt = 0
    ans = 0
    f = 1
    for i in range(3):
        if S[i] == 'R':
            cnt += 1
        else:
            cnt = 0
        ans = max(ans, cnt)
    print(ans)
    


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

print(maxcount)

Submission status: Accepted

Solution code:
s = input()
w = ["R","RR","RRR"]
ans = 0

for i in range(3):
    if w[i] in s:
        ans = i + 1
        
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
    s = str(input())
    ans = 0
    if 'R' in s:
        ans = 1

    if 'RR' in s:
        ans = 2

    if 'RRR' in s:
        ans = 3

    print(ans)

resolve()

Submission status: Accepted

Solution code:
S=input()

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

Submission status: Accepted

Solution code:
S = input()

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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
  else:
    if s[2] == 'R':
      sum_ = 1
print(sum_)

Submission status: Accepted

Solution code:
s = input().rstrip()
best = 0
c = 0

for char in s:
  if char=='R':
    c+=1
  else:
    c=0
    
  best = max(best,c)
  
print(best)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
s = input()
ans = 0

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

Submission status: Accepted

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
elif day2 == "R":
    ans += 1
    if day3 == "R":
         ans +=1

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Solution code:
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
W = input()

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
s = input()

three ='RRR'
two ='RR'
one ='R'

if  three in s:
    print('3')
elif two in s:
    print('2')
elif one in s:
    print('1')
    
else :
    print('0')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
str = input()
cnt = 0
 
for i in range(3):
  if str == 'RRR':
    cnt = 3
  elif str == 'RRS':
    cnt = 2
  elif str == 'SRR':
    cnt = 2
  elif str == 'SSS':
    cnt = 0
  else:
    cnt = 1
    
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)

def input(): return sys.stdin.readline()[:-1]
mod = 10**9 + 7
def readInt():return int(input())
def readIntList():return list(map(int,input().split()))
def readStringList():return list(input())
def readStringListWithSpace():return list(input().split())
def readString():return input()

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

# readStringList()
# count = 0
# res = 0
# for c in days:
#     count += 0 if c == 'S' else 1
#     res = max(res,count)
# print(res)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
S = input()
zenzitsu = False

ans = 0
for i in range(len(S)):
    if S[i] == "R":
        if zenzitsu:
            ans += 1
            zenzitsu = True
        else:
            ans = 1
            zenzitsu = True
    else:
        zenzitsu = False
print(ans)

Submission status: Accepted

Solution code:
S = input()

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

ans = max(tmp,ans)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    S = input()
    list_s = [s for s in S]
    ans = 0
    if list_s[0] == 'S' and list_s[1] == 'S' and list_s[2] == 'S':
        ans = 0
    elif list_s[0] == 'S' and list_s[1] == 'S' and list_s[2] == 'R':
        ans = 1
    elif list_s[0] == 'S' and list_s[1] == 'R' and list_s[2] == 'R':
        ans = 2
    elif list_s[0] == 'R' and list_s[1] == 'R' and list_s[2] == 'R':
        ans = 3
    elif list_s[0] == 'R' and list_s[1] == 'S' and list_s[2] == 'R':
        ans = 1
    elif list_s[0] == 'R' and list_s[1] == 'R' and list_s[2] == 'S':
        ans = 2
    elif list_s[0] == 'R' and list_s[1] == 'S' and list_s[2] == 'S':
        ans = 1
    elif list_s[0] == 'S' and list_s[1] == 'R' and list_s[2] == 'S':
        ans = 1

    print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
S = input()

max_raindays_in_row = 0
raindays_in_row = 0

for s in S:
    if s == 'R':
        raindays_in_row += 1
    else:
        if max_raindays_in_row < raindays_in_row:
            max_raindays_in_row = raindays_in_row
        raindays_in_row = 0
else:
    if max_raindays_in_row < raindays_in_row:
        max_raindays_in_row = raindays_in_row

print(max_raindays_in_row)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
S = input()

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

Submission status: Accepted

Solution code:
S = input()

ans = 0
tmp = 0
for ch in S:
    if ch == 'R':
        tmp += 1
        ans = max(ans, tmp)
    else:
        ans = max(ans, tmp)
        tmp = 0    
print(ans)

Submission status: Accepted

Solution code:
S = input()

mx = 0
c = 0
for si in S:
    if si == 'R':
        c += 1
        mx = max(mx, c)
    else:
        c = 0

print(mx)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
str = input()
s = str.count('R')

if s==0:
  print(0)
elif s == 1:
  print(1)
elif s == 2:
  if str == 'RRS' or str == 'SRR':
    print(2)
  else:
    print(1)
else:
  print(3)

Submission status: Accepted

Solution code:
# rainy season

def rainy(S):
  if 'RRR' in S:
    return 3
  if 'RR' in S:
    return 2
  if 'R' in S:
    return 1
  return 0

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

Submission status: Accepted

Solution code:
S=input()

days=[]
day=0
for i in range(3):
  if S[i]=='R':
    day+=1
  else:
    day=0
  days.append(day)

print(max(days))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
S=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: Accepted

Solution code:
w = input()

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