problem_id
stringclasses
100 values
submission_id
stringlengths
10
10
status
stringclasses
2 values
code
stringlengths
6
806
p02582
s639663449
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 == "SRS": print(1) elif S == "SSR": print(1) elif S == "RSS": print(1) else: print(0)
p02582
s814346080
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
s705519136
Accepted
ans = 0 s = input() if 'RRR' == s: ans = 3 elif 'RR' in s: ans = 2 elif 'R' in s: ans = 1 print(ans)
p02582
s770854176
Accepted
S=input() ans=0 if "RRR" in S: print(3) elif "RR" in S: print(2) elif "R" in S: print(1) else: print(0)
p02582
s149342274
Accepted
a=input() if a=='RRR': print(3) elif a=='SRR' or a=='RRS': print(2) elif a=='SSS': print(0) else: print(1)
p02582
s470839600
Accepted
s=input() c1="RRR" c2="RR" c3="R" if c1 in s: print(3) elif c2 in s: print(2) elif c3 in s: print(1) else: print(0)
p02582
s551280778
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
s187497990
Accepted
s = input() cnt = 0 for x in range(2): if s[x] == 'R' and s[x+1] == 'R': cnt += 1 for x in s: if x == 'R': cnt += 1 break print(cnt)
p02582
s980274278
Accepted
s=input() if "RRR"==s: print(3) elif "RR" in s: print(2) elif "R" in s: print(1) else: print(0)
p02582
s829284702
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
s254563393
Accepted
a = input() count = 0 max_count =0 for i in range(3): if a[i] == "S": count = 0 elif a[i] == "R": count = count + 1 if max_count <count: max_count = count print(max_count)
p02582
s267833067
Accepted
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)
p02582
s564742474
Accepted
import sys import copy from collections import deque import collections stdin = sys.stdin mod = 10**9+7 ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().rstrip() # ignore trailing spaces s = ns() if s[0]==s[1]==s[2]=='R': print(3) exit(0) if s[0]==s[1]=='R' or s[1]==s[2]=='R': print(2) exit(0) if 'R' in s: print(1) exit(0) print(0)
p02582
s347612054
Accepted
s = input() cnt = 0 for i in range (3): if s[i] == 'R': cnt += 1 if cnt == 3: print(3) elif cnt == 2: if s[1] == 'S': print(1) else: print(2) else: print(cnt)
p02582
s144096719
Accepted
S = input() if S.count("RRR"): print(3) elif S.count("RR"): print(2) elif S.count("R"): print(1) else: print(0)
p02582
s382869578
Accepted
S=input() R=0 Rmax=0 for i in range(3): if S[i] == 'R': R+=1 else: if R > Rmax: Rmax = R R=0 if R > Rmax: Rmax = R print(Rmax)
p02582
s236243479
Accepted
import sys # sys.setrecursionlimit(10**6) # input = sys.stdin.buffer.readline # arr = [[int(el) for el in input().split()] for i in range(n)] s = input() def sol(s): if s == "RRR": return 3 # print (s, s[0], s[1], s[2]) if (s[0] == s[1] == "R") or (s[1] == s[2] == "R"): return 2 if "R" in s: return 1 return 0 print (sol(s))
p02582
s477873989
Accepted
S = input() count = 0 ans = 0 for i in S: if i == "R": count += 1 ans = max(ans,count) else: count = 0 print(ans)
p02582
s340144335
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
s921486905
Accepted
W = input() if "RRR" in W: print(3) elif "RR" in W: print(2) elif "R" in W: print(1) else: print(0)
p02582
s005105973
Accepted
str1 = input() if str1 == 'RRR': print(3) elif str1 == 'SSS': print(0) else: for i in range(len(str1) - 1): if str1[i] == str1[i+1] == 'R': flag = 0 break else: flag = 1 if flag == 0: print(2) else: print(1)
p02582
s333973980
Accepted
#import s=input() #=int(input()) #=map(int,input().split()) #=list(map(int,input().split())) #=[list(map(int,input().split())) for _ in range()] if 'RRR' in s: print(3) elif 'RR' in s: print(2) elif 'R' in s: print(1) else: print(0)
p02582
s905251232
Accepted
s = list(input()) l = [] count = 0 for i in range(3): if s[i] == 'R': count += 1 else: l.append(count) count = 0 l.append(count) print(max(l))
p02582
s901605498
Accepted
s = input() if s == 'RRR': print(3) elif s == 'SSS': print(0) elif s in ['RRS','SRR']: print(2) else: print(1)
p02582
s321264531
Accepted
s = input() if s=='RRR': print(3) elif 'RR' in s: print(2) elif 'R' in s: print(1) else: print(0)
p02582
s198385879
Accepted
a = input() emp = 0 l = a.split('S') while("" in l): l.remove("") if not l: print(emp) else: print(len(l[0]))
p02582
s610099291
Accepted
s=input() flag=False ans=0 for i in range(3): if s[i]=="R": ans+=1 if not flag: flag=True if s[i]=="S" and flag: break print(ans)
p02582
s664703259
Accepted
array=input() r=0 checker=[] for i in array: if i=='R': r+=1 else: checker.append(r) r=0 checker.append(r) print(max(checker))
p02582
s953522653
Accepted
w=input() cw={'RRR':3, 'RRS':2, 'RSR':1, 'RSS':1, 'SRS':1, 'SSR':1, 'SRR':2, 'SSS':0 } print(cw[w])
p02582
s680043741
Accepted
s=list(input()) cnt = 0 ans = 0 for i in s: if i == "R": cnt += 1 else: cnt = 0 ans = max(ans,cnt) print(ans)
p02582
s386193649
Accepted
S=input() print(3 if S=="RRR" else 2 if "RR" in S else 1 if "R" in S else 0)
p02582
s890305858
Accepted
s = input() if "RRR" in s: print(3) elif "RR" in s and "S" in s: print(2) elif s.count("R") == 1 or "RSR" in s: print(1) elif s.count("R") == 0: print(0)
p02582
s052933354
Accepted
S=input() ans=0 if 'R' in S: ans+=1 for i in range(2): if S[i]==S[i+1]=='R': ans+=1 print(ans)
p02582
s871471415
Accepted
S = input() r = S.count("R") if S == "RSR": r -= 1 print(r)
p02582
s611206934
Accepted
s = input() ans = 0 p = 0 for i in range(3): if s[i] == 'R': p += 1 else: ans = max(ans,p) p = 0 print(max(ans,p))
p02582
s882023497
Accepted
S = input() if S =="RSR": print(1) exit() print(S.count("R"))
p02582
s249549019
Accepted
S = input() if (S == 'RRR'): print(3) exit() elif ('RR' in S): print(2) exit() elif ('R' in S): print(1) else: print(0)
p02582
s231620113
Accepted
S=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)
p02582
s536605805
Accepted
S = str(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
s095142088
Accepted
s = input() cnt = 0 ans = 0 for i in range(3): if s[i] == 'R': cnt += 1 else: cnt = 0 ans = max(ans, cnt) print(ans)
p02582
s431238957
Accepted
s = input() if s.count('SSS')==1: ans = 0 elif s.count('RRR') == 1: ans = 3 elif s.count('RR') == 1: ans = 2 else: ans = 1 print(ans)
p02582
s012375076
Accepted
s = input() if 'RRR' in s: res = 3 elif 'RR' in s: res = 2 elif 'R' in s: res = 1 else: res = 0 print(res)
p02582
s019424597
Accepted
S=input() ans = 0 if("RRR" == S) : ans = 3 elif("RR" in S) : ans = 2 elif("R" in S) : ans = 1 else : ans = 0 print(ans)
p02582
s752085645
Accepted
import sys input = sys.stdin.readline def inps(): return str(input()) def longest(s): max_now = 0 max_glo = 0 for i in range(len(s)): if s[i] == "R": max_now+=1 else: max_now = 0 if max_glo<max_now: max_glo=max_now return max_glo s = inps().rstrip() print(longest(s))
p02582
s649188398
Accepted
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)
p02582
s407319111
Accepted
S = input() result = 0 if "R" in S: if "RR" in S: result = S.count("R") else: result = 1 print(result)
p02582
s645969829
Accepted
s = input() r = s.count("RRR") n = s.count("RR") if r == 1: print(3) elif n == 1: print(2) else: if s.count("R")>0: print(1) else: print(0)
p02582
s062597148
Accepted
s = input() if s == 'RRS': print(2) elif s == 'SRR': print(2) elif s == 'RRR': print(3) elif s == 'SRS': print(1) elif s == 'RSS': print(1) elif s == 'SSR': print(1) elif s == 'RSR': print(1) else: print(0)
p02582
s999640184
Accepted
S=input() suc=0 ans=0 for i in range(3): if S[i]=='R': suc+=1 ans=max(ans,suc) else: suc=0 print(ans)
p02582
s165191970
Accepted
S = input() ls = [] now = 0 for i in range(3): if S[i] == "R": now += 1 else: ls.append(now) now = 0 ls.append(now) print(max(ls))
p02582
s910834096
Accepted
s = input() if s == "RRR": print(3) elif s[0] == "R" and s[1] != "R": print(1) elif s[2] == "R" and s[1] != "R": print(1) elif s[1] == "R" and s[0] != "R" and s[2] != "R": print(1) elif s[0] == "R" and s[1] == "R": print(2) elif s[1] == "R" and s[2] == "R": print(2) else: print(0)
p02582
s099962545
Accepted
S = input() if S == "RRR": print(3) elif S.count("RR") >= 1: print(2) elif S.count("R") >= 1: print(1) else: print(0)
p02582
s557119816
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
s982138472
Accepted
a1 = input() count = 0 max = 0 for i in a1: if i == "R": count += 1 max = count elif i == "S": count = 0 print(max)
p02582
s841253119
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
s843563667
Accepted
S = str(input()) ans = 0 now = 0 for i in range(3): if S[i] == "R": now += 1 #print(now) ans = max(ans,now) else: now = 0 print(ans)
p02582
s291116272
Accepted
# -*- coding: utf-8 -*- #天気の入力 s = str(input()) #連続したRの数を数える rain_days = 0 max_rain_days = 0 for char in s: if char == 'R': rain_days += 1 max_rain_days = rain_days elif char == 'S': rain_days = 0 print(max_rain_days)
p02582
s904066060
Accepted
s = input() if s.count("R") == 0: print(0) elif s.count("R") == 1: print(1) elif s.count("R") == 3: print(3) else: if s == "RRS" or s == "SRR": print(2) else: print(1)
p02582
s572718016
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
s002855750
Accepted
# 2020/08/15 # AtCoder Beginner Contest 175 - A # Input s = input() # Calc cnt = 0 for i in range(len(s)): if s[i] == 'R': cnt = cnt + 1 if cnt == 3: ans = 3 elif cnt == 2: if s[1] == 'S': ans = 1 else: ans = 2 elif cnt == 1: ans = 1 else: ans = 0 # Output print(ans)
p02582
s247143404
Accepted
s = input() if s.count('RRR'): print(3) elif s.count('RR'): print(2) elif s.count('R'): print(1) else: print(0)
p02582
s270018108
Accepted
a=input() b=a.split('S') ans=0 for i in b: if len(i)>ans: ans=len(i) print(ans)
p02582
s935337901
Accepted
S = input() if S == 'RRR': print(3) elif 'RR' in S: print(2) elif 'R' in S: print(1) else: print(0)
p02582
s314060370
Accepted
s=input() l=[['SSS'],['RSS','SRS','SSR','RSR'],['RRS','SRR'],['RRR']] for i in range(4): if s in l[i]: print(i) exit()
p02582
s432382603
Accepted
s = input() if s == "RRR": print(3) exit() elif s == "RRS" or s == "SRR": print(2) exit() elif s == "SSS": print(0) exit() else: print(1)
p02582
s460719833
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
s718283563
Accepted
def main(): ss = list(input()) r_count = ss.count("R") if r_count == 2 and ss[0] == "R" and ss[2] == "R": ans = 1 else: ans = r_count print(ans) if __name__ == "__main__": main()
p02582
s696944567
Accepted
s=input() if s.count("R") == 2: if s[1] == "R": print(2) else: print(1) else: print(s.count("R"))
p02582
s685100818
Accepted
c = 0; ans = 0 x = input() if x =='RRR': print(3) elif x in ['SRR', 'RRS']: print(2) elif x=='SSS': print(0) else:print(1)
p02582
s619886676
Accepted
import sys def input(): return sys.stdin.readline().strip() sys.setrecursionlimit(20000000) MOD = 10 ** 9 + 7 INF = float("inf") def main(): S = input() answer = 0 ans_list = [0] for i in range(3): if S[i] == "R": answer += 1 if S[i] == "S": ans_list.append(answer) answer = 0 ans_list.append(answer) print(max(ans_list)) if __name__ == "__main__": main()
p02582
s563006575
Accepted
# -*- coding: utf-8 -*- import sys sys.setrecursionlimit(10**9) INF=10**18 MOD=10**9+7 input=lambda: sys.stdin.readline().rstrip() YesNo=lambda b: bool([print('Yes')] if b else print('No')) YESNO=lambda b: bool([print('YES')] if b else print('NO')) int1=lambda x:int(x)-1 S=input() if S=='RSR': print(1) else: print(S.count('R'))
p02582
s607128410
Accepted
S = input() s = S.count('R') if s==2 and S[0] == 'R' and S[2] == 'R': s -= 1 print(s)
p02582
s464981048
Accepted
s=input() if s.count('RRR')==1: print(3) elif s.count('RR')==1: print(2) elif s.count('R')!=0: print(1) else: print(0)
p02582
s578227303
Accepted
s = input() count = 0 m = 0 for c in s: if(c == "R"): count+=1 if count != 2: print(count) elif s[1] == "S": print(1) else: print(2)
p02582
s753628981
Accepted
x = list(str(input())) for i in range(3): if x[i] == 'R': x[i] = 1 else: x[i] = 0 ans = x[0] + x[1] + x[2] if (x[0] == 1 or x[2] == 1) and x[1] == 0: print(1) else: print(ans)
p02582
s394607582
Accepted
S = input() if "R" not in S: print(0) elif "RRR" in S: print(3) elif "RR" in S: print(2) elif "R" in S: print(1)
p02582
s108991887
Accepted
S = input() ans = 0 for i in range(len(S)): if S[i]=='R': ans+=1 if ans==2: if S[0]!=S[1] and S[1]!=S[2]: ans-=1 print(ans)
p02582
s403236354
Accepted
S=str(input()) if S.count('R')==0: print(0) if S.count('R')==1 : print(1) if S.count('R')==2 and not S.count('RR') ==1: print(1) if S.count('RR')==1 and not S.count('RRR')==1: print(2) if S.count('RRR')==1: print(3)
p02582
s073227476
Accepted
# A - Rainy Season S = str(input()) if S == 'RRR': print(3) elif S == 'SRR' or S == 'RRS': print(2) elif S == 'SSR' or S == 'SRS' or S == 'RSS' or S == 'RSR': print(1) else: print(0)
p02582
s950986318
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
s958057727
Accepted
s = input() c1 = s.count('R') if c1 == 3: print(3) elif c1 == 2: if s[1] == 'S': print(1) else: print(2) elif c1 == 1: print(1) else: print(0)
p02582
s373411662
Accepted
w = input() if w.count("R") == 2: if w[1] == "R": print(2) else: print(1) else: print(w.count("R"))
p02582
s420846202
Accepted
S = str(input()) if S.count("RRR") == 1: print(3) elif S.count("RR") == 1: print(2) elif S.count("R") != 0: print(1) else: print(0)
p02582
s492990863
Accepted
S = input() if S == "RRR": print(3) elif "RR" in S: print(2) elif "R" in S: print(1) else: print(0)
p02582
s799270212
Accepted
print(len(max(input().split('S'))))
p02582
s907789740
Accepted
S = input() D = S.count("R") if D == 1: print(1) elif D == 3: print(3) elif D == 2: for i in range(3): if S[i] =="R": if S[i+1] =="R": print(2) break else: print(1) break elif D == 0: print(0)
p02582
s134319723
Accepted
s1, s2, s3 = str(input()) if s1 == "R": if s2 == "S": result = 1 else: if s3 == "S": result = 2 else: result = 3 else: if s2 == "S": if s3 == "S": result = 0 else: result = 1 else: if s3 == "S": result = 1 else: result = 2 print(result)
p02582
s871780955
Accepted
s=input() ans=0 m=0 for i in range(3): if s[i]=="R": m+=1 else: ans=max(m,ans) m=0 ans=max(m,ans) print(ans)
p02582
s129941053
Accepted
s = str(input()) if s.count('RRR'): print(3) exit() if s.count('RR'): print(2) exit() if s.count('R'): print(1) exit() print(0)
p02582
s545233907
Accepted
S = input() numR = 0 sunny = False for i in range(len(S)): if S[i] == 'R' and not sunny: numR += 1 else: if numR != 0: sunny = True continue print(numR)
p02582
s512828704
Accepted
s = input() if s == "RRR": print(3) elif s == "SRR" or s == "RRS": print(2) elif s == "SSS": print(0) else: print(1)
p02582
s054077201
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
s026476698
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
s096391595
Accepted
s=input() if s == "RSR": print(1) else: print(s.count("R"))
p02582
s929678024
Accepted
s=input() cnt=0 ans=0 for i in range(3): if s[i]=='R': cnt+=1 else: ans=max(cnt,ans) cnt=0 print(max(ans,cnt))
p02582
s284257151
Accepted
S = input() if S == "RRR": print(3) elif S[0:2] == "RR" or S[1:3] == "RR": print(2) elif S[0] == "R" or S[1] == "R" or S[2] == "R": print(1) else: print(0)
p02582
s208560364
Accepted
s = input() if s[0]=="R" and s[1] == "R" and s[2] == "R": print(3) elif (s[0]=="R" and s[1]=="R") or (s[1]=="R" and s[2]=="R"): print(2) elif s[0]=="S" and s[1] == "S" and s[2] == "S": print(0) else: print(1)
p02582
s568852949
Accepted
import re s = input() arr = re.split(r'S+', s) print(max([len(e) for e in arr]))
p02582
s463895074
Accepted
s = input() res = 0 prev = '' for c in s: if c == 'R': if prev == 'R': res += 1 else: res = 1 prev = c print(res)
p02582
s460999892
Accepted
S = input() count = 0 result = 0 for i in range(3): if S[i] == 'R': count += 1 if result < count: result = count else: count = 0 print(result)