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:
A = input()
b = A.count("SSS")
C = A.count("SS")
D = A.count("S")
if b == 1: 
   print(3)
elif C ==1:
   print(2)
else:
   if D ==1:
      print(1)
   else:
      print(0)

Submission status: Wrong Answer

Solution code:
S=input()
set_S=set(S)
if len(set_S)==1:
    if set(S)=={'R'}:
        ret=3
    else:
        ret=0
elif len(set_S)==2:
    if S[0]==S[1]=='R' or S[1]==S[2]=='R':
        ret=2
    else:
        ret=S.count('R')-1
print(ret)

Submission status: Wrong Answer

Solution code:
d = input()
c = 0

for i in range(3):
  if d[i] == 'R':
    c += 1
    
if c == 2 and d[2] == 'R':
  print(0)
else:
  print(c)

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
user_input = input().upper()
store = []
for i in user_input:
    store.append(i)
st_nd = store[0:2]
# print(st_nd)
nd_rd = store[1:3]
# print(nd_rd)
if len(set(store)) == 1:
    for i in set(store):
        if i == "S":
            print(0)
        else:
            print(3)
elif len(set(st_nd)) == 1:
    print(2)
elif len(set(nd_rd)) == 1:
    print(2)
else:
    print(1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = str(input().split())

a = S.count('R')

print(a)

Submission status: Wrong Answer

Solution code:
def func():
  value = input()
  count = 0
  
  for tmp in value:
    if tmp == 'R':
      count += 1
    
  print(count)
 
if __name__ == '__main__':
  func()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
cnt = 0
new_cnt = 0
for wheather in s:
    if wheather == 'R':
        cnt = cnt + 1
        new_cnt = cnt
    else:
        new_cnt = cnt
        cnt = 0

print(new_cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = [i for i in input()]
print(S.count('R'))

Submission status: Wrong Answer

Solution code:
import sys

x = input()

if len(x) != 3 :
    sys.exit()

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

Submission status: Wrong Answer

Solution code:
s = input()
tab = []
for i in range(3):
  if s[i] == 'R':
    tab.append(i)
    
print(len(tab))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = str(input())

cnt = 0

for i in range(len(S)):
    if S[i] == 'R':
        cnt += 1
    elif S[1] == 'S':
        cnt = 0

print(cnt)

Submission status: Wrong Answer

Solution code:
li = list(map(str, input()))
if len(li)!=3:
  exit()
c=0
for i in range(3):
  if li[i]=='R':
    c=c+1
print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = list(input())
l = len(s)
rain =int()
for x in range(l):
  if s[x]=="R":
    rain=rain+1
print(rain)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
k=input()
a=0
if k[0]=='R':
    if k[1]=='R':
        if k[2]=='R':
            a=3
        else:
            a=2
    else:
        a=1
elif k[1]=='R':
    if k[2]=='R':
        a=2
    else:
        a=1
elif k[2]=='r':
    a=1
print(a)

Submission status: Wrong Answer

Solution code:
d = input()
c = 0

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

Submission status: Wrong Answer

Solution code:
user_input = input().upper()
store = []
for i in user_input:
    store.append(i)
st_nd = store[0:2]
# print(st_nd)
nd_rd = store[1:3]
# print(nd_rd)
for i in set(store):
    if i == "S":
        rain = 0
if len(set(store)) == 1:
    for i in set(store):
        if i == "S":
            print(0)
        else:
            print(3)
elif len(set(st_nd)) == 1:
    print(2)
elif len(set(nd_rd)) == 1:
    print(2)
else:
    print(1)

Submission status: Wrong Answer

Solution code:
s = input()

if "SSS" in s:
    print(0)
elif "RRR" in s:
    print(0)
elif "SSR" in s:
    print(2)
elif "SRR" in s:
    print(2)
elif "SRS" in s:
    print(1)
elif "RSS" in s:
    print(1)
elif "RSR" in s:
    print(1)
elif "RRS" in s:
    print(2)

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:
S = input()[0:3]
res = 0
for i in S:
    if i == "R":
        res += 1
print(res)

Submission status: Wrong Answer

Solution code:
string = input()
ans=0
maxlen=0
stat = False
for i in range(len(string)):
    if(stat):
        if(string[i]=='R'):
            ans+=1
            if(maxlen<=ans):
                maxlen=ans
                
        else:
            if(maxlen<=ans):
                maxlen=ans
            ans=0
            stat=False
    else:
        if(string[i]=='R'):
            stat=True
            ans+=1
        else:
            stat=False

print(maxlen)

Submission status: Wrong Answer

Solution code:
s = input()

print(s.count('R'))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

count = 0
l = [0]

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

print(max(l))

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:
def abc175_a():
    s = input()
    cnt = 0
    
    for i in range(len(s)):
        if s[i] == 'R':
            cnt += 1
        elif (i > 0) and (s[i - 1] == 'S') and (s[i] == 'R'):
            cnt = 1
        else:
            cnt = 0
    
    print(cnt)

if __name__ == '__main__':
    abc175_a()

Submission status: Wrong Answer

Solution code:
user_input = input()
upper = user_input.upper()
store = []
for i in upper:
    store.append(i)
st_nd = store[0:2]
# print(st_nd)
nd_rd = store[1:3]
# print(nd_rd)
for i in set(store):
    if i == "S":
        rain = 0
if len(set(store)) == 1:
    for i in set(store):
        if i == "S":
            print(0)
        else:
            print(3)
elif len(set(st_nd)) == 1:
    print(2)
elif len(set(nd_rd)) == 1:
    print(2)
else:
    print(1)

Submission status: Wrong Answer

Solution code:
s = input().upper()
count, final = 0, 0
for i in range(3):
    if s[i] == "R": count += 1
    else:
        if count > final: final, count = count, 0
print(final)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
RS = input()
answer = 0

for i, j in enumerate(RS):
  if j == "R":
    answer += 1
  elif i == 2 and j == "S":
    break
  else:
    answer = 0
print(answer)

Submission status: Wrong Answer

Solution code:
s = list(input())
l = len(s)
rain =int()
for x in range(l):
  if s[x]=="R":
    rain=rain+1
  else:
    rain=0
print(rain)

Submission status: Wrong Answer

Solution code:
S = list(map(str, input()[0:3]))
res = 0
for i in S:
    if i == "R":
        res += 1
print(res)

Submission status: Wrong Answer

Solution code:
import sys

x = input()

if len(x) != 3 :
    sys.exit()

k=0

for k in range(2):
    if x[k] != "R":
        if x[k] != "S":
            print("無効な値です")
            sys.exit()
    k=k+1

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

Submission status: Wrong Answer

Solution code:
#A - Rainy Season
Si = []
Si = list(str(input()))
i = 0
if Si.count('R') == 3:
    i = 3
else:
    if Si.count('R') == 1:
        i = 1
    else:
        if Si[1] == 'S':
            i = 1
        else:
            i = 2
# 出力
print(i)

Submission status: Wrong Answer

Solution code:
#coding :utf-8
S=input(">")
if (S=="sss"):
    print(3)
elif(S=="ssr"):
    print(2)
elif(S=="srs"):
    print(1)
elif(S=="rss"):
    print(1)
elif(S=="srr"):
    print(2)
elif(S=="rsr"):
    print(1)
elif(S=="rrs"):
    print(2)
else:
    print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
user_input = input()
upper = user_input.upper()
store = []
for i in upper:
    store.append(i)
st_nd = store[0:2]
# print(st_nd)
nd_rd = store[1:3]
# print(nd_rd)
for i in set(store):
    if i == "S":
        rain = 0
if len(set(store)) == 1:
    for i in set(store):
        if i == "S":
            print("0")
        else:
            print("3")
elif len(set(st_nd)) == 1:
    print("2")
elif len(set(nd_rd)) == 1:
    print("2")
else:
    print("1")

Submission status: Wrong Answer

Solution code:
s = input()

count = 0
max = 0

for c in s:
    if c == "R":
        count += 1
    elif c == "S":
        if count > max:
            max = count
        count = 0


print(max)

Submission status: Wrong Answer

Solution code:
i = 0
j = 0
for s in input():
    j += 1

    if s == "R":
        i += 1
    if j != 3 and i > 1 and s == "S":
        i -= 1

print(i)

Submission status: Wrong Answer

Solution code:
s = input()

flag = 1
cnt = 0

for wheather in s:
    if wheather == 'R':
        cnt = cnt + 1
        new_cnt = cnt
    else:
        new_cnt = cnt
        cnt = 0

if cnt == 3:
    print(3)
else:
    print(new_cnt)

Submission status: Wrong Answer

Solution code:
S=input()
set_S=set(S)
if len(set_S)==1:
    ret=S.count('R')
elif len(set_S)==2:
    for i in range(2):
        if S[i]==S[i+1]=='R':
            ret=2
            break
        else:
            ret=S.count('R')-1
print(ret)

Submission status: Wrong Answer

Solution code:
string = input()
ans=0
maxlen=0
stat = False
for i in range(len(string)):
    if(stat):
        if(string[i]=='R'):
            ans+=1
            if(maxlen<=ans):
                maxlen=ans
                
        else:
            if(maxlen<=ans):
                maxlen=ans
            ans=0
            stat=False
    else:
        if(string[i]=='R'):
            stat=True
            ans+=1
        else:
            stat=False

print(ans)

Submission status: Wrong Answer

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

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

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

s=inp()
c=0
for i in range(3):
    if s=="RSS":
        out(1)
        break
    if s[i]=='R':
        c+=1
    elif s[i]=='S' and i!=2:
        c= 0
out(c)

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

if "SSS" in s:
    print(0)
elif "RRR" in s:
    print(0)
elif "SS" in s:
    print(2)
elif "RR" in s:
    print(2)
else:
    print(1)

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
s = input()
ans = 0

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
Scnt = S.count('S')
result = 0
result2 = 0

for i in range(3):
    if S[i] == 'R':
        result = result + 1
    else:
        result2 = result
        result = 0
 
if result > result2:
    print(result)
else:
    print(result2)

Submission status: Wrong Answer

Solution code:
a=list(input().split())
a="".join(a)
count=0
for i in range(3):
    
    if a[i]=='R':
        count+=1
        ans=count
    else:
        count=0
       
        
print(count)

Submission status: Wrong Answer

Solution code:
a, b, c = input()

if b == "R":
  d = 1
  if a == "R":
    d += 1
  if c == "R":
  	d += 1
else:
  d = 0
  if a == "R" or c == "R":
    d += 1
 
print(c)

Submission status: Wrong Answer

Solution code:
s = input()
count, final = 0, 0
for i in s:
    if i == "R": count += 1
    elif i == "S":
        if count > final: final, count = count, 0
print(final)

Submission status: Wrong Answer

Solution code:
S = list(map(str, input()[0:3].lower()))
res = 0
for i in S:
    if i == "r":
        res += 1
print(res)

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 == "RRR":
    print(3)
else:
    print(2)

Submission status: Wrong Answer

Solution code:
user_input = input()
upper = user_input.upper()
store = []
for i in upper:
    store.append(i)
st_nd = store[0:2]
# print(st_nd)
nd_rd = store[1:3]
# print(nd_rd)
for i in set(store):
    if i == "S":
        rain = 0
if len(set(store)) == 1:
    for i in set(store):
        if i == "S":
            rain = 0
        else:
            rain = 3
elif len(set(st_nd)) == 1:
    rain = 2
elif len(set(nd_rd)) == 1:
    rain = 2
else:
    rain = 1
print(rain)

Submission status: Wrong Answer

Solution code:
s = input()
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]== "S" and s[1]=="R"and s[2]=="R") or (s[0]=="R" and s[1]=="R"and s[2]=="S"):
    print(2)
else:
    print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

counts = []
count = 1
if s.find('R') == -1:
    count = 0
else:
    for a, b in zip(s, s[1:]):
        if a == b and a == 'R':
            count += 1
        else:
            counts.append((a, count))
            count = 1

print(str(count))

Submission status: Wrong Answer

Solution code:
a=input()
sum=0
for i in a:
  if i=='R':
      sum=sum+1
print (sum)

Submission status: Wrong Answer

Solution code:
S=input()
set_S=set(S)
def fun():
    if len(set_S)==1:
        ret=S.count('R')
    elif len(set_S)==2:
        for i in range(2):
            if S[i]==S[i+1]=='R':
                ret=2
                break
            else:
                ret=S.count('R')-1
    return ret

if __name__=='__main__':
    print(fun())

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
l = [e for e in input()]
c = 0
if l[1] == "R":
  c = 1
  if l[0] == "R":
    c += 1
  if l[2] == "R":
  	c += 1
else:
  if l[0] == 1 or l[2] == "R":
    c = 1
 
print(c)

Submission status: Wrong Answer

Solution code:
s = input()

flag = 1
cnt = 0

for wheather in s:
    if wheather == 'R':
        cnt = cnt + 1
        new_cnt = cnt
    else:
        new_cnt = cnt
        cnt = 0

if cnt == 3:
    print(str(3))
else:
    print(new_cnt)

Submission status: Wrong Answer

Solution code:
li = list(map(str, input()))
c=0
for i in range(3):
  if li[i]=='R':
    c=c+1
print(c)

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    s = input()
    count = 0
    for i in range(1, len(s)):
        if s[i-1] == s[i] and s[i] == "R":
            count += 1
    if count == 0 and s.count('R') > 0:
        count += 1
    print(count)

Submission status: Wrong Answer

Solution code:
S = input()

l = len(S)
count = 0

for i in range(l):
    cur_count = 1

    for j in range(i+1,l):
        if S[i] == "S":
            break
        if (S[i] != S[j]):
            break
        cur_count += 1
    if cur_count > count:
        count = cur_count

print(count)

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:
        if count >= m :
            m=count
        count=0

print(m)

Submission status: Wrong Answer

Solution code:
a=list(input().split())
a="".join(a)
count=0
for i in range(3):
    
    if a[i]=='S':
        count=1
    else:
        count+=1
print(count)

Submission status: Wrong Answer

Solution code:
s = input()

def result(s):
    count = 0
    max = 0
    if s == 'RRR':
        max = 3
        return max
    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:
s = input()
ans=0
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:
l = [e for e in input()]
c = 0
if l[1] == "R":
  c += 1
  if l[0] == "R":
    c += 1
  if l[2] == "R":
  	c += 1
else:
  if l[0] == 1 or l[2] == "R":
    c += 1
 
print(c)

Submission status: Wrong Answer

Solution code:
a = input()

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

Submission status: Wrong Answer

Solution code:
s = str(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=list(input().split())
a="".join(a)
count=0
for i in range(3):
    
    if a[i]=='S':
        continue
    else:
        count+=1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

flag = 1
cnt = 0

for wheather in s:
    if wheather == 'R':
        cnt = cnt + 1
    else:
        new_cnt = cnt
        cnt = 0

if cnt == 3:
    print(str(3))
else:
    print(new_cnt)

Submission status: Wrong Answer

Solution code:
S = input()

bin_S = []

for i in range(len(S)):
    if S[i] == "R":
        bin_S.append(1)
    else:
        bin_S.append(0)
for j in range(1,len(bin_S)):
    bin_S[j] += bin_S[j-1]
    
ans = max(bin_S)
print(ans)

Submission status: Wrong Answer

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

s=inp()
c=0
for i in range(3):
    if s[i]=='R':
        c+=1
    elif s[i]=='S' and i!=2:
        c= 0
out(c)

Submission status: Wrong Answer

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

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)
elif word == "RRR":
    print(3)

Submission status: Wrong Answer

Solution code:
s = input()
ans=0
for i in range(len(s)):
  if s[i] == "S":
    ans+=1
  elif i>len(s):
    break
    
print(ans)

Submission status: Wrong Answer

Solution code:
s=str(input())[:3]
c=0
for i in range(3):
    r=0
    if s[i]=="R":
        while (s[i]=="R" and i<len(s)-1):
            r+=1
            i+=1
        c=max(r,c)

print(c)

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
for i in range(3):
    if s[i]=="R":
        ans+=1
    elif s[i]=="S":
        if i==0:
            if s[i+1]=="R" and s[i+2]=="R":
                ans=2
        break
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,c = input()
count = 0

if a == "R":
  count = count + 1
else:
  count = 0
  
if b == "R":
  count = count + 1
else:
  count = 0
  
if c == "R":
  count = count + 1
else:
  count = 0
  
print(count)

Submission status: Wrong Answer

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


print(count)

Submission status: Wrong Answer

Solution code:
a,b,c=map(str,input())
count=0
if a=='R':
  count=count+1
if b=='R':
  count=count+1
if c=='R':
  count=count+1
print(count)

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
if s[i]=='S':
  c=0
  if s[i+1]=='R':
    c=1
    if s[i+2]=='R':
      c=2
print(c)

Submission status: Wrong Answer

Solution code:
x=list(input())
cnt=0
for i in range(3):
 if x[i]=="R":
  cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
weather = input()

raining = False
count = 0
max = 0
for w in weather:
    if w == 'R':
        if not raining:
            raining = True
            count = 1
        else:
            count += 1
        if max < count:
            max = count
    elif w == 'S':
        raining = False
        count = 0

Submission status: Wrong Answer

Solution code:
import re
S = input()

if S == 'RRR':
    print(3)
elif re.match('RR', S) is not None:
    print(2)
elif re.match('R', S) is not None:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
def judge(S):
    n = 0
    
    for i in range(0,len(S)):
        if i==0:
            if S[i]=="R":
                n += 1
        if i==1:
            if S[i]=="R":
                n += 1
            else:
                n = 0
        if i==2:
            if S[i]=="R":
                n += 1
            else:
                continue
                
    return n

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(max)

Submission status: Wrong Answer

Solution code:
S = list(input())

count = 0
maxCount = 0
for c in S:
  if c == 'R':
    count += 1
  else:
    maxCount = count
    count = 0

if maxCount < count:
  maxCount = count

print(maxCount)

Submission status: Wrong Answer

Solution code:
i = 0
j = 0
for s in input():
    j += 1

    if s == "R":
        i += 1
    if j != 3 and i > 0 and s == "S":
        i -= 1

print(i)

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)
    elif S[1] == "R" and (S[0] != "R" or S[2] != "R"):
        print(1)
    else:
        print(2)
else:
    print(3)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
c = 0
if s[0] == "R":
  c = c+1
  if s[1] == "R":
    c = c+1
    if s[2] == "R":
      c = c+1

if s[0] != "R":
  if s[1] == "R":
    c = c+1
    if s[2] == "R":
      c = c+1 
print(c)

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:
        if count > m :
            m=count
        count=0

print(m)