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

if "RRR" in S:
  print(3)
else "RR" in S:
  print(2)
else "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):
X,K,D = map(int,input().split())
X = abs(X)

if X > K*D:
    ans = X - K*D

else:
    while X >= 0 :
        X = X - D
        K -= 1
    if K % 2 == 0:
        ans = abs(X)
    if K % 2 != 0:
        ans = X+D

print(ans)

X,K,D = map(int,input().split())
X = abs(X)

if X > K*D:
    ans = X - K*D

else:
    while X >= 0 :
        X = X - D
        K -= 1
    if K % 2 == 0:
        ans = abs(X)
    else:
        ans = X+D

print(ans)

S = input()
s = list(S)
if S == "RSR":
    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):
i = input()


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


i = input()


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


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

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()))
count=0
for i in range (n-2):
    for j in range (i+1,n-1):
        if l[i]==l[j]:
            continue
        l[i]+l[j]
        for k in range (j+1,n):
            if l[k]==l[i] or l[k]==l[l]:
                continue
            if l[k]<l[i]+l[j] and l[i]<l[j]+l[k] and l[j]<l[k]+l[i] :
                count+=1
print(count)
    


m=input()
s=list(m)
a=[]
n=len(s)
j=0
while (j<n):
    x=0
    if s[j] == 'R':
        y=j+1
        for k in range (j,n):
            y=k+1
            if s[k]=='S':
                y=k+1
                break
            else:
                x+=1
        a.append(x)
        j=y

    else:
        j+=1

a.sort(reverse=True)
if len(a)==0:
    print (0)
else:
    print(a[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):
str = str(input())
print(str)
if str == "RRR":
  print(3)
elif str == "RRS" or str=="SRR":
  print(2)
elif str == "SSS":
  print(0)
else:
  print(1)




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




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




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

min_pos = x % d
min_neg = min_pos - d

num_to_min_pos = x // d
if k <= num_to_min_pos:
    print(x - d * k)
    
else:
    if (k - num_to_min_pos) % 2 == 0:
        print(min_pos)
    else:
        print(abs(min_neg))


import re
s = input()
array = re.split(r'S+', s)
print(max([len(e) for e in array]))

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):
mozi = input()
if mozi == 'SSS':
    print(3)
if mozi == 'SSR':
    print(2)
if mozi == 'RSS':
    print(2)
if mozi == 'SRR':
    print(1)
if mozi == 'RSR':
    print(1)
if mozi == 'RRS':
    print(1)
else:
    print(0)

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

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


for i in S:
    if i == "R":
        cnt += 1
    else:
        cnt = 0


print(cnt)


S = input()

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


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)
m= min(k,x//d)
x -= m*d
k -= m
if k%2:
  x = abs(x-d)
print(x)

x,k,d = map(int, input().split())
x = abs(x)
m = min(k,x//d)
x -= m*d
k -= m
if k%2: x = abs(x-d)
print(x)

s = input()
for i in ['RRR','RR','R']:
    if i in s:
        print(len(i));break
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()

if s=="RRR":
  print(3)
elif s=="RRS" or s=="SRR":
  print(2)
elif s=="SSR" or s=="SRS" or s=="RSS" 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=="SSR" or s=="SRS" or s=="RSS" or s=="RSR":
  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.count("R"):
    if s.count("RR"):
        if s.count("RRR"):
            print(3)
        else:
            print(2)
    else:
        print(1)
print(0)


s = input()
if s.count("R"):
    if s.count("RR"):
        if s.count("RRR"):
            print(3)
        else:
            print(2)
    else:
        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=="RRR":
    print(3)
elif s="RR":
    print(2)
elif s="R":
    print(1)
else: print(0)


s=input()
if s=="RRR":
    print(3)
elif s=="RR":
    print(2)
elif s=="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

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

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

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

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


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


code = input()

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

x, y ,z = input()
if  x == "S" and y == "S" and z == "S":
    print(0)
elif x =="S" and y=="R" and z=="R":
    print(2)
elif x=="R" and y=="R" and z=="S":
    print(2)
elif x=="R" and y=="R" and z=="R":
    print(3)
else:
    print(1)
    

Verdicts: Runtime Error

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):
import sys
X, K, D = map(int,input().split())
cnt = 0
a = X
b = 0
tmp = 0
if X >= K*D:
  print(X - K*D)
  sys.exit()
if K % 2 == 0:
  tmp = int(X/D)
  if tmp% 2 == 0:
    a = X - D*tmp
  else:
    a = X - D*tmp + D
  b = a - D*2
else:
  tmp = int(X/D)
  if tmp% 2 == 1:
    a = X - D*tmp
  else:
    a = X - D*tmp + D
  b = a - D*2
print(min(abs(a),abs(b)))


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

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

print(ans)

S = input()
ans = 0

if S == 'RSR':
    ans = 1
else:
    ans = S.count('R')

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()
rain = 0
ans = 0
for i in s:
  if i == "R":
    rain += 1
    ans = max(ans, rain)
  else:
    rain = 0
print(rain)

s = input()
rain = 0
ans = 0
for i in s:
  if i == "R":
    rain += 1
    ans = max(ans, rain)
  else:
    rain = 0
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):
n = input()
    if n == "RRR":
        print("3")
    elif n[:2] == "RR" or n[1:] == "RR":
        print("2")
    elif n=="SSS":
        print("0")
    else:
        print("1")

n = input()
if n == "RRR":
    print("3")
elif n[:2] == "RR" or n[1:] == "RR":
    print("2")
elif n=="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()

for i in range(1, 4):
  c = "R" * i
  if c in s:
    ans = c
    
print(ans)
  


s = list(input())

for i in range(1, 4):
  c = "R" * i
  if c in s:
    ans = c
    
print(ans)
  

S = list(input())

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

s = list(input())
ans = 0

for i in range(1, 4):
  c = "R" * i
  if c in s:
    ans = c
    
print(ans)
  


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

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):
S = input()
if S = "RRR":
  print(3)
elif "RR" in S:
  print(2)
elif "R" in S:
  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: 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("RRR") == 1 :
    print("3")
elif S.count("RRR") == 1 :
    print("2")
else :
    if S.count("R") >= 1 :
        print("1")
    else :
        print("0")

S = input()

if S.count("RRR") == 1 :
    print("3")
elif S.count("RR") == 1 :
    print("2")
else :
    if S.count("R") >= 1 :
        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, C, k = list(map(int, input().split()))
items = [list(map(int, input().split())) for _ in range(k)]

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

item_values = [[0 for _ in range(C+1+1)] for _ in range(R+1+1)]

for item in items:
    item_values[item[0]][item[1]] = item[2]

for r in range(1, R+1):
    for c in range(1, C+1):
        value_here = item_values[r][c]

        if value_here == 0:
            dp[r][c][0] = max(
                dp[r][c-1][0],
                max(dp[r-1][c])
            )
            dp[r][c][1] = dp[r][c-1][1]
            dp[r][c][2] = dp[r][c-1][2]
            dp[r][c][3] = dp[r][c-1][3]
        
        else:
            dp[r][c][0] = max(
                dp[r][c-1][0],
                max(dp[r-1][c])
            )
            dp[r][c][1] = max([
                dp[r][c-1][1],
                dp[r][c-1][0] + value_here,
                max(dp[r-1][c]) + value_here
            ])

            dp[r][c][2] = max(dp[r][c-1][2], dp[r][c-1][1] + value_here)
            dp[r][c][3] = max(dp[r][c-1][3], dp[r][c-1][2] + value_here)
            
print(max(dp[R][C]))

# print(dp)


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()
count=0
for i in s:
    if i =='S':
        count+=1
print(count)
        

s=input()
count=0
m=0
for i in range(len(s)):
    if s[i]=='R':
        count+=1
    else:
        if count > m :
            m=count
        count=0
if count>m:
  m=count
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):
import sys
input = sys.stdin.readline
def main():
    S = input().rstrip()
    CNT = 0
    ans = 0
    for c in S:
        if c == 'R':
            CNT += 1
        else:
            ans = max(ans,CNT)
            CNT = 0
    print(ans)


if __name__ == '__main__':
    main)

import sys
input = sys.stdin.readline
def main():
    S = input().rstrip()
    CNT = 0
    ans = 0
    for c in S:
        if c == 'R':
            CNT += 1
        else:
            ans = max(ans,CNT)
            CNT = 0

    ans = max(ans,CNT)
    print(ans)


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

list = list(s)
cnt=0
if list(0) == 'R' and list(1) == 'R' and list(2)=='R':
    print(3)
elif list(0)=='R' and list(1) == 'R'and list(2)!='R':
    print(2)
elif list(0)=='R' and list(1) != 'R'and list(2)!='R':
    print(1)
elif list(0)=='R' and list(1) != 'R'and list(2)=='R':
    print(1)
elif list(0)!='R' and list(1) == 'R' and list(2)=='R':
    print(2)
elif list(0)!='R' and list(1) != 'R' and list(2)=='R':
    print(1)
elif list(0)!='R' and list(1) == 'R' and list(2)!='R':
    print(1)
else:
    print(0)

s=input()

list = list(s)
cnt=0
if list[0] == 'R' and list[1] == 'R' and list[2]=='R':
    print(3)
elif list[0]=='R' and list[1] == 'R'and list[2]!='R':
    print(2)
elif list[0]=='R' and list[1] != 'R'and list[2]!='R':
    print(1)
elif list[0]=='R' and list[1] != 'R'and list[2]=='R':
    print(1)
elif list[0]!='R' and list[1] == 'R' and list[2]=='R':
    print(2)
elif list[0]!='R' and list[1] != 'R' and list[2]=='R':
    print(1)
elif list[0]!='R' and list[1] == 'R' and list[2]!='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):
a = input(str)

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

a = input()

if a[0]=='R' and a[1]=='R' and a[2]=='R':
  res = 3
elif  a[0]=='R' and a[1]=='R':
  res = 2
elif  a[1]=='R' and a[2]=='R':
  res = 2  
elif  a[0]=='R':
  res = 1
elif  a[1]=='R':
  res = 1
elif  a[2]=='R':
  res = 1 
else:
  res = 0

res = int(res)
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):
s=input()
c=0
tmp=0
for i in range(3):
    if s[i]=='s':
        tmp+=1
        if c<tmp:
            c=tmp
    else:
        tmp=0
print(c)

s=input()
c=0
tmp=0
for i in range(3):
    if s[i]='s':
        tmp+=1
        if c<tmp:
            c=tmp
    else:
        tmp=0
print(c)

s=input()
c=0
tmp=0
for i in range(3):
    if s[i]='S':
        tmp+=1
        if c<tmp:
            c=tmp
    else:
        tmp=0
print(c)

s=input()
c=0
tmp=0
for i in range(3):
    if s[i]=='R':
        tmp+=1
        if c<tmp:
            c=tmp
    else:
        tmp=0
print(c)

Verdicts: Wrong Answer

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 ("RRR" in s):
  print(3)
if ("RR" in s):
  print(2)
if ("R" in s):
  print(3)
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):
cnt = 0
t = list(input())
for i in range(len(t)):
    print(len(t))
    if i == 1:
        if t[i] == "R":
            cnt += 1
    if i != 1:
        if t[i] == "R" and t[i-1] == "R":
            cnt += 1
        if t[i] == "R" and t[i-1] == "S":
            cnt = 1
        else:
            cnt = 0
print(cnt)

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

cnt = 0
t = list(input())
for i in range(len(t)):
    if "R" * i in t:
        cnt = i
print(cnt)


cnt = 0
t = list(input())
for i in range(len(t)):
    if "R" * (i + 1) in t:
        cnt = i + 1
print(cnt)

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

cnt = 0
t = input()
for i in range(len(t)):
    if "R" * (i + 1) in t:
        print(cnt)
        cnt = i + 1
print(cnt)


cnt = 0
t = input()
for i in range(len(t)):
    if "R" * (i + 1) in t:

        cnt = i + 1
print(cnt)

Verdicts: Wrong Answer

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, K = map(int, input().split())
P = list(map(int, input().split()))
C = list(map(int, input().split()))
 
ans = -float('inf')
for s in range(N):
    S = [] 
    i = P[s] - 1
    S.append(C[i])
    while i != s:
        i = P[i] - 1
        S.append(S[-1] + C[i])
 
    if K <= len(S):
        score = max(S[:K])
    elif S[-1] <= 0:
        score = max(S)
    else:
        score1 = S[-1] * (K // len(S) - 1)
        score1 += max(S)
        score2 = S[-1] * (K // len(S))
        r = K % len(S)
        if r != 0:
            score2 += max(0, max(S[:r]))
        score = max(score1, score2)
 
    ans = max(ans, score)
 
print(ans)


data = input()

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

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

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

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

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

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):
for r in S:
  if rrr in S:
    return(3)
  elif rr in S:
    return(2)
  elif: r in S:
    return(1)
  else:
    return(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):
x, k, d = map(int, input().split(" "))

def y(l): return abs(x + l * d - (k - l) * d)

lf = max(0, (k - x / d) / 2)
l = int(lf)
if lf - l > 0 and l + 1 <= k:
    print(min(y(l), y(l + 1)))
else:
    print(y(l))


print({
    "SSS": 0,
    "SSR": 1,
    "SRS": 1,
    "SRR": 2,
    "RSS": 1,
    "RSR": 1,
    "RRS": 2,
    "RRR": 3,
}[input()])


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):
n = 0
S = Input()
for i in range(0,len(S)):
    if i==0:
        if S[i]=="R":
            n += 1
    if i==1:
        if S[i]=="R":
            n += 1
        else:
            n = 0
    if i==2:
        if S[i]=="R":
            n += 1
        else:
            continue
print(n)

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

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

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):
#A - Rainy Season
Si = []
Si = str(input())
i = 0
if Si[0] == 'R': 
    i = 1
if Si[1] == 'R': 
    i = 1
if Si[2] == 'R': 
    i = 1
if Si[0:1] == 'RR': 
    i = 2
if Si[1:2] == 'RR': 
    i = 2
if Si[0:2] == 'RRR': 
    i = 3


print(i)

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

print(i)

#A - Rainy Season
Si = []
Si = str(input())
i = 0
if Si[0] == 'R': 
    i == 1
if Si[1] == 'R': 
    i == 1
if Si[2] == 'R': 
    i == 1
if Si[0:1] == 'RR': 
    i == 2
if Si[0:1] == 'RR': 
    i == 2
if Si[1:2] == 'RR': 
    i == 2
if Si[0:2] == 'RRR': 
    i == 3


print(i)

#A - Rainy Season
Si = []
Si = list(str(input()))
i = 0
if Si == ['S','S','S']: i = 0
if Si == ['R','S','S']: i = 1
if Si == ['S','R','S']: i = 1
if Si == ['S','S','R']: i = 1
if Si == ['R','R','S']: i = 2
if Si == ['S','R','R']: i = 2
if Si == ['R','S','R']: i = 1
if Si == ['R','R','R']: i = 3

print(i)


Verdicts: 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):
x, k, d = map(int, input().split())
if (x - k*d > 0 and x > 0) or (x + k*d < 0 and x < 0):
    print(abs(x) - k*d )
else:
    if x % d == 0:
        if ((x/d) % 2) == (k % 2):
            print(0)
        else:
            print(d)
    else:
        y = abs(x)
        if (y % d < d - (y % d) and ((y - (y % d)) / d) % 2 == k % 2) or (y % d > d - (y % d) and ((y - (y % d)) / d) % 2 != k % 2):
            print(y % d)
        else:
            print(d - (y % d))
            

t = input()
if (abs(len(t))<=3) and (t in 'S' or 'R'):
    if t[0]=='R' and t[1]=='R' and t[2]=='R':
        print(3)
    elif (t[0]=='R' and t[1]=='R' and t[2]!='R') or (t[0]!='R' and t[1]=='R' and t[2]=='R'):
        print(2)
    elif t[0]!='R' and t[1]!='R' and t[2]!='R':
        print(0)
    else:
        print(1)
else:
    print('false')

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

S = input()

c = 0
max = 0

for i in S:
  if i==R:
    c += 1
  else:
    max = max([c, max])
    c = 1
    
print(max)

def main():
    N, K = list(map(int, input().split()))
    P = list(map(int, input().split()))
    C = list(map(int, input().split()))

    max_score = max(C)
    score = C
    P_now = P
    P_ci = P
    for _ in range(K-1):
        score = [score[i]+C[num-1] for i, num in enumerate(P_now)]
        if max_score < max(score):
            max_score = max(score)
            P_ci = P_now
        P_now = [P[i-1] for i in P_now]
        if P_ci == P_now:
            break
    print(max_score)

if __name__ == "__main__":
    main()

S = input()
a = 0
for i in range(3):
  if S[i]=="R":
    a+=1
  if S[i]=="S" and a>0:
      break
print(a)

Verdicts: Wrong Answer

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):
from collections import Counter
from numba import njit

@njit
def solve(S, C):
    if C["R"] == 3:
        print(3)
    elif C["R"] == 2:
        if S[1] == "S":
            print(1)
        else:
            print(2)
    elif C["R"] == 1:
        print(1)
    else:
        print(0)

def main():
    S = input()
    C = Counter(S)
    solve(S,C)
    
if __name__ == '__main__':
    main()


from collections import Counter
def main():
    S = input()
    C = Counter(S)
    if C["R"] == 3:
        print(3)
    elif C["R"] == 2:
        if S[1] == "S":
            print(1)
        else:
            print(2)
    elif C["R"] == 1:
        print(1)
    else:
        print(0)
        
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):
user = input()
count = 0
for i in user:
    if i == 'R':
        count += 1
        if count == 2:
            if user[0] == user[2]:
                count = 1
            else:
                count = 2
        else:
            count
    elif i == 'S':
        count = 0
print(count)
        
        

user = str(input())
count = 0
for i in user:
    if i == 'R':
        count += 1
    else:
        count
if count == 3:
        count
elif count == 2:
    if user[0] == user[2]:
        count = 1
    else:
        count = 2
else:
    count = count
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):
w = list(input().split())

if w == ["rsr"]:
    print(1)

else:
    print(w.count("r"))

w = list(input().split())

if w == ["RSR"]:
    print(1)

else:
    print(w.count("R"))

w = input()

if w == "RSR":
    print(1)

else:
    print(w.count("R"))

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

for i in range(1,4):
  p = "R"*i
  if p in s:
    ans = i
print(i+1)

s = map(input().split())
ans = 0

for i in range(3):
  p = "R"*i
  if p in s:
    ans = i
print(ans)

s = map(input().split())
ans=0

for i in range(3):
  n = i*s
  if n in s:
    print(i)

s = input()
ans = 0

for i in range(1,4):
  p = "R"*i
  if p in s:
    ans = i
print(ans)

Verdicts: Wrong Answer

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

S = raw_input()
print(max(map(len, S.split('S'))))

S = input()
print(max(map(len, S.split('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):
S = list(input())
X = 0
if S[1] == "R":
    if S[0] == S[1] or S[1] == S[2]:
        if S[0] == "R" and S[2] == "R":
            X = 2
        else:
            X = 1
print(X)

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

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

s=input()
n=len(s)
c=0
li=[]
for i in range(n):
  if(s[i]=='R'):
    c=c+1
  else:
    li.append(c)
    c=0
li.append(c)
print(max(li))

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 "RRR" in s: ans = 3
elif "RR" in s: ans = 2
else "R" 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: 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()

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

str = input()

if 'RRR' in str:
  print(3)
elif 'RR' in str:
  print(2)
elif 'R' in str:
  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):
print(sum(input() in "R"*i for i in range(3)))

s=input();print(sum("R"*i in s for i in range(1,4)))

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 Counter


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


s = S()
ans = 0
if 'R' not in s:
    ans = 0
else:
    c = Counter(list(s))
    if c['R'] == 1:
        ans = 1
    else:
        if s[:2] == 'RR' or s[1:] == 'RR':
            ans = 2
        if s == 'RRR':
            ans = 3
        else:
            ans = 1

print(ans)


import sys
from collections import Counter


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


s = S()

if s == 'RRR':
    ans = 3
elif s[:2] == 'RR' or s[1:] == 'RR':
    ans = 2
else:
    c = Counter(list(s))
    if c['R'] == 1:
        ans = 1
    elif c['S'] == 3:
        ans = 0
    else:
        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()
Sc=S.count("R")
SSc=S.count("RR")
if Sc==3:
  print(3)
elif SSc=1:
  print(2)
elif Sc==0:
  print(0)
else:
  print(1)

S=input()
Sc=S.count("R")
SSc=S.count("RR")
if Sc==3:
  print(3)
elif SSc==1:
  print(2)
elif Sc==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):
s = input()
if s[0]=='R':
  if s[1]=='R':
    if s[2]=='R':
      print(3)
    else:
      print(2)
  else:
    print(1)
elif s[0]=='S':
  if s[1]=='R':
    if s[2]=='R':
      print(2)
    else:
      print(1)
  elif:
    if s[2]=='R':
      print(1)
    else:
      print(0)

s = input()
if s[0]=='R':
  if s[1]=='R':
    if s[2]=='R':
      print(3)
    else:
      print(2)
  else:
    print(1)
elif s[0]=='S':
  if s[1]=='R':
    if s[2]=='R':
      print(2)
    else:
      print(1)
  else:
    if s[2]=='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 = intput()
if s == "RRR":
  print(3)

elif s == "SRR" or s == "RSS":
  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)

s = input()

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

renzoku=0
mae="S"
for i in a:
  if i=="R":
    if mae=="R":
      renzoku+=1
    else:
      mae="R"
print(renzoku)
    

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

Verdicts: Wrong Answer

Accepted