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()
sum_ = 0
if s[0] == 'R':
  sum_ += 1
  if s[1] == 'R':
    sum_ += 1
    if s[2] == 'R':
      sum_ += 1
  else:
    sum_ = 1
else:
  if s[1] == 'R':
    sum_ += 1
    if s[2] == 'R':
      sum_ += 1
  else:
    s[2] == 'R':
      sum_ = 1
print(sum_)

s = input()
sum_ = 0
if s[0] == 'R':
  sum_ += 1
  if s[1] == 'R':
    sum_ += 1
    if s[2] == 'R':
      sum_ += 1
  else:
    sum_ = 1
else:
  if s[1] == 'R':
    sum_ += 1
    if s[2] == 'R':
      sum_ += 1
  else:
    if s[2] == 'R':
      sum_ = 1
print(sum_)

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

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

s = input()
ans=0
 

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

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

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

a = input()
if a == "RRR":
  print(3)
elif "RR" in a:
  print(2)
elif a == "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):
s=input();s.count('R')-(s=="RSR")

s=input();print(s.count('R')-(s=="RSR"))

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):
line = input().split()

ans = int(0)

for l in line:
	if l is 'S':
		break
	ans += 1

print(ans)


line = list(input())
ans = int(0)

if line[0] == "R":
	ans += 1
	if line[1] == "R":
		ans += 1
		if line[2] == "R":
			ans+=1
else:
	if line[1] == "R":
		ans += 1
		if line[2] == "R":
			ans+=1
	else:
		if line[2] == "R":
			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):
a = input()
count = 0

for i in range(len(a)):
  if i = 'R':
    count += 1

print(count)

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

a = str(input())

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

a = str(input())

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

Verdicts: Runtime Error

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

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

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


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

n_rainy_day = 0

for i in range(3):
  if S[i] == 'S':
    if n_rainy_day == 0:      
      n_rainy_day += 1
    elif S[i-1] == 'S':
      n_rainy_day += 1
          
print(n_rainy_day)


S = input()

n_rainy_day = 0

for i in range(3):
  if S[i] == 'S':
    n_rainy_day += 1
    
print(n_rainy_day)


S = input()

n_rainy_day = 0

for i in range(3):
  if S[i] == 'R':
    if n_rainy_day == 0:
      n_rainy_day += 1
    elif S[i-1] == 'R':
      n_rainy_day += 1
          
print(n_rainy_day)

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):
ss=input()
if ss[0] == ss[1] ==s[2] = "R":
  print(3)
elif ss[0] == s[1] = "R" or ss[1]==ss[2] = "R" or ss[2] == ss[0] = "R"
  print(2)
elif "R" in ss:
  print(1)
else:
  print(0)

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


ss=input()
if ss[0] == ss[1] ==ss[2] == "R":
  print(3)
elif ss[0] == ss[1] == "R" or ss[1]==ss[2] == "R":
  print(2)
elif "R" in ss:
  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, K, D = [int(x) for x in input().strip().split(" ")]

k, x = divmod(X, D)
if K >= k:
    X = x
    K -= k
    if k % 2 == 0:
        print(abs(X))
    elif X < 0:
        print(abs(X + D))
    else:
        print(abs(X - D))
elif X < 0:
    print(abs(X + D * K))
else:
    print(abs(X - D * K))

S = input().strip()

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("SSS")>=1:
    print(3)
    exit()
if S.count("SS")>=1:
    print(2)
    exit()
if S.count("S")==0:
    print(0)
    exit()
else:
    print(1)


S = input()
if S.count("RRR")>=1:
    print(3)
    exit()
if S.count("RR")>=1:
    print(2)
    exit()
if S.count("R")==0:
    print(0)
    exit()
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)
if S == "RRS"or S == "SRR" :
    print(2)
if S == "SSS":
    print(0)
else:
    print(1)



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



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

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

weather = input()

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

weather = input()

if weather in ["RRR"]:
    print("3")
elif weather in ["SRR","RRS"]:
    print("2")
elif weather in ["SSR","SRS","RSS","RSR"]:
    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):
a=s.count('R')
if a==0:
    print(a)
elif s[1]=='S':
    print(a-1)
else:
    print(a)

s=input()
a=s.count('R')
if a==0:
    print(a)
elif s[1]=='S' and a==2:
    print(a-1)
else:
    print(a)

Verdicts: Runtime Error

Accepted
Problem: We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day.  Find the maximum number of consecutive rainy days in this period.

Submission attempts (in order):
N = int(input())
L = int(input().split())
L2 = set(L) 

ans = 0

for i in len(L2):
  for j in range(i+1, len(L2)):
    for k in range(i+2, len(L2)):
      l = [i, j, k]
      l = sorted(l, reverse = True)
      if l[0] < l[1] + l[2]:
        ans += L.count(i) * L.count(j) * L.count(k)

print(ans)      
    


s = input().replace('R','S')

if s == '':
  print(0)
else:
  print(len(s))

s = input()

ans = 0

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

s = input().split('S')

ans = 0

for i in s:
  if len(i) > ans:
    ans = len(i)
    
print(ans)


Verdicts: Runtime Error

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):
inn = input()
numS = 0
for c in inn:
    if c == 'R':
        numS += 1
if numR != 2:
    print(numR)
else:
    print(1 if inn[1] == 'S' else 2)

inn = input()
numS = 0
for c in inn:
    if c == 'R':
        numS += 1
if numR != 2:
    print(numR)
else:
    print(1 if inn[1] == 'S' else 2);

inn = input()
numR = 0
for c in inn:
    if c == 'R':
        numR += 1
if numR != 2:
    print(numR)
else:
    print(1 if inn[1] == 'S' else 2)

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

xi = abs(x)
if abs(x) > d*k:
  m = min(abs(x+d*k),abs(x-d*k))
else:
  for _ in range(k):
    xi -= d
    if xi < 0:
      m = min(abs(xi),abs(xi+d),abs(xi-d))
      break
print(m)

s = input()

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

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

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


Verdicts: Runtime Error

Accepted
Problem: We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day.  Find the maximum number of consecutive rainy days in this period.

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

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


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):
inp = input()
count=0
res=0
for ch in inp:
  if ch=="R":
    count+=1
  else:
    res=max(res,count)
    count=0
print(count)


count=0 
res=0 
for ch in inp: 
  if ch=="R": 
    count+=1 
    res = max(res,count) 
  else: 
    res=max(res,count) 
    count=0 
print(res)

inp = input()
count=0
res=0
for ch in inp:
  if ch=="R":
    count+=1
  else:
    res=max(res,count)
    count=0
res=max(res,count)
print(count)


inp =input()
count=0 
res=0 
for ch in inp: 
  if ch=="R": 
    count+=1 
    res = max(res,count) 
  else: 
    res=max(res,count) 
    count=0 
print(res)


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):
counter = 0
for i in S:
	if i == 'S':
		counter = 0
	elif i == 'R':
      	counter += 1

print(counter)

counter = 0
for i in S:
  if i == 'S':
    counter = 0
  elif i == 'R':
    counter += 1

return counter


S = input()
max_count = 0
counter = 0
for i in S:
  if i == 'S':
    if max_counter < counter:
      max_count = counter
      counter = 0
  elif i == 'R':
    counter += 1

if max_counter < counter:
  max_count = counter

print(max_counter)


S = input()
counter = 0
for i in S:
  if i == 'S':
    counter = 0
  elif i == 'R':
    counter += 1

print(counter)

counter = 0
for i in S:
	if i == 'S':
		counter = 0
	elif i == 'R':
      	counter += 1

return counter


S = input()
counter = 0
for i in S:
  if i == 'S':
    counter = 0
  elif i == 'R':
    counter += 1

return counter


S = input()
max_count = 0
counter = 0
for i in S:
  if i == 'S':
    if max_count < counter:
      max_count = counter
      counter = 0
  elif i == 'R':
    counter += 1

if max_count < counter:
  max_count = counter

print(max_count)


Verdicts: Runtime Error

Runtime Error

Runtime Error

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

s = input()

r = ["RRS","RRR","RSR","SRR","SSR","RSS","SSS","SRS"]
ra = [2,3,1,2,1,1,0,1]
for i in range(8):
    if r[i] == s:
        print(ra[i])

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

r=0
for i in range(len(string)-1):
  if string[i]=='R' and string[i+1]=='R':
    r+=1
print(r)


string=input()

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


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 = []

for i in range(3):
	L.append(input())

    
c=0
ans=0

for i in range(3):
	if L[i] == 'R':
      if c !=0:
        ans = 1
      else:
      	ans += 1
    if L[i] == 'S':
      c += 1
      
print(ans)
      	



L = []
 
for i in range(3):
	L.append(input())
 
    
c=0
ans=0
 
for i in range(3):
	if L[i] == 'R':
     		 if c != 0:
        			ans = 1
	else:
      		ans += 1

	if L[i] == 'S':
      		c += 1
      
print(ans)



L = []
L.append(input())

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

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

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

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

s = str(input())
if s = "RRR":
  print(3)
if s = "RRS" and s = "SRR":
  print(2)
if s = "RSS" and s = "SRS" and s = "SSR" and s = "RSR":
  print(1)
if s = "SSS":
  print(0)

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

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


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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

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

s = input()
cnt = 0
l =[]
for i in range(3):
    if s[i] == "R":
        cnt += 1
    else:
        l.append(cnt)
        cnt = 0

l.append(cnt)

print(max(l))

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().strip().split('S')
print(max(s, key = len))


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


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


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


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

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()
print(max([len(i) for i in S.split("R")]))

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

Verdicts: Wrong Answer

Accepted
Problem: We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day.  Find the maximum number of consecutive rainy days in this period.

Submission attempts (in order):
import sys

def read_input():
  return sys.stdin.readline().strip().split(' ')

def task(s):
  rainy_til = []
  l = len(s)
  i = 0
  while i < l:
    if s[i] == 'R':
      last_rainy = rainy_til[i-1] if i > 0 else 0
      rainy_til[i] = last_rainy + 1
    else:
      rainy_til[i] = 0
  return max(rainy_til)

def main():
  s = read_input()
  result = task(s)
  print(result)


import sys
 
def read_input():
  return sys.stdin.readline().strip().split(' ')
 
def task(s):
  rainy_til = []
  l = len(s)
  i = 0
  while i < l:
    if s[i] == 'R':
      last_rainy = rainy_til[i-1] if i > 0 else 0
      rainy_til[i] = last_rainy + 1
    else:
      rainy_til[i] = 0
  return max(rainy_til)
 
def main():
  s = read_input()
  result = task(s)
  print(result)

main()


import sys


def read_input():
    return sys.stdin.readline().strip().split(' ')


def task(s):
    rainy_til = []
    l = len(s)
    i = 0
    while i < l:
        if s[i] == 'R':
            last_rainy = rainy_til[i - 1] if i > 0 else 0
            rainy_til.append(last_rainy + 1)
        else:
            rainy_til.append(0)
        i += 1
    return max(rainy_til)


def main():
    [s] = read_input()
    result = task(s)
    print(result)


main()


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day.  Find the maximum number of consecutive rainy days in this period.

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

if s == "S" :
    print('天気が雨である日が連続していた最大の日数を入力せよ')
elif s == "RRR" :
    print(3)
elif s == "RR" :
    print(2)
elif s == "R" :
    print(1)
else :
    print(0)

s = input()

if s == "S" :
    print('天気が雨である日が連続していた最大の日数を入力せよ')
elif s == "RRR" :
    print(3)
elif s == "RRS" or s =="SRR" :
    print(2)
elif s == "SSS" :
    print(0)
else :
    print(1)

Verdicts: Wrong Answer

Accepted
Problem: We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day.  Find the maximum number of consecutive rainy days in this period.

Submission attempts (in order):
N = list(input())

#print(N)

def count(list_1):
    return list_1.count('R')

#print(count(N))

N = list(input())

#print(N)

def count(list_1):
    count_2 = 0
    count_1 = 0
    for a in range(len(list_1)):
        if list_1[a] == 'R':
            count_1 += 1
        else:
            count_1 = 0
        if count_2 < count_1:
            count_2 = count_1
            #print(count_2)
    return count_2

print(count(N))

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()
print("3" if "RRR" in s else "2" if "RR" in s else "1" "R" in s else "0" )

s = input()
print("3" if "RRR" in s else "2" if "RR" in s else "1" if "R" in s else "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 "S" in s:
    ans = 1
if "SS" in s:
    ans = 2
if s == "SSS":
    ans = 3
print(ans)

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

Verdicts: Wrong Answer

Accepted
Problem: We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day.  Find the maximum number of consecutive rainy days in this period.

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

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


S= input()

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


Verdicts: Runtime Error

Accepted
Problem: We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day.  Find the maximum number of consecutive rainy days in this period.

Submission attempts (in order):
def A(S):
    answer = 0

    if S[1] == 'R':
        answer += 1
        if S[0] == 'R':
            answer += 1
        if S[2] == 'R':
            answer += 1
    elif S[0] == 'R' or S[2] == 'R':
        answer = 1

    return answer

  
 print(A(input()))

def A(S):
    answer = 0

    if S[1] == 'R':
        answer += 1
        if S[0] == 'R':
            answer += 1
        if S[2] == 'R':
            answer += 1
    elif S[0] == 'R' or S[2] == 'R':
        answer = 1

    return answer

  
S = input()
print(A(S))

Verdicts: Runtime Error

Accepted
Problem: We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day.  Find the maximum number of consecutive rainy days in this period.

Submission attempts (in order):
import sys
input = sys.stdin.readline
n,K=map(int,input().split())
p=list(map(lambda x:int(x)-1,input().split()))
c=list(map(int,input().split()))
if K == 1:
    print(max(c));exit()
ans = -10**10
def cycle(k):
    mo=k
    clen=0
    cscore=0
    flg = True
    cmax=[-10**10]
    while (mo != k or flg):
        clen+=1
        cscore+=c[mo]
        mo = p[mo]
        cmax.append(max(cmax[-1],cscore))
        if mo == k:
            flg = False
    if cscore<0:
        return cmax[min(K-1,clen-1)]
    return cscore*((K-1)//clen)+cmax[(K-1)%clen+1]
for i in range(n):
    a=cycle(i)
    if a>ans:
        ans = a
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):
c_place, N, distance = [ int(v) for v in input().split(" ") ]

max_distance = distance * N
candidate=[]

#for n in range(1, N):
#  candidate.append(abs(c_place - distance*n))

n = c_place // distance
candidate.append(abs(c_place - distance*n))
candidate.append(abs(c_place - distance*(n+1)))

#print(n, n+1)
#print(candidate)

if c_place > max_distance:
  print(c_place - max_distance)
else:
  if N % (n+1) == 0:
    print(candidate[1])
  else:
    print(min(candidate))

days = input()



result = []

num = 0
for d in days:
  if d == 'R':
    num += 1
  else:
    result.append(num)
    num = 0
result.append(num)

print(max(result))

Verdicts: Runtime Error

Accepted
Problem: We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day.  Find the maximum number of consecutive rainy days in this period.

Submission attempts (in order):
s = input()
if (s = "SSS"):
  print("0")
elif (s = "SSR"):
  print("1")
elif (s = "SRS"):
  print("1")
elif (s = "RSS"):
  print("1")
elif (s = "SRR"):
  print("2")
elif (s = "RSR"):
  print("1")
elif (s = "RRS"):
  print("2")
else:
  print("3")
  

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

Verdicts: 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
max_cnt=0

if S[0] == 'R':
    cnt += 1

for i in range(1,3):
    if S[i] == 'R':
        cnt+=1
        print('i')
    else:
        if cnt > max_cnt:
            max_cnt = cnt
        cnt = 0
        
if S[len(S)-1] == 'R' and max_cnt == 0:
    max_cnt = 1
if cnt > max_cnt:
    max_cnt = cnt
print(max_cnt)

S = input()

cnt = 0
max_cnt=0

if S[0] == 'R':
    cnt += 1

for i in range(1,3):
    if S[i] == 'R':
        cnt+=1
        # print('i')
    else:
        if cnt > max_cnt:
            max_cnt = cnt
        cnt = 0
if cnt > max_cnt:
    max_cnt = cnt        
if S[len(S)-1] == 'R' and max_cnt == 0:
    max_cnt = 1

print(max_cnt)

Verdicts: Wrong Answer

Accepted
Problem: We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day.  Find the maximum number of consecutive rainy days in this period.

Submission attempts (in order):
day=input()
resMax=0
resTemp=0
for i in range(len(day)):
  if day[i]=='S':
    resTemp=0
  elif day[i]=='R':
    while(day[i]!='S'):
      resTemp+=1
      i+=1
  if resMax<resTemp:
    resMax=resTemp
print(resMax)
    

day = input()
resMax = 0
resTemp = 0
for i in range(len(day)):
  if day[i]=='S':
    resTemp=0
  elif day[i]=='R':
    resTemp=0
    while (i<len(day)) and (day[i]!='S'):
      resTemp+=1
      i+=1
    if resTemp>resMax:
      resMax=resTemp
print(resMax)

Verdicts: Runtime Error

Accepted
Problem: We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day.  Find the maximum number of consecutive rainy days in this period.

Submission attempts (in order):
#from functools import lru_cache
import sys
from itertools import product,combinations,accumulate
from functools import reduce,lru_cache
import heapq

def vfunc(f): return lambda *lst, **kwargs: list(map(lambda *x:f(*x,**kwargs),*lst))

def rvfunc(f): return lambda *lst, **kwargs: list(map(lambda *x:rvfunc(f)(*x,**kwargs) if all(vfunc(lambda y:isinstance(y,list))(x)) else f(*x,**kwargs),*lst))

def reader():return vfunc(lambda l:l.split())(sys.stdin.readlines())

s = rvfunc(int)(reader())
n,k=s[0]
p=s[1]
c=s[2]

def pnt(i):
    out = []
    current=i
    for j in range(n):
        current=p[current-1]
        out.append(c[current-1])
    return out
def loc(i):
    out = []
    current=i
    for j in range(n):
        current=p[current-1]
        out.append(current)
    return out
    
def acc(i):    
    p,l=pnt(i),loc(i)
    sp = sum(p)
#    print(p,sp)
    init = l.index(i)
    pini = p[init:]+p[:init]
    last = p[(init+int((k-1)%n))%n]
    plst = p[:last]
    if k+1<n:
        return max(list(accumulate(pini[:k-1])))
    else:
        if sp<0:
            return max(list(accumulate(p)))
        else:
            return max(list(accumulate(p)))+sum(p[:last])+sp*int((k-1)/n)

print(max(vfunc(acc)(range(1,n+1))))


import sys
from itertools import product,combinations
from functools import reduce,lru_cache
import heapq

def vfunc(f): return lambda *lst, **kwargs: list(map(lambda *x:f(*x,**kwargs),*lst))

def rvfunc(f): return lambda *lst, **kwargs: list(map(lambda *x:rvfunc(f)(*x,**kwargs) if all(vfunc(lambda y:isinstance(y,list))(x)) else f(*x,**kwargs),*lst))

def reader():return vfunc(lambda l:l.split())(sys.stdin.readlines())

s=reader()

print(max(vfunc(len)(s[0][0].split('S'))))


Verdicts: Runtime Error

Accepted
Problem: We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day.  Find the maximum number of consecutive rainy days in this period.

Submission attempts (in order):
s=input()
l=list(s)
c=0
for i in range(len(l)):
  if l[i]=='S':
    c=0
  else:
    c+=1
print(c)

l=list(input())
c=0
r=0
for i in range(len(l)):
    if l[i]=="S":
        c=0
    else:
        c+=1
        r=max(r,c)
print(max(c,r))

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()
num=0
for i in s:
    if i=="R":
        num+=1
    elif i!="R":
        num=0
print(num)

s=input()
num=0
a=[0]
for i in s:
    if i=="R":
        num+=1
        a.append(num)
    else:
        num=0
print(max(a))

Verdicts: Wrong Answer

Accepted
Problem: We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day.  Find the maximum number of consecutive rainy days in this period.

Submission attempts (in order):
a=input()
sum=0
for i in a:
  if i=='R'
  sum=sum+1
print (sum)

a=input()
b=[]
for i in f:
  b.append(i)
cons=0
for j in b:
  if j=='R':
    cons=cons+1
print cons

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

    



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 = ("S","S","R")
li = list(S)
count = 0
for num in range(1):
    if li[num] == "R" and li[num+1] == "R" :
        count = count + 1
print(count)

S = input()
li = list(S)
count = 0
re_num = 0
for num in range(3):
    if li[num] == "R" :
        count = count + 1

if count == 0 :
    re_num = 0
elif count == 1 :
    re_num = 1
elif count == 2 and li[2] == "S" :
    re_num = 1
elif count == 2 and li[2] == "R" :
    re_num = 2
else :
    re_num = 3

print(re_num)

S = input()
li = list(S)
count = 0
for num in range(1):
    if li[num] == "R" and li[num+1] == "R" :
        count = count + 1
print(count)

li = list(S)
count = 0
for num in range(1):
    if li[num] == "R" and li[num+1] == "R" :
        count = count + 1
print(count)


def judge(S):
    li = list(S)
    count = 0
    for num in range(1):
        if li[num] == "R" and li[num+1] == "R" :
            count = count + 1
    print(count)

judge(S)

X = int(input())
K = int(input())
D = int(input())
loc = 0
lis = []

def calucu_min(X,K,D):
    for num in range(K) :
        lis.append( abs(abs(2 *D *num -K *D) - abs(X)))
        lis_unique = set(lis)
        print (max(lis_unique))

calucu_min(X,K,D)

X = int(input())
K = int(input())
D = int(input())
loc = 0
lis = []

def calucu_min(X,K,D):
    for num in range(K) :
        lis.append( abs(abs(2 *D *num -K *D) - abs(X)))
        lis_unique = set(lis)
    print (min(lis_unique))

calucu_min(X,K,D)

S = input()
li = list(S)
count = 0
for num in range(1):
    if li[num] == "R" and li[num+1] == "R" :
        count = count + 1
print(count)

S = input()
li = list(S)
count = 0
for num in range(1):
    if li[num] == "R" and li[num+1] == "R" :
        count = count + 1
print(count)

X = int(input())
K = int(input())
D = int(input())
loc = 0
lis = []

def calucu_min(X,K,D):
    for num in range(K) :
        lis.append( abs(abs(2 *D *num -K *D) - abs(X)))
        lis_unique = set(lis)
    print (min(lis_unique))

calucu_min(X,K,D)

S = input()
li = list(S)
count = 0
re_num = 0
for num in range(2):
    if li[num] = "R" :
        count = count + 1

if count = 0 :
    re_num = 0
elif count = 1 :
    re_num = 1
elif count = 2 and li[2] = "S" :
    re_num = 1
elif count = 2 and li[2] = "R" :
    re_num = 2
else re_num = 3

print(re_num)

S = input()
li = list(S)
count = 0
re_num = 0
for num in range(3):
    if li[num] == "R" :
        count = count + 1

if count == 0 :
    re_num = 0
elif count == 1 :
    re_num = 1
elif count == 2 and li[1] == "S" :
    re_num = 1
elif count == 2 and li[1] == "R" :
    re_num = 2
else :
    re_num = 3

print(re_num)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

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

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

Verdicts: 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_d = 0
for s in S:
    if s == 'R':
        rain_d += 1
    elif s == 'S':
        rain_d = 0
print(rain_d)


S = input()
rain_d = 0
max_rain_d = 0
for s in S:
    if s == 'R':
        rain_d += 1
        max_rain_d = rain_d
    elif s == 'S':
        rain_d = 0
print(max_rain_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 = str(input())
ans = 0
if(s[0]=="R"):
  if(s[1]=="R"):
    if(s[2]=="R"):
      ans = 3
    else:
      ans = 2
  else:
    ans = 1
else:
  if(s[1]=="R"):
    if(s[2]=="R"):
      ans = 2
    else:
      ans = 1
  else:
    ans = 0

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


s = str(input())
ans = 0
if(s[0]=="R"):
  if(s[1]=="R"):
    if(s[2]=="R"):
      ans = 3
    else:
      ans = 2
  else:
    ans = 1
else:
  if(s[1]=="R"):
    if(s[2]=="R"):
      ans = 2
    else:
      ans = 1
  else:
    if(s[2]=="R"):
      ans = 1
    else:
      ans = 0
print(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().split()
count = 0
for i in s:
  if 'R' == i:
    count += 1

print(count)

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

Verdicts: Wrong Answer

Accepted
Problem: We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day.  Find the maximum number of consecutive rainy days in this period.

Submission attempts (in order):
if l == 'SSS':
	print(0)

elif l == 'SSR' or l == 'RSS' or l == 'SRS' or l == 'RSR':
	print(1)

elif l == 'SRR' or l == 'RRS':
	print(2)
  
elif l == 'RRR':
	print(3)

l = input()

if l == 'SSS':
	print(0)

elif l == 'SSR' or l == 'RSS' or l == 'SRS' or l == 'RSR':
	print(1)

elif l == 'SRR' or l == 'RRS':
	print(2)
  
elif l == 'RRR':
	print(3)

Verdicts: Runtime Error

Accepted