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()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

def main():
    s = str(input())

    max = 0
    count = 0
    for c in s:
        if c == "R":
            count += 1
        else:
            if max < count:
                max = count
                count = 0

    print(str(max))

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
N = input()
cons = 0
for i in range(len(N)):
    if (N[i]=='S'):
        if i>=1:
            print(cons)
            exit(0)
        else:
            continue
    else:
        cons +=1
print(cons)

Submission status: Wrong Answer

Solution code:
S=input().strip("¥n")
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 == "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 main():
    S = input()
    if S == "RRR":
        return "3"
    elif S == "RRS":
        return "2"
    elif S == "RSS" or S == "RSR":
        return "1"
    else :
        return "0"

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
if s == 'RSR':
  print(2)
else:
  print(s.count('R'))

Submission status: Wrong Answer

Solution code:

s=input()
flg = 0
cnt = 0
if s[1] == "S":
    flg = 1
for i in range(3):
    if s[i] == "S":
        cnt += 1
print(cnt if flg == 1 else cnt -1)

Submission status: Wrong Answer

Solution code:
import sys
import math
from collections import defaultdict, deque
from copy import deepcopy
    
input = sys.stdin.readline
def RD(): return input().rstrip()
def F(): return float(input().rstrip())
def I(): return int(input().rstrip())
def MI(): return map(int, input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float,input().split()))
def Init(H, W, num): return [[num for i in range(W)] for j in range(H)]
def end_of_loop():raise StopIteration
    
    
def main():
    temp = input().rstrip()
    result = 0
    result2 = 0
    for i in range(3):
        if temp[i] == "R":
            result+=1
        else:
            result2 = max(result2, result)
            result=0
    print(result2)
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
S = input()

max_cnt = 0
cnt = 0
for s in S:
    if s == "R":
        cnt += 1
    else:
        if cnt > max_cnt:
            max_cnt = cnt
        cnt = 0
print(max_cnt)

Submission status: Wrong Answer

Solution code:
S = input()

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

if count == 3:
    print(3)
else:
    print(max_count)

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[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()

count = 0
ans = 0
for s in S:
  if s == "R":
    count += 1
    ans = count
  else:
    ans = count
    count = 0

print(ans)

Submission status: Wrong Answer

Solution code:
a=input()
if a=='SSS' :
  print('0')
elif a=='RRR' :
  print('3')
elif a[1]=='S' :
  print('1')
else :
  print('2')

Submission status: Wrong Answer

Solution code:
def resolve():
    S = input()
    count = []
    if S[0] == "R":
        ans = 1
    else:
        ans = 0
    for i in range(len(S)-1):
        if S[i] == "R" and S[i+1] == "R":
            ans += 1
        elif S[i] == "R":
            ans = 1
        else:
            ans = 0
        count.append(ans)
    print(max(count))
resolve()

Submission status: Wrong Answer

Solution code:
s = 'x' + input()

cnt = 1
ans = 1
for i in range(1, 4):
    if s[i] == s[i-1] == 'R':
        cnt += 1
        ans = max(ans, cnt)
    else:
        cnt = 1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
ans = 0
cur = 1
cnt = 1
while cur < len(s):
    if s[cur] != s[cur - 1]:
        cnt = 1
    else:
        cnt += 1
    ans = max(ans, cnt)
    cur += 1
print(ans)

Submission status: Wrong Answer

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
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
weather = input()
ans = ""
for i in range(3):
  if weather[i] == "R":
    ans += weather[i]
print(len(ans))

Submission status: Wrong Answer

Solution code:
from sys import stdin, stdout
import math,sys,heapq
from itertools import permutations, combinations
from collections import defaultdict,deque,OrderedDict
from os import path
import bisect as bi
def yes():print('YES')
def no():print('NO')
if (path.exists('input.txt')): 
    #------------------Sublime--------------------------------------#
    sys.stdin=open('input.txt','r');sys.stdout=open('output.txt','w');
    def I():return (int(input()))
    def In():return(map(int,input().split()))
else:
    #------------------PYPY FAst I/o--------------------------------#
    def I():return (int(stdin.readline()))
    def In():return(map(int,stdin.readline().split()))
#sys.setrecursionlimit(1500)
def dict(a):
    d={} 
    for x in a:
        if d.get(x,-1)!=-1:
            d[x]+=1
        else:
            d[x]=1
    return d


def find_gt(a, x):
    'Find leftmost value greater than x'
    i = bi.bisect_right(a, x)
    if i != len(a):
        return i
    else:            
        return -1

def main():
    try:
        l=list(input())
        if (l[0]=='R' and l[1]=='R') or (l[1]=='R' and l[2]=='R'):
            ans=2
            print(ans)
            return
        else:
            ans=0
            for x in range(3):
                if l[x]=='R':
                    ans=1
                    break
            print(ans)
    except: 
        pass
        
M = 998244353
P = 1000000007
Inf=1000000000000000000
if __name__ == '__main__':
    #for _ in range(I()):main()
    for _ in range(1):main()

Submission status: Wrong Answer

Solution code:
def function(X):
    if X[1] == 'S':
        if (X[0] == 'R') or (X[2] == 'R'):
            return 1
        else:
            return 0
    else:
        if (X[0] == 'R') and (X[2] == 'R'):
            return 3
        else:
            return 2


if __name__ == '__main__':
    X = input()
    print(function(X))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!

S = input()
#N = int(input())
#A, B = map(int, input().split())
#List = list(map(int, input().split()))

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

Submission status: Wrong Answer

Solution code:

def main():
    s=input()
    if 'RRR'in s:
        ans=3
    elif 'RR' in s:
        ans=2
    elif 'R' in s:
        ans=1
    else:
        ans=1
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
ws = input()

rev = 0
for ch in ws:
    if ch == 'R':
        rev += 1
    else:
        rev = 0

print(rev)

Submission status: Wrong Answer

Solution code:
# a,b = map(int, input().split())
s = input()
c = s.count("R")

if c == 1:
    print(c)
elif c == 2:
    if s[0] == s[1]:
        print(c)
    elif s[1] == s[2]:
        print(c)
    else:
        print(1)
elif c == 3:
    print(3)

Submission status: Wrong Answer

Solution code:
S = input()

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

print(ans)

Submission status: Wrong Answer

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

from pprint import pprint
from collections import deque, defaultdict
import itertools
import math
import sys

sys.setrecursionlimit(10 ** 6)
INF = float('inf')


S = list(input())

res = 0
before = True
for i in range(len(S)):
    if S[i] == 'R':
        if i == 0:
            res += 1
            before = True
        else:
            if before:
                res += 1
    else:
        before = False

print(res)

Submission status: Wrong Answer

Solution code:

def main():
    s = str(input())

    max = 0
    count = 0
    for c in s:
        if c == "R":
            count += 1
        else:
            if max < count:
                max = count

    print(str(max))

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
S = input()
if S == 'SSS':
    print(0)
elif S.count('R')==1:
    print(1)
elif S.count('R')==2:
    print(2)
else:
    print(3)

Submission status: Wrong Answer

Solution code:
#n = int(input())
#a,b = map(int,input().split())
#a_L = list(map(int,input().split()))

s = list(input())


if s[0] == "R":
    ans = 1
else:
    ans = 0
for i in range(1,len(s)):
    if s[i] == "R" and s[i] == s[i-1]:
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
a = input()
c = 0
ans = 0
for s in a:
    if s == 'S':
        c += 1
    else:
        c = 0
    ans = max(ans,c)

print(ans)

Submission status: Wrong Answer

Solution code:
import re
s = input()
print(max(map(len, re.split('R', s))))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from collections import Counter
import copy
from itertools import combinations


def A(s):
  l = 1
  max_l = 0
  for i in range(1, len(s)):
    if s[i - 1] == s[i]:
      l += 1
    else:
      l = 1
    if l > max_l:
      max_l = l
  return max_l


def B():
  pass


def C():
  pass


def main():
  s = input()
  print(A(s))


if __name__ == '__main__':
  main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = list(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
S = readline().decode().rstrip()
if S[0] == 'R' and S[2] == 'R':  
    print(S.count('R')-1)
else:
    print(S.count('R'))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
if S.count("SSS")>=1:
    print(3)
    exit()
if S.count("SS")>=1:
    print(2)
    exit()
if S.count("S")==0:
    print(0)
    exit()
else:
    print(1)

Submission status: Wrong Answer

Solution code:
import sys
from collections import deque
import numpy as np
import math
sys.setrecursionlimit(10**6)
def S(): return sys.stdin.readline().rstrip()
def SL(): return map(str,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def IL(): return map(int,sys.stdin.readline().rstrip().split())

def solve():
    return

if __name__=='__main__':
    s = S()
    for rep in s:
        if rep=="RRR":
            print(3)
        elif rep=="RRS" or "SRR":
            print(2)
        elif rep=="SSS":
            print(0)
        else:
            print(1)
    solve()

Submission status: Wrong Answer

Solution code:
"""
    Satwik_Tiwari ;) .
    14th AUGUST , 2020  - FRIDAY
"""

#===============================================================================================
#importing some useful libraries.
from __future__ import division, print_function

from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase

from itertools import *
import bisect
from heapq import *
from math import *
from copy import *
from collections import deque
from collections import Counter as counter  # Counter(list)  return a dict with {key: count}
from itertools import combinations as comb # if a = [1,2,3] then print(list(comb(a,2))) -----> [(1, 2), (1, 3), (2, 3)]
from itertools import permutations as permutate
from bisect import bisect_left as bl
#If the element is already present in the list,
# the left most position where element has to be inserted is returned.
from bisect import bisect_right as br
from bisect import bisect
#If the element is already present in the list,
# the right most position where element has to be inserted is returned

#==============================================================================================
#fast I/O region
BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

# inp = lambda: sys.stdin.readline().rstrip("\r\n")

#===============================================================================================
### START ITERATE RECURSION ###
from types import GeneratorType
def iterative(f, stack=[]):
  def wrapped_func(*args, **kwargs):
    if stack: return f(*args, **kwargs)
    to = f(*args, **kwargs)
    while True:
      if type(to) is GeneratorType:
        stack.append(to)
        to = next(to)
        continue
      stack.pop()
      if not stack: break
      to = stack[-1].send(to)
    return to
  return wrapped_func
#### END ITERATE RECURSION ####

#===============================================================================================
#some shortcuts

mod = 1000000007
def inp(): return sys.stdin.readline().rstrip("\r\n") #for fast input
def out(var): sys.stdout.write(str(var))  #for fast output, always take string
def lis(): return list(map(int, inp().split()))
def stringlis(): return list(map(str, inp().split()))
def sep(): return map(int, inp().split())
def strsep(): return map(str, inp().split())
# def graph(vertex): return [[] for i in range(0,vertex+1)]
def zerolist(n): return [0]*n
def nextline(): out("\n")  #as stdout.write always print sring.
def testcase(t):
    for p in range(t):
        solve()
def printlist(a) :
    for p in range(0,len(a)):
        out(str(a[p]) + ' ')
def lcm(a,b): return (a*b)//gcd(a,b)
def power(x, y, p) :
    res = 1     # Initialize result
    x = x % p  # Update x if it is more , than or equal to p
    if (x == 0) :
        return 0
    while (y > 0) :
        if ((y & 1) == 1) : # If y is odd, multiply, x with result
            res = (res * x) % p

        y = y >> 1      # y = y/2
        x = (x * x) % p
    return res
def ncr(n,r): return factorial(n)//(factorial(r)*factorial(max(n-r,1)))
def isPrime(n) :
    if (n <= 1) : return False
    if (n <= 3) : return True
    if (n % 2 == 0 or n % 3 == 0) : return False
    i = 5
    while(i * i <= n) :
        if (n % i == 0 or n % (i + 2) == 0) :
            return False
        i = i + 6
    return True

#===============================================================================================
# code here ;))

def solve():
    s = inp()

    ans = 0
    for i in range(3):
        for j in range(i,3):
            if(s[i:j]=='R'*(j-i)):
                ans = max(ans,j-i)
    print(ans)





testcase(1)
# testcase(int(inp()))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
s=str(s)
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)
else:
  print(1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = input()
c = 0

print(n.count("R"))

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S  = input()
m = 0
c = 0
for s in S:
  if s == 'R':
    c += 1
  else:
    c == 0
  m = max(m, c)
print(m)

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    S = input()
    cnt = 0
    for s in S:
        if s=='R':
            cnt += 1
        else:
            break
    
    print(cnt)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!

s = input()
num = 0
if s[0] == "R": num+=1
if s[1] == "R": num+=1
if s[2] == "R": num+=1
print(num)

Submission status: Wrong Answer

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

print(c)

Submission status: Wrong Answer

Solution code:
import sys
import numpy as np
X = str(input())

d = 0
s = 0
for i in X:
    if i == 'R':
        d += 1
    else:
        if s < d:
            s = d
        d = 0

print(s)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

S = input()

ans = 0
for s in S:
    if s == "R":
        ans += 1
        continue
    break
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
ren = 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:
s = input()
ans = 1
if s[0] == s[1] or s[1] == s[2]:
    ans = 2
if s[0] == s[1] and s[1] == s[2]:
    ans = 3
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
for si in S:
    renzoku = 0
    if si == 'R':
        renzoku += 1
    else:
        renzoku = 0
print(renzoku)

Submission status: Wrong Answer

Solution code:
S = list(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" and S[1] == "S":
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
import sys, math
from functools import lru_cache
from collections import defaultdict
sys.setrecursionlimit(500000)
MOD = 10**9+7

def input():
    return sys.stdin.readline()[:-1]

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]

def main():
    S = input()
    if S.count('R') == 0:
        print(0)
        return
    cnt = 1
    m = -1
    for i in range(len(S)-1):
        if S[i] == S[i+1]:
            cnt += 1
        else:
            cnt = 1
        m = max(m, cnt)

    print(m)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def resolve():
    s = list(input())
    cnt = 0
    m_cnt = 0
    for c in s:
        if c == 'R':
            cnt += 1
        else:
            if cnt > m_cnt:
                m_cnt = cnt
            cnt = 0

    print(m_cnt)

resolve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
thrday = input()
count = 0

for i in range(3):
  if(thrday[i] == "R"):
    count += 1
 
print(count)

Submission status: Wrong Answer

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

r = input()

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

Submission status: Wrong Answer

Solution code:
s=input()
ans=1
if s[0]==s[1] or s[1]==s[2]:
  ans=2
  if s[0]==s[2]:
    ans=3
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()
Count = 0
MAXC = 0
for TS in range(0,3):
    if S[TS]=='R':
        Count += 1
    else:
        MAXC = Count
        Count = 0
print(MAXC)

Submission status: Wrong Answer

Solution code:
S=input()
d=0
c=0
for i in range(len(S)):
  if i=='S':
    break
  else:
    c+=1
  if c>d:
    d=c
  c=0
print(d)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi,factorial
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7

s=SI()
if s[0]==s[1]==s[2]=="S":
    print(0)
    sys.exit()
count=0
if s[0]==s[1]:
    count+=1
if s[1]==s[2]:
    count+=1
print(count+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S=input()
ans=0
temp=0
for x in S:
  if x=="R":
    temp+=1
  else:
    ans=max(ans,temp)
    temp=0
print(ans)

Submission status: Wrong Answer

Solution code:
S = list(input())

r_cnt = 0
max_r_cnt = 0

for s in S:
    if s == "R":
        r_cnt += 1
    else:
        max_r_cnt = r_cnt
        r_cnt = 0

print(max_r_cnt)

Submission status: Wrong Answer

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



print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

    ans = 0
    tmp = 0
    for s in S:
        if s == 'R':
            tmp += 1
        else:
            ans = tmp
            tmp = 0

    if ans < tmp:
        ans = tmp

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = list(input())
print(len(list(x for x in S if x == 'R')))

Submission status: Wrong Answer

Solution code:
s = input()

print(len(s.strip('S')))