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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = str(input())

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

Submission status: Wrong Answer

Solution code:
def INT():
    return int(input())

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

def LI():
    return list(map(int, input().split()))

S = input()
ans = int(S[0] == "R")

for i in range(1, 3):
    if S[i] == "R" and S[i - 1] == "R":
        ans += 1
        
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = input()

if n == "SSS":
    print(0)
elif n == "RSS" or n == "SRS" or n == "SSR" or n == "RSR":
    print(1)
elif n == "RRS" or n == "RRS":
    print(2)
else:
    print(3)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
S = input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S=str(input())
ls = []
cnt = 0
for i in range(3):
    if S[i] == "R":
        cnt += 1
    else:
        ls.append(cnt)
        cnt = 0
if cnt == 3:
    print(3)
else:
    print(max(ls))

Submission status: Wrong Answer

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

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(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()
sol = 0
if s == 'RRR':
    sol = 3
elif s == 'RRS' or s == 'SRR':
    sol == 2
elif s == 'SSS':
    sol = 0
else:
    sol = 1
print(sol)

Submission status: Wrong Answer

Solution code:
S = input()

if S in ['RRR', 'SSS']:
    print(3)
elif S in ['RSS', 'RRS', 'SSR', 'SRR']:
    print(2)
else:
    print(1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
str = input()
r = 0
for c in str:
	if c == "R":
		r += 1
print(r)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

S=input().strip()

if not ("R" in S):
    print(0)
elif S[1]!="R":
    print(1)
else:
    A=1
    if S[0]=="R":
        A+=1
    elif S[2]=="R":
        A+=1

    print(A)

Submission status: Wrong Answer

Solution code:
import math

s = input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
T = input()
ans = 1
anss = 0
for i in range(1,len(T)):
    if T[i] == T[i-1]:
        ans += 1
    else:
        ans = 1
    anss = max(ans,anss)
print(anss)

Submission status: Wrong Answer

Solution code:
def solve():
    s = input()
    ans = 0
    hoge = [0]
    for i in s:
        if i == "R":
            ans += 1
            hoge.append(ans)
        else:
            ans = 0
    print(min(hoge))
    return 0

if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

Solution code:
import sys, math


if(__name__ == "__main__"):
    SSS =  input()
    if(SSS=="RRR" ):
        print(3)
    elif("RR" in SSS):
        print(2)
    else:
        print(1)

Submission status: Wrong Answer

Solution code:
N = input()
if N =="SSS":
  print(0)
if N =="RRR":
  print(3)
if N =="RRS" or "SRR":
  print(2)
else:
  print(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:
s = str(input())
if s == "RRR":
    print(3)
elif "RR" in s:
    print(2)
elif "R" in s:
    print(1)
else:
    print(1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    S = input()
    
    if S in ('RRR',):
        print(3)
    elif S in ('RRS', 'SRR'):
        print(2)
    elif S in ('SSR', 'SRS', 'RSS'):
        print(1)
    else:
        print(0)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
input=sys.stdin.readline

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

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
s=input().strip()
arr=s.split("S")
print(max(arr))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
  
print(len(s.replace('S', '')))

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

S=list(input().rstrip('\n'))
res = 0
for i in S:
  if i=='S':
    res = 0
  else:
    res += 1
print(res)

Submission status: Wrong Answer

Solution code:
s = input()
res = 0
 
if s[0] == s[1]:
  res += 1
if s[1] == s[2]:
  res += 1
 
print(res)

Submission status: Wrong Answer

Solution code:
def main():
    a=input()
    _max=0
    c=0
    for i in range(len(a)):
        if a[i]=='R':
            c+=1
        else:
            if _max<c:
                _max=c
                c=0
    print(_max)
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
s=input()
ans=0
i=0
while i<3 and s[i]=='R':
    i+=1
    ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
if s == "SSS":
  print(0)
elif "SS" in s:
  print(1)
elif "S" in s:
  print(2)
else:
  print(3)

Submission status: Wrong Answer

Solution code:
S = input()

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

print(ans)

Submission status: Wrong Answer

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

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
if(temp > ans):
    ans = temp
print(temp)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

tmp = 0
ans = 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 = list(input())

ans = 0

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

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    s = input()
    print(s.count("R"))

Submission status: Wrong Answer

Solution code:
S =  input()

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

Submission status: Wrong Answer

Solution code:
# import sys
# import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
# import time
# from itertools import product,permutations,\
    # combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import itemgetter,mul
# from fractions import Fraction
# from functools import reduce

mod = int(1e9+7)
# mod = 998244353
INF = 1<<50

def readInt():
    return list(map(int,input().split()))

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

if __name__=='__main__':
    main()

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:

S = input()

cnt = 0
for i in range(3):
    if S[i] == "R":
        cnt += 1
    elif i >= 1:
        break

print(cnt)

Submission status: Wrong Answer

Solution code:
n = input()
c = 0

for i in range(3):
  if n[i] == "R":
    c+=1

print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()

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

print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
ans = 0
if "S" in s:
    ans = 1
if "SS" in s:
    ans = 2
if s == "SSS":
    ans = 3
print(ans)

Submission status: Wrong Answer

Solution code:
W = input()
ans = 0
for i in range(3):
    ans += (W[i] == 'R')

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

Solution code:
# by the authority of GOD     author: manhar singh sachdev #

import os,sys
from io import BytesIO, IOBase

def main():
    s = input().strip()
    cou=maxi=0
    for i in s:
        if i=='R':
            cou += 1
        else:
            maxi = max(maxi,cou)
            cou = 0
    print(maxi)
#Fast IO 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")
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
a = input()
b = 0
for i in a:
    if i == "R":
        b += 1
    else:
        pass
print(b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy


def main():
    s = input()   
    print(s.count("R"))

if __name__ == '__main__':
	main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
print(sum(s == 'R' for s in input()))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    S = input()

    cnt = 0
    for s in S:
        if s=='R':
            cnt += 1
    
    print(cnt)

Submission status: Wrong Answer

Solution code:
import sys


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


def main():
    S = ns()
    ans = 0
    for s in S:
        if s == 'R':
            ans += 1
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    from sys import setrecursionlimit, stdin, stderr
    from os import environ
    from collections import defaultdict, deque, Counter
    from math import ceil, floor
    from itertools import accumulate, combinations, combinations_with_replacement
    setrecursionlimit(10**6)
    dbg = (lambda *something: stderr.write("\033[92m{}\033[0m".format(str(something)+'\n'))) if 'TERM_PROGRAM' in environ else lambda *x: 0
    input = lambda: stdin.readline().rstrip()
    LMIIS = lambda: list(map(int,input().split()))
    II = lambda: int(input())
    P = 10**9+7
    INF = 10**18+10

    print(Counter(input())['R'])

    
main()

Submission status: Wrong Answer

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
S = input()

print(S.count('R'))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Time Limit Exceeded

Solution code:
s=input()
i=0
count=1
while(i<len(s)-1):
  if s[i]==s[i+1]:
    count+=1
i+=1
print(count)

Submission status: Accepted

Solution code:
s = input("")
Scnt = 0
Smem = 0

for i in range(len(s)):
    if s[i] == "S":
        Scnt += 1
        Smem = i

if Scnt == 3:
    print(0)
elif Scnt == 2:
    print(1)
elif Scnt == 0:
    print(3)
elif Scnt == 1 and Smem == 1:
    print(1)
elif Scnt == 1 and Smem != 1:
    print(2)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
num = input()

streaks = []
streak = 0
for letter in num:
    if letter == "R":
        streak += 1
    elif letter != "R":
        streaks.append(streak)
        streak = 0
else:
    streaks.append(streak)

print(max(streaks))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = str(input())

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

Submission status: Accepted

Solution code:
import re
S = input()
rds = list(map(lambda x: len(x), re.findall('R{1,}', S)))
print(max(rds)) if rds else print(0)

Submission status: Accepted

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

Submission status: Accepted

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

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' and s[2] == 'S'):
    print(2)
elif(s[0] == 'S' and 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()
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()
count=[0]
s=0
for i in range(3):
    if S[i]=='R':
        if i==2 or S[i+1]=='S':
            s=s+1
            count.append(s)
            s=0
        else:
            s=s+1
print(max(count))

Submission status: Accepted

Solution code:
S = input()
# 'S': 晴 'R': 雨 #長さ3
count = 0
maximum = 0
for s in S:
  if s == 'R':
    count += 1
  else:
    count = 0
  maximum = max(maximum, count)
print(maximum)

Submission status: Accepted

Solution code:
#abc17a
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 = str(input())
count = 0
result = 0
for i in S:
  if i == 'R':
    count+=1
    if count>result:
      result = count
  else:
    count=0
print(result)

Submission status: Accepted

Solution code:
w = input()

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

Submission status: Accepted

Solution code:
s = input()
count =0
fcount = 0
for i in s:
  if i=='R' and count>0:
    count = count + 1
    fcount = max(fcount,count)
  elif i=='R':
    count = 1
    fcount = 1
  else:
  	count = 0
print(fcount)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
line = input()
rain_day = 0
k = 0
for wether in line:
  #当日雨
  if wether == "R":
    rain_day += 1
  #当日晴れ、前日は雨
  elif rain_day != 0:
    k = rain_day
    rain_day = 0
  #当日晴れ、前日も晴れ
  else:
    pass
if k > rain_day:
  print(k)
else:
  print(rain_day)

Submission status: Accepted

Solution code:
n=input()

ans=0
cnt=0
for str in n:
    if str=="R":
        cnt+=1
        ans=max(ans,cnt)
    else:
        cnt=0
print(ans)

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
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()
w = {"SSS":0,"SSR":1,"SRS":1,"SRR":2,"RRR":3,"RSR":1,"RRS":2,"RSS":1}
print(w[s])

Submission status: Accepted

Solution code:
s=list(input())


c=[]
for i in range(3):
  cnt=0
  if s[i]=='R':
    
    
    while i<3:
      if s[i]=='R':
        cnt+=1
        i+=1
        
      else:
        break
        
  c.append(cnt)
    
print(max(c))

Submission status: Accepted

Solution code:
S=list(input())
count=S.count("R")
if S==["R","S","R"]:
  count=1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = input()

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

print(result)

Submission status: Accepted

Solution code:
S = input()

a = "RRR"
b = "RR"
c = "R"
    
if a == S:
    print(3)
    
elif b in S:
    print(2)

elif c in S:
    print(1)
    
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()

if s=='RRR':
    print('3')
elif s=='RRS':
    print('2')
elif 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(len(S)):
    if S[i] == 'R':
        ans += 1
        flag = True
    elif S[i] == 'S' and flag:
        break

print(ans)