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):
s = input()
ans = 0
if s == 'RSR':
  ans == 1
else:
  for i in s:
  if i == 'R':
    ans +=1

print(ans)

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):
s = input()

if s = "RRR":
  print(3)
elif s = "RRS" or s = "SRR":
  print(2)
elif s = "SSS":
  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: 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()
n=0
for i in range(len(s)):
    if s[i]=='S':
        n=0
    else:
        n+=1
print(n)

s=input()
n=0
m=0
for i in range(len(s)):
    if s[i]=='S':
        n=0
    else:
        n+=1
        m=n
print(m)

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):
y Season

S=input()

ans=0

for i in range (len(S)-1):
    if S[i]=="R":
        tempans=1
        for j in range (i+1,len(S)):
            if S[i]==S[j]:
                tempans+=1
            else:
                if tempans>ans:
                    ans=tempans
                break
        else:
            if tempans>ans:
                ans=tempans
print(ans)


# A - Rainy Season

S=input()

ans=0
count=0

if S[0]=="R":
    count=1

for i in range (1,len(S)):
    if S[i]=="R":
        if count>0:
            pass
        else:
            count=1
        if S[i-1]=="R":
            count+=1
        else:
            if count>ans:
                ans=count
                count=0
else:
    if count>ans:
        ans=count

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):
s = input()

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

s = input()
 
ans = 0
for i in range(0, 3):
	if s[i] == 'R':
    	ans += 1
      
if ans == 2 and s[1] == 'S':
  	ans -= 1
    
print(ans)

s = input()
 
ans = 0
for i in range(0, 3):
	if s[i] == 'R':
			ans += 1
      
if ans == 2 and s[1] == 'S':
  	ans -= 1
    
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 itertools

def chkTrg(a,b,c):
    if (a + b > c and b + c > a and c + a > b) and (a != b and b != c and c != a):
        return True
    else:
        return False

N = int(input())
bars = [int(i) for i in input().split(" ")]

cnt = 0

for bar in itertools.combinations(bars, 3):
    if chkTrg(bar[0],bar[1],bar[2]):
        cnt += 1

print(cnt)

S = list(input())
cnt = 0
maxCnt = 0

for i in range(3):
    if S[i] == "R":
        cnt += 1
    else:
        cnt = 0
    if maxCnt < cnt:
        maxCnt = cnt

print(maxCnt)


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
import sys
s = input()

num = s.count("R")

if num >= 2:
    if s[1] == "R":
        num = 1

print(num)

#A
import sys
s = input()

num = s.count("R")

if num >= 2:
    if s[1] == "S":
        num = 1

print(num)

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

import sys
input = sys.stdin.readline

S=list(input().rstrip('\n'))
res = 0
if S[0]=='R':
  res += 1
if S[1]=='S':
  if res == 0 and S[2]=='S':
    print(0)
  else:
    print(1)
else:
  res += 1
  if S[2]=='R':
    res += 1
    print(res)
  else:
    print(res)

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())
if x < 0:
    x *= -1
if x - k // d >= 0:
    print(x-k*d)
else:
    k -= x // d
    x %= d
    if k % 2 == 0:
        print(x)
    else:
        print(abs(x-d))


print(max(input().split('S')))


print(max(map(len, input().split('S'))))


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):
ss = str(input())
a = ss.count("R")

if a == 2 and a[2] == 0:
  a = 1

print(a)  


ss = str(input())
a = ss.count("R")

if ss = "RSR":
  a = 1

print(a)

ss = str(input())
a = int(ss.count("R"))

if ss == "RSR":
  a = 1

print(a)

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 S == "SSS":
    print(0)
elif S == "RRR":
    print(3)
elif S == "RSS" or S == "SRS" or S == "SSR" or "RSR":
    print(1)
elif S == "RRS" or S == "SRR":
    print(2)

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

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

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

Verdicts: 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):
import sys

if __name__ == '__main__':
	S = sys.stdin.readline().rstrip()
	if S == 'SSS':
		print('3')
	elif 'SS' in S:
		print('2')
	elif 'S' in S:
		print('1')
	else:
		print('0')

import sys

if __name__ == '__main__':
	S = sys.stdin.readline().rstrip()
	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):
s = input()
def s_count(s):
  m = list(s)
  array = [0. for i in range(len(m))]
  count = 0
  for i in range(len(m)):
    if m[i] == 'R':
      array[i] += 1
      if (i > 0 and m[i] == m[i-1]) or i == 0:
        count += 1
        array[i] += count
      else:
        count = 0
  return max(array)
print(s_count(s))

s = input()
def s_count(s):
    m = list(s)
    array = [0. for i in range(len(m))]
    count = 0
    for i in range(len(m)):
        if m[i] == 'R':
            array[i] += 1
            if (i > 0 and m[i] == m[i-1]):
                count += 1
                array[i] += count
            else:
                count = 0
    return max(array)
print(s_count(s))

s = input()
def s_count(s):
    m = list(s)
    array = [0. for i in range(len(m))]
    count = 0
    for i in range(len(m)):
        if m[i] == 'R':
            array[i] += 1
            if (i > 0 and m[i] == m[i-1]):
                count += 1
                array[i] += count
            else:
                count = 0
    return max(array)
print(s_count(s))

s = input()
def s_count(s):
  m = list(s)
  array = [0. for i in range(len(m))]
  count = 0
  for i in range(len(m)):
    if m[i] == 'R':
      array[i] += 1
      if (i > 0 and m[i] == m[i-1]) or i == 0:
        count += 1
        array[i] += count
      else:
        count = 0
  return max(array)
s_count(s)

import numpy as np
s = input()
def s_count(s):
    m = list(s)
    array = np.zeros(len(m))
    count = 0
    for i in range(len(m)):
        if m[i] == 'R':
            array[i] += 1
            if (i > 0 and m[i] == m[i-1]) or i == 0:
                count += 1
                array[i] += count
            else:
                count = 0
    return array.max()
s_count(s)

s = input()
def s_count(s):
    m = list(s)
    array = [0. for i in range(len(m))]
    count = 0
    for i in range(len(m)):
        if m[i] == 'R':
            array[i] += 1
            if (i > 0 and m[i] == m[i-1]):
                count += 1
                array[i] += count
            else:
                count = 0
    return max(array)
print(int(s_count(s)))

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):
n = int(input())
l = list(map(int, input().split()))
t = 0

for i in range(n):
    for j in range(i + 1, n):
        for k in range(j + 1, n):
            sum = l[i] + l[j] + l[k]
            if sum - max(l[i], l[j], l[k]) > max(l[i], l[j], l[k]):
                if l[i] != l[j] and l[i] != l[k] and l[j] != l[k]:
                    t += 1

print(t)


n = int(input())
l = list(map(int, input().split()))
t = 0

for i in range(n):
    for j in range(i + 1, n):
        for k in range(j + 1, n):
            sum = l[i] + l[j] + l[k]
            if sum - max(l[i], l[j], l[k]) > max(l[i], l[j], l[k]):
                if l[i] != l[j] and l[i] != l[k] and l[j] != l[k]:
                    t += 1

print(t)


s = input()
d = 0

if s == "RRR":
    d = 3
elif s in {"RRS", "SRR"}:
    d = 2
elif s in {"RSR", "RSS", "SSR", "SRS"}:
    d = 1
else:
    d = 0

print(d)


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):
list(input())
r= weather. count("R")
if r==2 and weather[1]=="S":
   print(1)
else:
   print(r)

a

weather=input()
s=count(R)
if s=2 and weather[2]=R:
  s=s-1
print(s)

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


Verdicts: Runtime Error

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):
x,k,d = map(int,input().split())

if x >= 0 :
    a = abs(x//d)
    if a <= k :
        if (k - a) % 2 == 0 :
            print(abs(x-a*d))
        else :
            print(abs(x-(a+1)*d))
    else :
        print(abs(x-k*d))
else :
    if x%d == 0 :
        a = abs(x//d)
    else :
        a = abs(x//d+1)
            if a <= k :
                if (k - a) % 2 == 0 :
                    print(abs(x+a*d))
                else :
                    print(abs(x+(a+1)*d))
            else :
                print(abs(x+k*d))

s = input()
if s == 'RRR' :
    print(3)
if s == 'SRR' :
    print(2)
if s == 'RSR' :
    print(1)
if s == 'RRS' :
    print(2)
if s == 'SSR' :
    print(1)
if s == 'RSS' :
    print(1)
if s == 'SRS' :
    print(1)
if s == 'SSS' :
    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):
X, K, D = map( int, input().split())
 
Y = X // D
if K <= Y:
  print( min( abs( X - K * D ) , abs( X + K * D ) ))
else:
  if ( K - Y ) % 2 == 0:
    print( min( abs( X - Y * D ) , abs( X + Y * D ) ),
           min( abs( X - ( Y - 2 ) * D ), abs( X - ( Y + 2 ) * D ),
                abs( X + ( Y - 2 ) * D ), abs( X + ( Y + 2 ) * D )) )
  else:
    print( min( abs( X - ( Y - 1 ) * D ), abs( X - ( Y + 1 ) * D ),
                abs( X + ( Y - 1 ) * D ), abs( X + ( Y + 1 ) * D )) )


s = input()

if s.count("R") in [0,1,3]:
  print( s.count("R") )
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):
x=input()
o=0
for i in range(1,len(x)):
  if x[i-1]==x[i] and x[i]=='R':
    o+=1
print(o)

x=input()
o=0
c=0
for i in range(len(x)):
  if x[i]=='S':
    o=max(o,c)
    c=0
  else:
    c+=1
o=max(c,o)

print(o)

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

cnt = 0

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

print(cnt)

S = list(input())

cnt = 0

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

print(cnt)

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

cnt = 1
for i in range(len(S)-1):
    if S[i] == S[i+1] and S[i] == "R":
        cnt += 2
    elif S[i] != S[i+1] and S[i+1] == "R":
        cnt += 1
    else:
        cnt = 0
print(cnt)

S = input()

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

S = input()

cnt = 0
ans = []
for s in S:
    if s == "R":
        cnt += 1
    else:
        ans.append(cnt)
        cnt = 0
ans.append(cnt)
print(max(ans))

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

r = 0
for i in range(3):
  if i == 0 and S[0] == 'R':
    r += 1
   elif i < 2:
    if S[i] == S[i+1]:
      r += 1

print(r)

S = input()
r = 0
for i in range(3):
  if i == 0 and S[0] == 'S':
    r += 1
  elif i < 1:
    if S[i] == S[i+1]:
      r += 1

print(r)

S = input()
r = 0

if S == "RRR":
  r = 3
elif S == "RRS" or S == "SRR":
  r = 2
elif S == "RSR" or S.count('R') == 1:
  r = 1
else:
  r = 0

print(r)

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):
n = int(input())
l = list(map(int,input().split()))
 
l.sort()
ans = 0
 
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]:
                if l[i] + l[j] > l[k] :
                    ans += 1
 
print(ans)

n=int(input())
a=list(map(int,input().split()))
a.sort()
ans=0
for i in range(n):
  for j in range(i+1,n):
    for k in range(k+1,n):
      if l[i]!=l[j]!=l[k]:
        if l[i]+l[j]>l[k]:
        ans+=1

print(ans)

n=int(input())
l=list(map(int,input().split()))
l.sort()
ans=0
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]:
        if l[j]+l[i]>l[k]:
         ans+=1

print(ans)

n=int(input())
l=list(map(int,input().split()))
l.sort()
ans=0
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]:
        if l[j]+l[i]>l[k]:
        ans+=1

print(ans)

n=int(input())
a=list(map(int,input().split()))
a.sort()
ans=0
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]:
        if l[j]+l[i]>l[k]:
        ans+=1

print(ans)

ss=str(input())
a=int(ss.count("R"))

if ss=="RSR":
  a=1

print(a)


Verdicts: Runtime Error

Runtime Error

Runtime Error

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):
 a = int(input())
p = list(map(int,input().split()))
 count = 0
  
for i in range(a):
     for s in range(a):
         for t in range(a):
             if p[t]<p[s]<p[i] and p[t]+p[s]>p[i]:
                 count+=1
print(count)

num = list(map(str,input()))
if num[0]== 'R' and num[1] =='S':
    print('1')
else:
    print(num.count('R'))


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=input()
b=0

for i in a:
  if i==R:
    b+=1
    if b==2:
      print(b)
      import sys
      sys.exit()
    
  if i==S and b>0 :
    b-=1
    
print(b)

a=input()
b=0

for i in a:
  if i==R:
    b+=1
    
  if i==S and b>0:
    b-=1
    
print(b)

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



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):
x = input()
if x == "SSS":
  print(0)
elif x == "SSR" or "SRS" or "RSR" or "RSS":
  print(1)
elif x == "SRR" or "RRS":
  print(2)
elif x == "RRR":
  print(3)

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

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

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):
c = 0
for i in input():
  if i=='R':
    c+=1
  else:
    c = 0
print(c)

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

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

c = 0
for i in input():
  if i=='R':
    c+=1
if c==3:
  print(3)
else:
  print(1)

c = 0
for i in input().split():
  if i=='R':
    c +=1
print(c)

c = 0
r = []
for i in input():
  if i=='R':
    c+=1
  else:
    r.append(c)
    c = 0
if not len(r):
  print(c)
else:
  print(max(c))

c = 0
r = []
for i in input():
  if i=='R':
    c+=1
  else:
    r.append(c)
    c = 0
r.append(c)
if not len(r):
  print(c)
else:
  print(max(r))

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

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=list(input())
s=[str(x) for x in s]
count=0
num=0
for i in range(len(s)):
  if (s[i]=='R'):
    count+=1
    if(count==2):
      num+=1
      count=1
  elif (s[i]=='S'):
    count=0
    
print(num)

s=list(input())
s=[str(x) for x in s]
print(s)
count=0
num=0
for i in range(len(s)):
  if (s[i]=='R'):
    count+=1
    if(count==2):
      num+=1
      count=1
  elif (s[i]=='S'):
    count=0
    
print(num)

s=list(input())
s=[str(x) for x in s]
count=0
num=[0]
for i in range(len(s)):
  if (s[i]=='R'):
    count+=1
    num.append(count)
  elif (s[i]=='S'):
    count=0
    
print(max(num))

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 = "RSR":
  print(1)
else:
  print(s.count("R"))

s = input()
if s == "RSR":
  print(1)
else:
  print(s.count("R"))


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):
str = input()
splited = list(str)

cccount = 0
count = 0
for s in splited:
  if s == 'R':
    count = count + 1
  else:
    if cccount > count:
      cccount = count
    count = 0
print(cccount)
    

str = input()
splited = str.split('')
print(splited)

str = input()
splited = list(str)

cccount = 0
count = 0
for s in splited:
  if s == 'R':
    count = count + 1
    if count > cccount:
      cccount = count
  else:
      count = 0
    
print(cccount)
    

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):
vi = 0
j = 0
for s in input():
    j += 1

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

print(i)

i = 0
j = 0
k = 0

w = ""
for s in input():
    j += 1

    if s == "S":
        k += 1

    if s == "S" and i > 0 and j == 2 and w != "R":
        i -= 1

    if s == "R" and (w == "R" or w == ""):
        i += 1
    elif s == "R" and w != s:
        i += 1    
    
    if w == "S":
        i = 1
    
    w = s

if k == 3:
    i = 0

print(i)

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 = max(map(len,input().split(S)))
print(x)

x = max(map(len,input().split("S")))
print(x)


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

q=abs(X)//D
if q>K:
    print(abs(X)-K*D)
else:
    if (K-q)%2==0:
        print(abs(X)-q*D)
    else:
        print(abs(abs(X)-(q+1)*D))

n = input()

if 'RRR' in n:
    print(3)
elif 'RR' in n:
    print(2)
elif 'R' in n:
    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,b,c = input()
count = 0

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

a,b,c = input()
count = 0

if a == "R" and b == "R" and c == "R":
  count = 3
elif (a == "R" and b == "R") or(b == "R" and c == "R"):
  count = 2
elif a == "R"or b =="R" or c == "R":
  count = 1
else:
  count = 0
  
print(count)

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):
l = list(input())
a = 0
b = False
for v in l:
    if v == 'R':
        b = True
    else:
        b = False
        a = 0
        
    if b:
        a += 1

print(a)

l = list(input())
a = False
b = False
c = False


if l[0] == 'R':
	a = True
if l[1] == 'R':
	b = True
if l[2] == 'R':
  	c = True
    
if a and b and c:
  	print(3)
elif (a and b) or (b and c):
  	print(2)
elif a or b or c:
  	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 = list(input())
l = len(s)
rain =int()
for x in range(l):
  if s[x]=="R":
    rain=rain+1
  else:
    rain=0
print(rain)

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

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

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

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

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 = list(map(int, input().split()))
ans = 0
for i in range(n):
    for j in range(i + 1, n):
        for k in range(j + 1, n):
            if l[i] == l[j] or l[j] == l[k] or l[k] == l[i]:
                continue

            else:
                
                if l[i] + l[j] > l[k] and l[j] + l[k] > l[i] and l[k] + l[i] > l[j]:
                    ans += 1
print(ans)


s = list(input())
c = s.count("R")
if c == 3:
    print(3)
elif c == 2 and s[1] != "S":
    print(2)
elif c == 0:
    print(0)
else:
    print(1)


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

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

text = input()
if text[1] == "S":
    if text[0] == "R" or text[2] == "R":
        print(1)
    else:
        print(0)
else:
    if text[0] == "R" and text[2] == "R":
        print(3)
    elif text[0] == "R" or text[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):
A = list(map(input().split()))

cnt = A.conunt('R')
if cnt = 2:
  if A(2) == 'S':
    cnt =1
    

A = input()

cnt = A.count('R')
if cnt == 2:
  ccc = A.find('S')
  if ccc == 1:
    cnt =1

print(cnt)

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 = input().split()
count = 0
for a in range(3)
    if A[a] == 'R':
      count++
      
if count == 2 A[1] == 'S':
      count = 1
print(count)
        

A = input().split()
count = 0
for a in range(3):
    if A[a] == 'R':
      count++
      
if count == 2 A[1] == 'S':
      count = 1
print(count)

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

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 re
s=input()

if s == 'RRR':
  print(3)
elif re.search(s , 'RR'):
  print(2)
elif re.search(s, 'R'):
  print(1)
else:
  print(0)

import re
s=input()

if s == 'RRR':
  print(3)
elif re.search('RR',s):
  print(2)
elif re.search('R',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()
c = 0
for i in S:
        if i == "R":
                c += 1
        else:
                c = 0
print(c)

S = input()
if S == "RRR":
        print(3)
elif S == "SRR" or S == "RRS":
        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):
S = input()
if S == 'RRR':
  print(3)
elif S[:3] == 'RR' or S[1:] == 'RR':
  print(2)
elif S == 'SSS':
  print(0)
else:
  print(1)

wether = input()
if wether == 'SSS':
    print(0)
elif wether == 'RRR':
    print(3)
elif wether[:2] == 'RR' or wether[1:] == 'RR':
    print(2)
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):
# -*- coding: utf-8 -*-

S = input()
z = S.count('R')

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



S = input()

if S == 'RRR':
    print(3)
elif  S == 'RRS' or S == 'SRR':
    print(2)
elif S.count('R') == 1 or S == 'RSR':
    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 "RRR" in a:
  print(3)
  elif "RR" in a:
      print(2)
  elif "R" in a:
      print(1)
  else:
      primt(0)

str1 = input()
str2 = 'R'
str3 = 'RR'
str4 = 'RRR'
ans = 0
if str4 in str1
ans = 3
elif str3 in str1
ans = 2
elif str3 in str1
ans = 2
else
ans=0

print(ans)

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

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

cnt = 0
for i in range(2):
    if s[i] == 'R':
        if s[i+1] == 'R':
            cnt += 1
print(cnt)

s = input()

cnt = 0
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()
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)
 
  

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


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()
RD = weather.count('R')
if RD < 2:
    print(RD)
else:
    if S[1] == 'R':
        print(RD)
    else:
        print(1)

weather = input()
rainyDay = weather.count('R')
if rainyDay < 2:
    print(rainyDay)
else:
    if weather[1] == 'R':
        print(rainyDay)
    else:
        print(1)

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):
num_bars = int(input())
length_list = list(map(int,input().split()))
length_list.sort()
#print(length_list)

count = 0

for i in range(num_bars):
  a = length_list[i]
  for j in range(i + 1,num_bars):
    b = length_list[j]
    if a == b:
      continue
    else :
      for k in range(j + 1,num_bars):
        c = length_list[k]
        if b == c:
          continue
        if a + b <= c:
          continue
        count += 1

        
print(count)
        
#  for j in 


num_bars = 3
length_list = list(map(int,input().split()))

x = abs(length_list[0])
k = length_list[1]
d = length_list[2]

amari =  x % d
syou = x // d

#print(amari)
#print(syou)

val = x

if x - k * d > amari:
  val = x - k * d
elif (k - syou ) % 2 == 0:
  val = amari
else :
  val = d - amari
  
  
print(val)
  
  

s = input()
num = 0
num2 = 0
for i in range (3) :
#  print(s[i])

  yesterday = 'R'
  if s[i] == 'R':
    if yesterday == 'R':
      num2 += 1
    else :
      yesterday = 'R'
  else :
    yesterday = 'S'
    if num2 > num:
      num = num2
      num2 = 0


if num2 > num:
  num = num2


print(num)

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



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]!="R" and s[2]!="R":
         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):
import itertools

X,K,D = map(int,input().split())
L = [D,-D]
comb = list(itertools.combinations_with_replacement(L, K))

for i in range(len(comb)):
  x = X
  for d in comb[i]:
    x = x + d
    if(i == 0):
      x_min = x
    if(abs(x) < abs(x_min)):
      x_min = x

print(abs(x_min))
    
    


import itertools

X,K,D = map(int,input().split())
L = [D,-D]

for comb in itertools.combinations_with_replacement(L, K):
  x = X
  for d in comb:
    x = x + d
    if(i == 0):
      x_min = x
    if(abs(x) < abs(x_min)):
      x_min = x

print(abs(x_min))
    
    


a,b,c = map(str,input().rstrip(""))


if(a=="R" and b == "R" and c == "R"):
  count = 3
  
elif(a=="R" and b == "R" and c == "S"):
  count = 2
elif(a=="R" and b == "S" and c == "S"):
  count = 1
elif(a=="S" and b == "R" and c == "R"):
  count = 2
elif(a=="S" and b == "R" and c == "S"):
  count = 1
elif(a=="S" and b == "S" and c == "R"):
  count = 1
elif(a=="R" and b == "S" and c == "R"):
  count = 1
else:
  count = 0

print(count)
  
  
  
  

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

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

pritn(ans)


s = list(input())

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

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):
str1=input()
ct=0
for i in range(0,3):
  if(str1[i]=='S')
  ct+=1
if(ct==0):
  print(3)
if(ct==3):
  print(0)
if(ct==2):
  print(1)
if(ct==1):
  if(str1[1]=='S'):
    print(1)
  else:
    print(2)

str1=input()
ct=0
for i in range(0,3):
    if(str1[i]=='S'):
        ct+=1
if(ct==0):
    print(3)
if(ct==3):
    print(0)
if(ct==2):
    print(1)
if(ct==1):
    if(str1[1]=='S'):
        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[1]=="R":
  if S[2]=="R":
    if S[3]=="R":
      print(3)
    else:
      print(2)
  else:
    print(1)
elif S[2]=="R":
  if S[3]=="R":
    print(2)
  else:
    print(1)
elif S[3]=="R":
  print(1)
else:
  print(0)

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

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

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

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()
n = 0
for i in range(3):
  if s[i] == 'R':
    n += 1
  else:
    n = 0
print(n)

    

s = input()

if s.count('R') == 3 :
  print(3)
elif s.count('R') == 1:
  print(1)
elif s.count('R') == 0:
  print(0)
elif s.count('R') == 2:
  res = [i for i in range(len(s)) if s.startswith('R', i)]
  if sum(res) == 2:
    print(1)
  else:
    print(2)
  

Verdicts: Wrong Answer

Accepted