problem_id
stringclasses
100 values
submission_id
stringlengths
10
10
status
stringclasses
2 values
code
stringlengths
6
806
p02582
s580824375
Accepted
weather = input() rainy_count = 0 max_rainy_count = 0 for i in range(3): if weather[i] == "R": rainy_count += 1 if max_rainy_count < rainy_count: max_rainy_count = rainy_count else: rainy_count = 0 print(max_rainy_count)
p02582
s011764741
Accepted
N = input() if N == "RRR": print(3) elif N == "SSS": print(0) elif N == "SRR": print(2) elif N == "RRS": print(2) else: print(1)
p02582
s135859300
Accepted
s = input() c = 0 r = 0 for i in range(3): if s[i] == 'R': c += 1 if r < c: r = c else: c = 0 print(r)
p02582
s576366628
Accepted
S = input() if S[0] == "R": if S[1] == "S": print("1") else: if S[2] == "R": print(3) else: print(2) else: if S[1] == "R": if S[2] == "S": print(1) else: print(2) else: if S[2] == "R": print(1) else: print(0)
p02582
s521319006
Accepted
s = input() if s[0] == s[1] == s[2] == "R": ans = 3 elif s[0] ==s[1] =="R" or s[1] ==s[2] =="R": ans = 2 elif "R" in s: ans = 1 else: ans = 0 print(ans)
p02582
s266544813
Accepted
s = input() r = 0 ans = 0 for i in s: if i == 'R': r += 1 else: ans = max(ans, r) r = 0 ans = max(ans, r) print(ans)
p02582
s562238191
Accepted
S = input() ws = [S[0],S[1],S[2]] max_count = 0 count = 0 for w in ws: if w == "R": count += 1 max_count = max(count, max_count) else: count = 0 print(max_count)
p02582
s241522386
Accepted
import sys input = sys.stdin.readline def print_ans(S): """Test Case >>> print_ans("RRS") 2 >>> print_ans("SSS") 0 >>> print_ans("RSR") 1 """ count = 0 maximum = 0 for a in S: if a == "R": count += 1 else: count = 0 maximum = max(count, maximum) print(maximum) if __name__ == '__main__': S = input().rstrip() print_ans(S)
p02582
s632426835
Accepted
s = input() if 'RRR' in s: print(3) elif 'RR' in s: print(2) elif 'R' in s: print(1) else: print(0)
p02582
s748089669
Accepted
s = input() cnt = 0 R_max = 0 for mozi in s: if mozi == "R": cnt+= 1 else: R_max = max(cnt,R_max) cnt = 0 R_max = max(cnt,R_max) print(R_max)
p02582
s914576982
Accepted
def resolve(): S = input() cnt = S.count("R") if cnt == 2 and S[1]=="S": print(1) else: print(cnt) if '__main__' == __name__: resolve()
p02582
s164315754
Accepted
def main(): s = input() maxren = 0 ren = 0 for c in s: if c == "R": ren += 1 maxren = max(maxren, ren) else: ren = 0 print(maxren) main()
p02582
s945721558
Accepted
s = input("") Scnt = 0 Smem = 0 for i in range(len(s)): if s[i] == "S": Scnt += 1 Smem = i if Scnt == 3: print(0) elif Scnt == 2: print(1) elif Scnt == 0: print(3) elif Scnt == 1 and Smem == 1: print(1) elif Scnt == 1 and Smem != 1: print(2)
p02582
s106938981
Accepted
a=input() con=0 count=0 for i in range(3): if a[i]=='R' and i==2: count+=1 con=max(con,count) elif a[i]=='R': count+=1 else: con=max(con,count) count=0 print(con)
p02582
s536638326
Accepted
s = input() answer = 0 count = 0 for i in range(len(s)): if s[i] == "R": count += 1 if i == len(s)-1 : if count > answer : answer = count else : if count > answer : answer = count count = 0 print(answer)
p02582
s349434298
Accepted
w=list(input()) if not "R" in w: print(0) elif not "S" in w: print(3) else: if w[1]=="R" and (w[0]=="R" or w[2]=="R"): print(2) else: print(1)
p02582
s891573325
Accepted
s = str(input()) ans = 0 num = 0 for i in range(len(s)): if s[i] == "R": num += 1 else: ans = max(ans,num) num = 0 print(max(ans,num))
p02582
s803174274
Accepted
s = input() sc = s.count('S') if sc == 0: print(3) if sc == 2: print(1) if sc == 3: print(0) if sc == 1: if s[1] == 'S': print(1) else: print(2)
p02582
s098702138
Accepted
s=input() if s=="RRR": print(3) elif s=="RRS": print(2) elif s=="SRR": print(2) elif s=="SSS": print(0) else: print(1)
p02582
s479869977
Accepted
s = input() ans = 0 if s == "RRR": ans = 3 elif s == "SSS": ans = 0 elif s == "RRS" or s == "SRR": ans = 2 else: ans = 1 print(ans)
p02582
s723416006
Accepted
import sys readline = sys.stdin.readline S = readline().strip() ans = 0 con = 0 for i in range(3): if S[i] == "R": con += 1 if con > ans: ans = con else: con = 0 print(ans)
p02582
s930273169
Accepted
s = input() if s.count("R")==2 and s[1]=="S": print(s.count("R")-1) else: print(s.count("R"))
p02582
s815338075
Accepted
import sys import math import itertools import bisect from copy import copy from collections import deque,Counter from decimal import Decimal def s(): return input() def i(): return int(input()) def S(): return input().split() def I(): return map(int,input().split()) def L(): return list(input().split()) def l(): return list(map(int,input().split())) def lcm(a,b): return a*b//math.gcd(a,b) sys.setrecursionlimit(10 ** 9) INF = 10**9 mod = 10**9+7 S = s() if 'R' not in S: ans = 0 else: ans = 1 for i in range(2): if S[i] == S[i+1] == 'R': ans = 2 if 'S' not in S: ans = 3 print(ans)
p02582
s520170072
Accepted
s=str(input()) if s.count("RRR")==1: print(3) elif s.count("RR")==1: print(2) elif s.count("R")>=1: print(1) else: print(0)
p02582
s015499392
Accepted
s = list(input()) count = 1 for i in range(len(s)-1): if s.count("R") == 0: count = 0 elif s[i] == "R" and s[i+1] == "R": count += 1 print(count)
p02582
s203766346
Accepted
S=input() s=[input() for i in range(0,0)] a=S.count('RRR') b=S.count('RR') c=S.count('R') if a==1: x=3 else: if b==1: x=2 elif c!=0: x=1 else: x=0 print(x)
p02582
s969849293
Accepted
s = input() if s == "SSS": print(0) elif s == "SSR" or s == "SRS" or s == "RSS" or s == "RSR": print(1) elif s == "SRR" or s == "RRS": print(2) else: print(3)
p02582
s933177853
Accepted
S = input() if "RRR" in S: print(3) elif "RR" in S: print(2) elif "R" in S: print(1) else: print(0)
p02582
s747188811
Accepted
weather = input() seq = 0 prev = False for i in range(3): if weather[i] == 'R': if prev: seq += 1 prev = True else: seq = 1 prev = True else: prev = False print(seq)
p02582
s985392844
Accepted
#!/usr/bin/env python3 S = input() if S=='RRR': print(3) elif S=='RRS' or S=='SRR': print(2) elif S.count('R') == 1 or S=='RSR': print(1) else: print(0)
p02582
s301691949
Accepted
s = input() record = list(s) n = 0 high_score = 0 yesterday = ' ' for today in record : if today == 'R': if yesterday == 'R' : n += 1 else : n = 1 if high_score < n : high_score = n yesterday = today print(high_score)
p02582
s622653690
Accepted
#!/usr/bin/env python3 s = input() if s == 'RRR': print(3) exit() elif s == 'RRS' or s == 'SRR': print(2) exit() elif s == 'RSR' or s == 'SRS' or s == 'RSS' or s == 'SSR': print(1) exit() else: print(0) exit()
p02582
s220450652
Accepted
s = input() if s[0] == s[1] == s[2] == 'R': print(3) elif s[0] == s[1] == 'R' or s[1] == s[2] == 'R': print(2) elif s[0] == 'R' or s[1] == 'R' or s[2] == 'R': print(1) else: print(0)
p02582
s285624934
Accepted
s=input() arr=[] for i in s: arr.append(i) brr=[] count=0 for i in arr: if(i=='S'): brr.append(count) count=0 if(i=='R'): count=count+1 brr.append(count) print(max(brr))
p02582
s555705799
Accepted
#coding:utf-8 s = str(input()) count = 0 ans = 0 for i in s: if i == "R": count += 1 elif i == "S": count = 0 ans = max(ans,count) print("{}".format(ans))
p02582
s743630966
Accepted
s = input() answer = 0 current = 0 for ch in s: if ch == "R": current += 1 else: current = 0 answer = max(answer, current) print(answer)
p02582
s595633439
Accepted
# A - Rainy Season s = input() for p in ('RRR', 'RR', 'R', ''): if p in s: print(len(p)) exit()
p02582
s414801094
Accepted
S = str(input()) ans = 0 if 'R' in S: ans = 1 if 'RR' in S: ans = 2 if 'RRR' in S: ans = 3 print(ans)
p02582
s678368003
Accepted
s = input("") n = 0 if s[0] == "R": if s[1] == "R": if s[2] == "R": n = 3 else: n = 2 else: n = 1 elif s[1] == "R": if s[2] == "R": n = 2 else: n = 1 elif s[2] == "R": n = 1 else: n = 0 print(n)
p02582
s953490637
Accepted
S = input() cnt = 0 for i in range(len(S)): if S[i] == "R": cnt += 1 if cnt >= 2 and S[1] == "S": cnt = 1 print(cnt)
p02582
s833440836
Accepted
S = str(input()) if S[0]=='R': if S[1]=='R': if S[2]=='R': print(3) else: print(2) else: print(1) else: if S[1]=='R': if S[2]=='R': print(2) else: print(1) else: if S[2]=='R': print(1) else: print(0)
p02582
s635884598
Accepted
S = input() if S.count('RRR') == 1: print(3) elif S.count('R') == 2 and S.count('RR') == 1: print(2) elif S.count('R') >= 1 and S.count('R') < 3 and S.count('RR') == 0: print(1) else: print(0)
p02582
s242430263
Accepted
s = input() if "RRR" in s: print(3) elif "RR" in s: print(2) elif "R" in s: print(1) else: print(0)
p02582
s767433140
Accepted
l=input().split("S") out=0 for i in l: if len(i)>out: out=len(i) print(out)
p02582
s944424345
Accepted
s=input() if s.find('RRR')>=0: print(3) elif s.find('RR')>=0: print(2) elif s.find('R')>=0: print(1) else: print(0)
p02582
s035940163
Accepted
weather = input() rainyDay = weather.count('R') if rainyDay < 2: print(rainyDay) else: if weather[1] == 'R': print(rainyDay) else: print(1)
p02582
s367674189
Accepted
s = input() if s == 'RSR': print (1) else: print (s.count('R'))
p02582
s949182218
Accepted
s = input() flag = 1 ans = 0 tmp = 0 for i in range(3): if s[i] == "R": tmp += 1 else: tmp = 0 ans = max(tmp, ans) print(ans)
p02582
s990269142
Accepted
a=input() c=3 while True: if "R"*c in a : print(c) break c-=1
p02582
s002441727
Accepted
S=input() if S=='RRR': print(3) elif S=='SSS': print(0) elif S=='SRR': print(2) elif S=='RSR': print(1) elif S=='RRS': print(2) elif S=='SSR': print(1) elif S=='SRS': print(1) elif S=='RSS': print(1)
p02582
s231835720
Accepted
s = input() ans = 0 memo = 0 for i in s: if i=="R": memo += 1 ans = max(memo, ans) else: memo = 0 print(ans)
p02582
s587950613
Accepted
s=str(input()) count=0 res=0 for i in range(3): if s[i]=="R": count+=1 res=count else: count=0 print(res)
p02582
s767642486
Accepted
str = input() if str == "RRR": ans = 3 elif str == "RRS" or str == "SRR": ans = 2 elif str == "SSS": ans = 0 else: ans = 1 print(ans)
p02582
s803249349
Accepted
S = input() if "RRR" in S : print("3") elif "RR" in S : print("2") elif "R" in S : print("1") else: print("0")
p02582
s937685733
Accepted
S = input() if S == 'RRR': print(3) elif S == 'RRS' or S == 'SRR': print(2) elif S == 'SSS': print(0) else: print(1)
p02582
s671294792
Accepted
S=input() c=S.count('R') if c==1: print(1) elif c==0: print(0) elif c==3: print(3) else: if S[1]=='R': print(2) else: print(1)
p02582
s720318382
Accepted
S = input() count=0 ans=0 for i in S: if(i=='R'): count+=1 else: ans =max(ans,count) count = 0 print(max(ans,count))
p02582
s405755647
Accepted
s = input().strip() best = 0 streak = 0 for c in s: if c == 'R': streak += 1 best = max(best, streak) else: streak = 0 print(best)
p02582
s202637062
Accepted
s = input() ans = 0 if s == "RRR" : ans = 3 elif s == "SRR" or s == "RRS" : ans = 2 elif s == "SSS" : ans = 0 else : ans = 1 print(ans)
p02582
s869467241
Accepted
s = input() if "RRR" in s: print(3) elif "RR" in s: print(2) elif "R" in s: print(1) else: print(0)
p02582
s767969182
Accepted
s=str(input()) streak=0 ans=0 for ch in s: if ch=='R': streak+=1 else: ans=max(ans, streak) streak=0 ans=max(ans, streak) print(ans)
p02582
s068430933
Accepted
s=input() if "RRR" in s: print(3) elif "RR" in s: print(2) elif "R" in s: print(1) else: print(0)
p02582
s308855201
Accepted
from sys import stdin test = list(stdin.readline().rstrip()) count = [0,0,0] i=0 before = 'R' for str in test: if str=='R': count[i] += 1 else: i = i + 1 print(max(count))
p02582
s280457016
Accepted
s=input() if 'RRR'in s: print(3) elif 'RR' in s: print(2) elif 'R' in s: print(1) else: print(0)
p02582
s715834380
Accepted
INT = lambda: int(input()) INTM = lambda: map(int,input().split()) STRM = lambda: map(str,input().split()) STR = lambda: str(input()) LIST = lambda: list(map(int,input().split())) LISTS = lambda: list(map(str,input().split())) def do(): s=STR() ans=0 temp=0 for i in s: if i=='R': temp+=1 ans=max(temp,ans) else: temp=0 print(ans) if __name__ == '__main__': do()
p02582
s899890109
Accepted
w = list(input()) out = 0 cnt = 0 for i in range(len(w)): if w[i] == "S": cnt = 0 elif w[i] == "R": cnt += 1 out = max(out, cnt) print(out)
p02582
s708625967
Accepted
S = input() ans = [0] for i in range(len(S)): if S[i] == "R": ans.append(ans[-1] + 1) else: ans.append(0) print(max(ans))
p02582
s422525897
Accepted
S=str(input()) cnt=0 ans=0 for i in range(3): if S[i]=='R': cnt=cnt+1 ans=max(ans,cnt) else: cnt=0 print(ans)
p02582
s325458349
Accepted
S = input() if S == 'RRR': print("3") elif S == 'RRS': print("2") elif S == 'SRR': print("2") elif S == 'RSR': print("1") elif S == 'RSS': print("1") elif S == 'SRS': print("1") elif S == 'SSR': print("1") elif S == 'SSS': print("0")
p02582
s520036412
Accepted
s = input() ans = 0 if s == 'RRR': ans = 3 elif s == 'RRS' or s == 'SRR': ans = 2 elif s == 'SSS': ans = 0 else: ans = 1 print(ans)
p02582
s674170446
Accepted
s=input() if s=="RRR": print(3) elif s=="SSS": print(0) elif s=="RSS" or s=="SRS" or s=="SSR" or s=="RSR": print(1) else: print(2)
p02582
s652453450
Accepted
s = input() if 'RRR' in s: print('3') elif 'RR' in s: print('2') elif 'R' in s: print('1') else: print('0')
p02582
s093638198
Accepted
x = input() if x == "RRR": print(3) elif x == "RRS": print(2) elif x == "SRR": print(2) elif x == "SSS": print(0) else: print(1)
p02582
s012354490
Accepted
s = input() mx = 0 cnt = 0 f = True for i in range(len(s)): if f: if s[i] == "R": cnt += 1 else: f = False mx = max(mx, cnt) else: if s[i] == "R": f = True cnt = 1 print(max(mx,cnt))
p02582
s263279031
Accepted
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines x = read().rstrip().decode() def solve(x): if x.count('RRR'): return 3 if x.count('RR'): return 2 if x.count('R'): return 1 return 0 print(solve(x))
p02582
s500921874
Accepted
s = input() if 'RRR' in s: print(3) elif 'RR' in s: print(2) elif 'R' in s: print(1) else: print(0)
p02582
s671644987
Accepted
s = input() cnt=0 res=0 for i in range(len(s)): if s[i]=='R': cnt+=1 else: res=max(res,cnt) cnt=0 print(max(res,cnt))
p02582
s608986924
Accepted
s = input() for i in [3, 2, 1, 0]: if 'R'*i in s: print(i) break
p02582
s986242547
Accepted
S = input() if S == 'SSS': a = 0 if S == 'SSR': a = 1 if S == 'SRS': a = 1 if S == 'SRR': a = 2 if S == 'RSS': a = 1 if S == 'RSR': a = 1 if S == 'RRS': a = 2 if S == 'RRR': a = 3 print(a)
p02582
s326272896
Accepted
S=input() ans=0 for i in range(3): if S[i]=='R': ans+=1 if ans==2 and S[1]=="S": ans=1 print(ans)
p02582
s991795756
Accepted
S=input() if 'RRR' in S: print('3') elif 'RR' in S: print('2') elif 'R' in S: print('1') else: print('0')
p02582
s101122542
Accepted
print(len(max(input().split('S'))))
p02582
s556206770
Accepted
s = input() if s[0] == "R": if s[1] == "R": if s[2] == "R": print("3") else: print("2") else: print("1") elif s[1] == "R": if s[2] == "R": print("2") else: print("1") elif s[2] == "R": print("1") else: print("0")
p02582
s096951534
Accepted
S = input() r = S.count("R") if r == 0: print(0) elif r == 1: print(1) elif r == 3: print(3) elif r == 2: if S == "RSR": print(1) else: print(2)
p02582
s623501165
Accepted
a=list(input()) cnt=0 ans=0 for i in a: if i=="R": cnt+=1 else: ans=max(cnt,ans) cnt=0 ans=max(cnt,ans) print(ans)
p02582
s605524406
Accepted
s = input() if s == "RRR": print(3) elif s == "RRS" or s == "SRR": print(2) elif "R" in s: print(1) else: print(0)
p02582
s784761700
Accepted
s = input() if s == "RRR": print(3) elif s == "RRS" or s == "SRR": print(2) else: for i in range(3): if s[i] == "R": print(1) break elif i == 2: print(0)
p02582
s546973050
Accepted
s = input() if 'RRR' in s: a = 3 elif 'RR' in s: a = 2 elif 'R' in s: a = 1 else: a = 0 print(a)
p02582
s223164191
Accepted
s = input() if 'SSS' == s: print(0) elif 'RSS' == s: print(1) elif 'RRS' == s: print(2) elif 'RRR' == s: print(3) elif 'SSR' == s: print(1) elif 'SRR' == s: print(2) elif 'SRS' == s: print(1) elif 'RSR' == s: print(1)
p02582
s169136853
Accepted
s = input() if 'RRR' in s: print(3) elif 'RR' in s: print(2) elif 'R' in s: print(1) else: print(0)
p02582
s579253284
Accepted
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines x = read().rstrip().decode() def solve(x): if x.count('RRR'): return 3 elif x.count('RR'): return 2 elif x.count('R'): return 1 else: return 0 print(solve(x))
p02582
s568032776
Accepted
S = input() if 'RRR' in S: print(3) exit() if 'RR' in S: print(2) exit() if 'R' in S: print(1) exit() print(0)
p02582
s900883259
Accepted
S = input() if 'RRR' in S: print(3) elif 'RR' in S: print(2) elif 'R' in S: print(1) else: print(0)
p02582
s432984895
Accepted
tenki = input() if tenki == "RRR": print("3") elif tenki == "RRS": print("2") elif tenki == "RSR": print("1") elif tenki == "RSS": print("1") elif tenki == "SRR": print("2") elif tenki == "SRS": print("1") elif tenki == "SSR": print("1") elif tenki == "SSS": print("0")
p02582
s477606593
Accepted
input1 = str(input()) if input1 == "SSS": print("0") if input1 == "SSR": print("1") if input1 == "SRS": print("1") if input1 == "RSS": print("1") if input1 == "RRS": print("2") if input1 == "RSR": print("1") if input1 == "SRR": print("2") if input1 == "RRR": print("3")
p02582
s919724924
Accepted
s = str(input()) count = [] x = 0 for i in range(len(s)): if s[i] == "R": x += 1 if i == len(s)-1: count.append(x) if s[i] == "S": count.append(x) x = 0 print(max(count))
p02582
s702315096
Accepted
s=input() if s=="RRR": print(3) elif s=="RRS" or s=="SRR": print(2) elif s=="SSS": print(0) else: print(1)
p02582
s577103724
Accepted
S=input() cnt=0 if S=="RSR": cnt+=1 else: for c in S: if c=='R':cnt+=1 print(cnt)
p02582
s140737827
Accepted
# import sys; input = sys.stdin.buffer.readline # sys.setrecursionlimit(10**7) from collections import defaultdict con = 10 ** 9 + 7; INF = float("inf") def getlist(): return list(map(int, input().split())) #処理内容 def main(): S = input() cnt = 0 val = 0 for i in S: if i != "S": val += 1 cnt = max(val, cnt) else: cnt = max(val, cnt) val = 0 cnt = max(val, cnt) print(cnt) if __name__ == '__main__': main()
p02582
s197789911
Accepted
S = input() if S == 'RRR': print(3) elif 'RR' in S: print(2) elif 'R' in S: print(1) else: print(0)