TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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.

Submission attempts (in order):
x, k, d = map(int, input().split())
distance = k * d
result = abs(x - distance)


while distance >= 0:
  distance -= d * 2
  if result > result = abs(x - distance):
    result = abs(x - distance)
    
print(result)

s1, s2, s3 = str(input())
if s1 == "R":
  if s2 == "S":
    result = 1
  else:
    if s3 == "S":
      result = 2
    else:
      result = 3
else:
  if s2 == "S":
    if s3 == "S":
      result = 0
    else:
      result = 1
  else:
    if s3 == "S":
      result = 1
    else:
      result = 2

print(result)

Verdicts: Runtime Error

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

Submission attempts (in order):
text = input()
if text == "RRS":
    print(2)
elif text == "SSS":
    print(0)
else text == "RSR":
    print(1)

a = max(input().split("S"))
print(len(a))

Verdicts: Runtime Error

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

Submission attempts (in order):
S = map(str, input())
print(S)

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
s = input()
if s.contains("RRR"):
  print(3)
elif s.contains("RR"):
  print(2)
elif s.contains("R"):
  print(1)
else:
  print(0)

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


Verdicts: Runtime Error

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

Submission attempts (in order):
import numpy

e=input().split()
for i in range(len(e)):
  e[i]=int(e[i])
x=e[0]
k=e[1]
d=e[2]
t=k
if k>10000:
 if k%2==0:
   t=10000
 else:
   t=10001
kou=numpy.gcd(x,d)
x=int(x/kou)
d=int(d/kou)
if d>100 and d%2==0:
  d=100
if d>100 and d%2==1:
  d=1001
for i in range(t):
  if abs(x+d)<abs(x-d):
    x+=d
  else:
    x-=d
print(abs(x)*kou)


w=input()
count=0

if w=="SSS":
 print(0)
if w=="SSR":
 print(1)
if w=="SRR":
 print(2)
if w=="RRS":
 print(2)
if w=="RSR":
 print(1)
if w=="SRS":
 print(1)
if w=="RSS":
 print(1)
if w=="RRR":
 print(3)

Verdicts: Runtime Error

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

Submission attempts (in order):
s=input()
if 'RRR' in s:
    print ('3')
if 'RR' in s:
    print ('2")
if 'R' in s:
    print('1')
else:
    print('0')

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

Verdicts: Runtime Error

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

Submission attempts (in order):
a=0
S=input()
for i in range(2):
    if(S[i]==S[i+1]):
        a=a+1
print(a)

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
X, K, D = map(int, input().split())
X = abs(X)
r = X % D
t = X // D
if t >= K:
    ans = abs(X - K * D)
elif (K - t) % 2 == 0:
    ans = r
else:
    ans = D - r
print(ans)

X, K, D = map(int, input().split())
X = abs(X)
point = X % D
q = X // D
ans = 0
if q >= K:
    ans = abs(X-D*K)
elif (K - q) % 2 == 0:
    ans = point
else:
    ans = D-point
print(ans)

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

Verdicts: Runtime Error

Runtime Error

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

Submission attempts (in order):
import sys
import math
X,K,D = map(int, input().split()) 
X1=abs(X)
syou=math.floor(X1/D)
amari=math.floor(K/syou)
ans=0
if amari==0:
    ans=X1-D*K
else:
    ya=math.floor(K/amari)
    ans=X1-ya*D
    if ya%2==0:
        print(ans)
        sys.exit()
    if abs(ans+D)>abs(ans-D):
        ans=ans-D
    else:
        ans=ans+D
print(abs(ans))

import sys

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

Verdicts: Runtime Error

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

Submission attempts (in order):
r=0
for l in input():
  r+=1 if l='R' else 0
print(r)

print(max([len(x) for x in input().split('S')]))

Verdicts: Runtime Error

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

Submission attempts (in order):
#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)


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


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

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


S=input()
if S=="SSS":
    print(0)
elif S=="SSR":
    print(1)
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(3)

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

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

Submission attempts (in order):
S = int(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)


S = int(input())

flag = False
ans = 0
for i in range(len(S)):
    if S[i] == 'R':
        ans += 1
        flag = True
    elif S[i] == 'S' ans flag:
        break

print(ans)


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)


Verdicts: Runtime Error

Runtime Error

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

Submission attempts (in order):
S = input("R or S:")
s = list(S)

count = 0
for i in s:
    if i == "R":
        count += 1
    else: count =0
print(count)

S = input()
s = list(S)

count = 0
for i in s:
    if i == "R":
        count += 1
    else: count =0
print(count)

S = input()
s = list(S)

count = 0
max_count = 0

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


Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
N = int(input())
L = map(int,input().split())

sLength = set(L)
count = 0

for i in sLength:
    for j in sLength:
        for k in sLength:
            if i!=j and i!=k and j!=k:
                m = max([i,j,k])
                if i+j+k-2*m>0:
                    count+=1

print(count)


s = input()

table = {'RRR':3,'RRS':2,'RSR':1,'RSS':1,'SRS':1,'SRR':2,'SSS':0,'SSR':1}

for key,value in table.items():
    if key==s:
        print(value) 

Verdicts: Runtime Error

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

Submission attempts (in order):
s = input()
count = 0
if 'RRR' in s:
  print(3)
elif 'RR' in s:
  print(2)
elif 'SSR' in s or 'SRS' in s or 'RSS' in sor 'RSR' in s:
  print(1)
else:
  print(0)

s = input()
count = 0
if 'RRR' in s:
  print(3)
elif 'RR' in s:
  print(2)
elif 'SSR' in s or 'SRS' in s or 'RSS' in s or 'RSR' in s:
  print(1)
else:
  print(0)

Verdicts: Runtime Error

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

Submission attempts (in order):
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()

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
S = input()
c = 0
cmax = 0
for c in S:
  if c == "R":
    c += 1
    if cmax < c:
      cmax = c
  else:
    c = 0
print(cmax)

S = input()
cnt = 0
cmax = 0
for c in S:
  if c == "R":
    cnt += 1
    if cmax < cnt:
      cmax = cnt
  else:
    cnt = 0
print(cmax)

Verdicts: Runtime Error

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

Submission attempts (in order):
S = input()
s = [i for i in input()]
if s.count('R') == 3:
    print(3)
elif s.count('R') == 1:
    print(1)
elif s.count('R') == 0:
    print(0)
else:
    if S == 'RSR':
        print(1)
    else:
        print(2)

S = input()
s = [i for i in S]
if s.count('R') == 3:
    print(3)
elif s.count('R') == 1:
    print(1)
elif s.count('R') == 0:
    print(0)
else:
    if S == 'RSR':
        print(1)
    else:
        print(2)

Verdicts: Runtime Error

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

Submission attempts (in order):
S = input()

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

S = input()

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



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

Verdicts: Runtime Error

Runtime Error

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

Submission attempts (in order):
whether=input(str())
if whether[1]==whether[2]==whether[3]=="R":
    print ("3")
elif whether[1]==whether[2]==whether[3]=="S":
    print ("0")
elif whether[1]==whether[2]=="R" or whether[2]==whether[3]=="R":
    print ("2")
else:
    print ("1")


whether=input(str())
if whether[1]==whether[2]==whether[3]=="R":
    print ("3")
elif whether[1]==whether[2]==whether[3]=="S":
    print ("0")
elif whether[1]==whether[2]=="R" or whether[2]==whether[3]=="R":
    print ("2")
else:
    print ("1")


whether=str(input())
if whether[0]==whether[1]==whether[2]=="R":
    print ("3")
elif whether[0]==whether[1]==whether[2]=="S":
    print ("0")
elif whether[0]==whether[1]=="R" or whether[1]==whether[2]=="R":
    print ("2")
else:
    print ("1")


Verdicts: Runtime Error

Runtime Error

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

Submission attempts (in order):
l=input()
if l="RRR":
  print(3)
elif l="RRS" or "SRR":
  print(2)
elif l="SSS":
  print(0)
else:
  print(1)
    

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


l=input()
for i in range(4):
  if "R"*i in l:
    ans=i
print(ans)

Verdicts: Runtime Error

Runtime Error

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

Submission attempts (in order):
s = input()

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

s = input()

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


Verdicts: Wrong Answer

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

Submission attempts (in order):
r = 0
if 'r' not in s:
  print(0)
else:
  for i in range(len(s)):
    if s[i] == 'r' and i!=len(s)-1:
      for j in range(i+1,len(s)):
        if s[j] != 'r':
          break
      r = j-i
  print(r)
  

import re
r = 0
s = input()
if 'r' not in s:
  print(0)
else:
  x = re.findall('r+',s)
  if len(x) == 2:
      print(1)
  else:
      print(len(x[0]))

import re
r = 0
s = input()
if 'R' not in s:
  print(0)
else:
  x = re.findall('R+',s)
  if len(x) == 2:
      print(1)
  else:
      print(len(x[0]))
      


Verdicts: Runtime Error

Wrong Answer

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

Submission attempts (in order):
input_line = input()
#print(input_line)
charlist = list(input_line)
index = 0
for i in range(3):
    if(charlist[i]=="R"):
        index += 1
    
if index==2:
    if charlist[1]=="S":
        print(1)
        
else:
    print(index)

input_line = input()
#print(input_line)
charlist = list(input_line)
index = 0
for i in range(3):
    if(charlist[i]=="R"):
        index += 1
    
if index==2:
    if charlist[1]=="S":
        print(1)
        
    else:
        print(index)
        
else:
    print(index)

Verdicts: Wrong Answer

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

Submission attempts (in order):

s=input()
list_s=list(s)
element="R"
count=0
for i in range(0,len(list_s)-1):
    if(list_s[i] in element):
        if(list_s[i+1] in element):
            count+=2
        else:
            count+=1
    else:
        count+=0
print(count)
        

# cook your dish here
s=input()
list_s=list(s)
element="R"
count=0
for i in range(0,len(list_s)-1):
    if(element == list_s[i]):
        if(element == list_s[i+1]):
            count+=1
        
    else:
        count+=0

print(count)
        


s=input()
list_s=list(s)
element="R"
count=0
for i in range(0,len(list_s)-1):
    if(list_s[i] in element):
        if(list_s[i+1] in element):
            count+=2
        else:
            count+=1
    else:
        count+=0
print(count)
        


s=input()
list_s=list(s)
element="R"
count=0
for i in range(0,len(list_s)-1):
    if(list_s[i] in element):
        if(list_s[i+1] in element):
            count+=2
        else:
            count+=1
    else:
        count+=0

print(count)
        


s=input()
list_s=list(s)
element="R"
count=0
for i in range(0,len(list_s)-1):
    if(list_s[i] in element):
        if(list_s[i+1] in element):
            count+=2
        else:
            count+=1
    else:
        count+=1

print(count)
        

a = input()
ans2 = 0
max1= 0
for i in range(3):
    if a[i] == 'R':
        ans2 += 1
    else:
        max1= max(ans2, max1)
        ans2 = 0
print(max(ans2, max1))


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

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

Submission attempts (in order):
s＝input（）
ans＝0
c＝0
for i in range（3）:
  if s[i]＝＝'R':
    ans+＝1
  else:
    c＝max（ans,c）
    ans＝0
print（c）
    

S=input()
ans=0
c=0
for i in range(3):
  if S[i]=="R":
    ans+=1
  else:
    c=max(ans,c)
    ans=0
print(max(c,ans))


Verdicts: Runtime Error

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

Submission attempts (in order):
r = input()
if r == 'RRR':
    print(3)
elif r == 'RRS' or r == 'SRR':
    print(2)
elif r == 'RSR' or r == 'RSS' or r =='SSR' or r =='SRS':
    print(1)
else rainy_days == 'SSS':
    print(0)


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


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

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

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

rainy_days = input('3日間で連続した雨の日は？:')
if rainy_days = RRR:
    print(3)
elif rainy_days == RRS or SRR:
    print(2)
elif rainy_days == RSR or RSS or SSR or SRS:
    print(1)
elif rainy_days == SSS:
    print(0)

rainy_days = input('3日間で連続した雨の日は？:')
if rainy_days = rrr:
    print(3)
elif rainy_days == rrs or srr:
    print(2)
elif rainy_days == rsr or rss or ssr or srs:
    print(1)
elif rainy_days == sss:
    print(0)


rainy_days = input()
if rainy_days == 'RRR':
    print(3)


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


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

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

Submission attempts (in order):
S = input()
counts = [0]
if "R" in S:
  counts.appned(1)
if "RR" in S:
  counts.append(2)
if "RRR" in S:
  counts.append(3)
print(max(counts))

S = input()
counts = [0]
if "R" in S:
  counts.append(1)
if "RR" in S:
  counts.append(2)
if "RRR" in S:
  counts.append(3)
print(max(counts))

Verdicts: Runtime Error

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

Submission attempts (in order):
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

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
    elif w == 'S':
        raining = False
        count = 0
    if max < count:
        max = count

print(max)

Verdicts: Wrong Answer

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

Submission attempts (in order):
#abc175b
n=int(input())
l=list(map(int,input().split()))
l.sort()
cnt=0
for i in range(n):
 for j in range(i):
  for k in range(j):
   if l[k]!=l[j] and l[i]!=l[j] and l[k]+l[j]>l[i]:
    cnt+=1
print(cnt)


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


Verdicts: Runtime Error

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

Submission attempts (in order):
from numba import jit
@jit
def main():
    n,k = map(int,input().split())
    p = list(map(int,input().split()))
    c = list(map(int,input().split()))

    ans=-10**18
    for i in range(n):
        start,count=i,1
        val=c[start]
        while p[start]-1 != i:
            start = p[start]-1
            count += 1
            val += c[start]
        start = i
        if val > 0:
            a = (k//count-1)*val
            ans=max(a,ans)
            num=count+k%count
        else:
            a=0
            num=min(k,count)
        for _ in range(num):
            a += c[start]
            start=p[start]-1
            ans=max(a,ans)
    print(ans)
main()

s=list(input())
count=0
for d in s:
    if d=="R":
        count += 1
if count == 2:
    if s[1]=="S":
        print(1)
    else:
        print(2)
else:
    print(count)

Verdicts: Runtime Error

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

Submission attempts (in order):
x,k,d= map(int,input().split())
x=abs(x)
if x>d*k:
  print(x-d*k)
else:
  m=x//d
  k=(k-m)%2
  print(abs((x%d)-k*d))

x,k,d= map(int,input().split())
s=[]
x=abs(x)
if x>d*k:
  print(x-d*k)
else:
  for i in range(k):
    s.append(abs(x-d*i))
    s.sort()
  print(s[0])

s=input()

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

Verdicts: Runtime Error

Runtime Error

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

Submission attempts (in order):
R, C, K = map(int, input().split(" "))
board = [ [0]*(C+1) for _ in range(R+1) ]
for _ in range(K) :
    i, j, v = map(int, input().split(" "))
    board[i][j] = v

score = [ [ [0]*4 for _ in range(C+1) ] for _ in range(R+1) ] 

for i in range(1, R+1) :
    for j in range(1, C+1) : 
        if board[i][j] == 0 :
            for k in range(4) :
                score[i][j][k] = score[i][j-1][k]    
        else :
            for k in range(3):
                score[i][j][k+1] = score[i][j-1][k] + board[i][j]
        
        descent = max(score[i-1][j])
        score[i][j][1] = max(descent + board[i][j], score[i][j-1][1], score[i][j-1][0]+board[i][j])
        score[i][j][0] = max(descent, score[i][j-1][0])



print(max(score[-1][-1]))


s = input()
prev = "R"
res = 0
a = 0
for c in s :
    if c=="R" :
        a+=1
    else :
        a = 0
    res = max(res, a)
print(res)

Verdicts: Runtime Error

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

Submission attempts (in order):
S = input()
count = 0
for i in range(3):
    if S[i] == "R":
        count += 1
    else:
        count = 0
print(count)

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

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


Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
s = input()

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

s = input()

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
a = input()

if a.count("SSS") == 1:
    print (3)
elif a.count("SS") == 1:
    print (2)
elif a.count("S") == 1:
    print (1)
elif a.count("S") == 2:
    print (1)
else:
    print (0)


a = input()

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


Verdicts: Wrong Answer

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

Submission attempts (in order):
s = rawinput()
res = 0
cur = 0
for i in s:
  if i =='S':
    cur = 0
  else:
    cur += 1
  res = max(cur, res)
print(res)

s = input()
res = 0
cur = 0
for i in s:
  if i =='S':
    cur = 0
  else:
    cur += 1
  res = max(cur, res)
print(res)

Verdicts: Runtime Error

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

Submission attempts (in order):
temp = input()

S = list(temp)

cnt=0
tmp_s = ""
for i,s in enumerate(S,start=1):
  if i == 1:
    cnt=cnt + 1
    tmp_s = s
    continue

  if tmp_s == s:
    cnt = cnt + 1
  else:
    tmp_s = s
    cnt=1
    
print(cnt)

#!/usr/bin/env python3
# coding:utf-8

temp = input()

S = list(temp)

cnt=0
max_cnt=0
tmp_s = ""
flag=0

cnt = S.count('R')
if cnt == 2:
    if S[1] == 'S':
        cnt=1

print(cnt)

Verdicts: Wrong Answer

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

Submission attempts (in order):
s = input()
ans = s.count('R')
if s=='RSR':
  ans = 1
print(1)  
  

s = input()
ans = s.count('R')
if s=='RSR':
  ans = 1
print(ans)

Verdicts: Wrong Answer

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

Submission attempts (in order):
S = input()
if S == "RRR":
    print(3)
elif S in "RR":
    print(2)
elif S in "R":
    print(1)
else:
    print(0)

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
X, K, D = [int(i) for i in input().strip().split(' ')]

tmp = X // D
d1 = X - (D * tmp)
d2 = X - (D * (tmp + 1))

if tmp >= K:
  ans = X - (D * K)
else:
  if (tmp % 2) ^ (K % 2) == 0:
    ans = d1
  else:
    ans = d2

print(abs(ans))


S = input().strip()
print(max([len(i) for i in S.split('S')]))


Verdicts: Runtime Error

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

Submission attempts (in order):
max([len(t) for t in input().split('S')])

print(max([len(t) for t in input().split('S')]))


Verdicts: Wrong Answer

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

Submission attempts (in order):
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)

l = [e in e in input().split()]
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)


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

Verdicts: Wrong Answer

Runtime Error

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

Submission attempts (in order):
S=input()
if S=='SSS':
  print(3)
elif S==('SSR' or 'RSS'):
  print(2)
elif S=='RRR':
  print(0)
else:
  print(1)

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
a=input()
def fun(a):
    count=0
    max=0
    for i in a:
        if i=='R':
            count+=1
        
            if count>=max:
                max=count
            
    else:
        if count>=max:
            max=count
        count=0
    return max
 
    

def fun(a):
    count=0
    max=0
    for i in a:
        if i=='R':
            count+=1
        
            if count>=max:
                max=count
            
    else:
        if count>=max:
            max=count
        count=0
    return max
 
    

a=input()
count=0
max=0
for i in a:
    if i=='R':
        count+=1
        if count>=max:
            max=count        
    else:
        if count>=max:
            max=count
        count=0
print(max)     
    

Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
S = input()
if S.contains("RRR"):
    print("3")
elif S.contains("RR"):
    print("2")
elif S.contains("R"):
    print("1")
else:
    print("0")

s = input().upper()
if s.count('RRR') == 1:
  print(3)
elif s.count('RR') == 1:
  print(2)
elif s.count('R') > 0:
  print(1)
else:
  print(0)

Verdicts: Runtime Error

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

Submission attempts (in order):
s = input()
s = s.split('S')
print(max(len(s)))

s = input()

if s.count('R') == 2:
  print(s.count('RR'+1)
else:
  print(s.count('R')

s = input()

if s.count('R') == 2:
    print(s.count('RR')+1)
else:
    print(s.count('R'))

Verdicts: Runtime Error

Runtime Error

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

Submission attempts (in order):
Word = input()

counter=0

for i in range(len(Word)):
    if 'R'==Word[i]:
        counter +=1
    else:
        counter=0
print(counter)

Word = input()

counter=0
maxc = 0

for i in range(len(Word)):
    if 'R'==Word[i]:
        counter +=1
        maxc = max(counter, maxc)
    else:
        counter=0
print(maxc)

Verdicts: Wrong Answer

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

Submission attempts (in order):
x,k,d=map(int,input().split())
a=divmod(abs(x),d)  
if a[0]<k:
  if a[1]==0 and a[0]%2==1:
    print(d)
  elif a[1]==0 and a[0]%2==0:
    print(0)
  elif a[1]!=0 and a[0]%2!=0:
    if x<0:
      print(d-a[1])
    else:
      print(abs(a[1]-d))
  else:
    print(a[1])
else:
  print(abs(x)-d*k)


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


Verdicts: Runtime Error

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

Submission attempts (in order):

def main():
    x, k, d = map(int, input().split())
    # x > 0
    if x < 0:
        x = -1 * x
    #the number of d in x
    r = abs(x) // d
    k_rest = k - r
    if r > 0 and k_rest < 0:
        print(x - k * d)
        exit()

    x_r = x - d * r
    x_l = x_r - d

    # print(f"xr: {x_r}\nxl: {x_l}\nk: {k_rest}")

    if k_rest % 2 == 0:
        print(abs(x_r))
    else:
        print(abs(x_l))

if __name__ == "__main__":
    main()


def main():
    s = input()
    if s == "RSR":
        print(1)
    else:
        cnt = 0
        for i in s:
            if i == "R":
                cnt += 1

        print(cnt)
    
if __name__ == "__main__":
    main()

Verdicts: Runtime Error

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

Submission attempts (in order):
s=input()
c=0
mc=0
for i in s:
  if i='R':
    c+=1
    mc=c
  else:
    c=0
print(max(c,mc))

s=input()
c=0
mc=0
for i in s:
  if i=='R':
    c+=1
    mc=c
  else:
    c=0
print(max(c,mc))


Verdicts: Runtime Error

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

Submission attempts (in order):
s=[str(i) for i in input()]
if str[0]=='R' and str[1]=='S':
	print(1)
elif str[1]=='S' and str[2]=='R':
	print(1)
elif str[0]=='S' and str[1]=='R' and str[2]=='S':
	print(1)
elif str[0]=='R' and str[1]=='R' and str[2]=='S':
	print(2)
elif str[0]=='S' and str[1]=='R' and str[2]=='R':
	print(2)
elif str[0]=='R' and str[1]=='R' and str[2]=='R':
	print(3)
else:
	print(0)

s=[str(i) for i in input()]
if s[0]=='R' and s[1]=='S':
	print(1)
elif s[1]=='S' and s[2]=='R':
	print(1)
elif s[0]=='S' and s[1]=='R' and s[2]=='S':
	print(1)
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' and s[1]=='R' and s[2]=='R':
	print(3)
else:
	print(0)

Verdicts: Runtime Error

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

Submission attempts (in order):
print(input().count('S'))

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


Verdicts: Wrong Answer

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

Submission attempts (in order):
n = int(input())
l = list(map(int,input().split()))

ans = 0

l.sort()

for i in range(n) :
    for j in range(i+1,n):
        for k in range(j+1,n):
            if l[i] != l[j] != l[k] and  l[i] < l[j] < l[k]:
                    ans += 1

print(ans)

s = input()

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

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

Verdicts: Runtime Error

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

Submission attempts (in order):
S = input()
if ("RRR" in S):
  return 3
elif ("RR" in S):
  return 2
elif ("R" in S):
  return 1
else:
  return 0


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

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


print("Hello")

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


Verdicts: Runtime Error

Runtime Error

Runtime Error

Wrong Answer

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

Submission attempts (in order):
A = input()
b = A.count("RRR")
C = A.count("RR")
D = A.count("R")
if b == 1: 
   print(3)
elif C ==1:
   print(2)
else:
   if D >0:
      print(1)
   else:

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)

A = input()
b = A.count("RRR")
C = A.count("RR")
if b == 1: 
   print(3)
elif C ==1:
   print(2)
else:
   if A.count("R")>0:
      print(1)
   else:
      print(0)

Verdicts: Runtime Error

Wrong Answer

Accepted