problem_id
stringclasses
100 values
submission_id
stringlengths
10
10
status
stringclasses
2 values
code
stringlengths
6
806
p02582
s369733788
Accepted
S = input() if S == "RRR": print(3) elif "RR" in S: print(2) elif "R" in S: print(1) else: print(0)
p02582
s374133668
Accepted
x=input() if "RRR" in x: print(3) elif "RR" in x: print(2) elif "R" in x: print(1) else : print(0)
p02582
s906841744
Accepted
s=input() if s.count('R')<2 or s.count('R')==3: print(s.count('R')) exit() if 'RR' in s: print(2) else: print(1)
p02582
s912828716
Accepted
w = input() if w.count("R") == 3: print(3) elif w.count("R") == 2: if w[1] == "S": print(1) else: print(2) elif w.count("R") == 1: print(1) else: print(0)
p02582
s744830424
Accepted
S = str(input()) if 'RRR' in S: print(3) elif 'RR' in S: print(2) elif 'R' in S: print(1) else: print(0)
p02582
s822931866
Accepted
a = input() if("RRR" in a): print("3") elif("RR" in a): print("2") elif("R" in a): print("1") else: print("0")
p02582
s673932844
Accepted
S = input() if S=="SSS": print(0) elif S=="RSS" or S=="SRS" or S=="SSR" or S=="RSR": print(1) elif S=="RRS" or S=="SRR": print(2) elif S=="RRR": print(3)
p02582
s058621151
Accepted
S=input() if (S=="RRS" or S=="SRR"): print (2) elif S=="RRR": print (3) elif S=="RSS" or S=="SRS" or S=="SSR" or S=="RSR": print (1) else: print (0)
p02582
s379320153
Accepted
import sys sys.setrecursionlimit(10**6) input = sys.stdin.readline def main(): S = input()[:-1] if S == 'RRR': print(3) elif S in ['RRS', 'SRR']: print(2) elif S == 'SSS': print(0) else: print(1) if __name__ == "__main__": main()
p02582
s390246812
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
s694887207
Accepted
def main(): s = input() counts = [0] for c in s: if c == 'S': counts.append(0) if c == 'R': counts[-1] += 1 print(max(counts)) if __name__ == '__main__': main()
p02582
s500063413
Accepted
s=input() n=len(s) ans=0 t=0 for i in range(n): if s[i]=="R": t+=1 if t>ans: ans=t else: t=0 print(ans)
p02582
s368819818
Accepted
def check_weather(weathers: str) -> int: count = weathers.count('R') return 1 if weathers[1] == 'S' and count == 2 else count if __name__=='__main__': print(check_weather(input()))
p02582
s587649896
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
s562892490
Accepted
S=str(input()) if S == "RRR": print(3) elif S == "SRR": print(2) elif S == "RRS": print(2) elif S == "SSS": print(0) else: print(1)
p02582
s634764540
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
s387605676
Accepted
s = input() r = 0 l = 'R' for i in s: r = 1 if i == 'R' and l == 'S' else r r += 1 if i == 'R' and l == 'R' else 0 l = i print(r)
p02582
s580330294
Accepted
S = input() count = S.count('R') if count == 0 or count == 1 or count == 3: print(count) else: if S == 'RRS' or S == 'SRR': print(count) elif S == 'RSR': print(1)
p02582
s276309842
Accepted
S = input() Rs = S.split("S") count = 0 for r in Rs: if len(r) > count: count = len(r) print(count)
p02582
s001033774
Accepted
a = input() if a.count('RRR') > 0: print(3) elif a.count('RR') > 0: print(2) elif a.count('R') > 0: print(1) else: print(0)
p02582
s316876061
Accepted
#A import sys s = input() num = s.count("R") if num >= 2: if s[1] == "S": num = 1 print(num)
p02582
s382565337
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
s635331700
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": print(2) elif S[1]=="R" and S[2]=="R": print(2) elif S[0]=="R" or S[1]=="R" or S[2] =="R": print(1) else: print(0)
p02582
s559227406
Accepted
s = input() ans = 0 if 'R' not in s: ans = 0 else: if s == 'RRR': ans = 3 elif s == 'SRR' or s == 'RRS': ans = 2 else: ans = 1 print(ans)
p02582
s363038083
Accepted
# -*- coding: utf-8 -*- S = input() ans = 0 for i in range(len(S)): if S[i] == "R": if ans == 0: ans += 1 else: if i > 0 and S[i] == S[i-1] == "R": ans += 1 print(ans)
p02582
s812001791
Accepted
Word = input() counter=0 maxc = 0 for i in range(len(Word)): if 'R'==Word[i]: counter +=1 maxc = max(counter, maxc) else: counter=0 print(maxc)
p02582
s616445920
Accepted
S = input() if S == 'RRR': print(3) elif S == 'RRS': print(2) elif S == 'SRR': print(2) elif S == 'RSS': print(1) elif S == 'SRS': print(1) elif S == 'SSR': print(1) elif S == 'RSR': print(1) else: print(0)
p02582
s835611501
Accepted
S = list(input()) rain_max = 0 rain_cnt = 0 flag = False for i in range(len(S)): if S[i] == 'R': rain_cnt += 1 else: if rain_cnt > rain_max: rain_max = rain_cnt flag = True rain_cnt = 0 if not flag: rain_max = rain_cnt print(rain_max)
p02582
s237693716
Accepted
S = input() ans = 0 tmp = 0 for i in range(len(S)): if S[i] == "R": tmp += 1 else: ans = max(ans, tmp) tmp = 0 ans = max(ans, tmp) print(ans)
p02582
s992954109
Accepted
S = input() if S == 'SSS': ans = 0 elif S == 'SSR': ans = 1 elif S == 'SRS': ans = 1 elif S == 'SRR': ans = 2 elif S == 'RSS': ans = 1 elif S == 'RSR': ans = 1 elif S == 'RRS': ans = 2 elif S == 'RRR': ans = 3 print(ans)
p02582
s527171138
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
s774947317
Accepted
S = input() ans = 0 if S == "RRR": ans = 3 elif S == "RRS": ans = 2 elif S == "RSR": ans = 1 elif S == "RSS": ans = 1 elif S == "SRR": ans = 2 elif S == "SRS": ans = 1 elif S == "SSR": ans = 1 elif S == "SSS": ans = 0 print(ans)
p02582
s756702125
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
s476996272
Accepted
str1 = input() num = str1.count('R') if num == 3: print('3') elif num == 2: if str1[1] == 'S': print('1') else: print('2') elif num == 1: print('1') else: print('0')
p02582
s027135909
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
s217391824
Accepted
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)
p02582
s369855929
Accepted
s=input() if s=="SSS": print(0) elif s=="SSR" or s=="RSS" or s=="SRS" or s=="RSR": print(1) elif s=="SRR" or s=="RRS": print(2) else: print(3)
p02582
s172419107
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
s769160181
Accepted
S = input() cnt = 0 if S == 'RRR': cnt = 3 elif S == 'RRS' or S == 'SRR': cnt = 2 elif 'R' in S: cnt = 1 else: cnt = 0 # for i in range(len(S)): # if(S[i] == 'R'): # cnt += 1 # else: # cnt = 0 print(cnt)
p02582
s862383684
Accepted
N =input() if N == 'RRR': print('3') elif 'RR' in N: print('2') elif 'R' in N: print('1') else: print('0')
p02582
s046318653
Accepted
s = input() if s.count('R') == 3: print(3) elif s.count('R') ==2: if s.count('RR') != 0: print(2) else: print(1) elif s.count('R') ==1: print(1) else: print(0)
p02582
s121824098
Accepted
s = input() ans = 0 for i in range(1, 4): if 'R'*i in s: ans = len('R'*i) print(ans)
p02582
s038016702
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': print(2) elif s[1]=='R' and s[2]=='R': print(2) elif s[0]=='R' or s[1]=='R' or s[2]=='R': print(1) else: print(0)
p02582
s286406498
Accepted
s = input() def ans(a): if s == 'RSR': return 1 else: return (s[0] == 'R') + (s[1] == 'R') + (s[2] == 'R') print(ans(s))
p02582
s505663060
Accepted
s = input() if s=='RRR':print(3) if s=='SSS':print(0) if s=='RRS':print(2) if s=='SSR':print(1) if s=='RSR':print(1) if s=='SRS':print(1) if s=='SRR':print(2) if s=='RSS':print(1)
p02582
s094108262
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
s710365908
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
s976832623
Accepted
S = input() R = [] r = 0 for s in S: if s == "R": r += 1 if s == "S": R.append(r) r = 0 R.append(r) print(max(R))
p02582
s099718986
Accepted
N=input() if N=='RRR': print(3) elif N=='RRS' or N=='SRR': print(2) elif N=='SSS': print(0) else: print(1)
p02582
s920930975
Accepted
def solve(): n = input() if n == "RRR": print(3) elif "RR" in n: print(2) elif "R" in n: print(1) else: print(0) solve()
p02582
s311118367
Accepted
S = str(input()) if S.find('RRR')!=-1: print(3) elif S.find('RR')!=-1: print(2) elif S.find('R')!=-1: print(1) else: print(0)
p02582
s306051931
Accepted
n = input() ans = 0 temp = 0 for i in range(len(n)): if n[i] == "R": temp += 1 ans = max(temp,ans) else: temp = 0 print(ans)
p02582
s707785072
Accepted
s=input() S=list(s) num=S.count('R') if num==2: if s=='RSR': print("1") else: print('2') else: print(num)
p02582
s146441645
Accepted
a = input() if a =='RRR': print(3) elif 'RR' in a: print(2) elif 'R' in a: print(1) else: print(0)
p02582
s587823903
Accepted
s = input() if s == "RSR": print(1) else: print(s.count("R"))
p02582
s160436431
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) elif s == "RRR": print(3)
p02582
s279986100
Accepted
import sys s = input() ans = 0 for _s in range(3, 0, -1): if _s * "R" in s: print(_s) sys.exit() print(0)
p02582
s103864307
Accepted
import sys input = sys.stdin.readline def main(): S = input().rstrip() if "RRR" in S: ans = 3 elif "RR" in S: ans = 2 elif "R" in S: ans = 1 else: ans = 0 print(ans) if __name__ == "__main__": main()
p02582
s521196283
Accepted
s=input() if(s=='RRR'): print(3) elif(s=='RRS' or s=='SRR'): print(2) else: s=list(s) if 'R' in s: print(1) else: print(0)
p02582
s631814022
Accepted
S = input() if S == "RSR": ans = 1 else: S = list(S) ans = S.count("R") print(ans)
p02582
s519427059
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
s992183352
Accepted
## coding: UTF-8 S = input() now = 0 ans = 0 for i in range(3): if(S[i] == 'R'): now += 1 else: ans = max(ans, now) now = 0 ans = max(ans, now) print(ans)
p02582
s465349573
Accepted
s = input() if s == 'RRR': print(3) elif 'RR' in s: print(2) elif 'R' in s: print(1) else: print(0)
p02582
s568347597
Accepted
S = input() if S == "RRR": print(3) elif S[:2] == 'RR' or S[1:] == 'RR': print('2') elif S == 'SSS': print(0) else: print('1')
p02582
s180138475
Accepted
import sys def resolve(in_): S = in_.read().strip().split('S') ans = max(len(s) for s in S) return ans def main(): answer = resolve(sys.stdin) print(answer) if __name__ == '__main__': main()
p02582
s162670562
Accepted
s = input() ans = 0 if "RRR" == s: ans = 3 elif "RR" in s: ans = 2 elif "R" in s: ans = 1 print(ans)
p02582
s112041764
Accepted
a=input() cnt=0 for i in a: if i=='R': cnt+=1 if cnt==2 and len(a)==3: if a[0]=='R' and a[2]=='R': cnt=1 print(cnt)
p02582
s702204296
Accepted
S=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: ...
p02582
s069824604
Accepted
S = input() res = 0 streak = 0 rs = "" for s in S: if s == 'R': if rs == s: res += 1 else: streak = 1 else: streak = 0 res = max(res, streak) rs = s print(res)
p02582
s986572557
Accepted
s = input() if s == 'RRR': print(3) elif s == 'SSS': print(0) elif s[:2] == 'RR' or s[1:] == 'RR': print(2) else: print(1)
p02582
s244695749
Accepted
from itertools import groupby S = input() if 'RRR' in S: print(3) elif 'RR' in S: print(2) elif 'R' in S: print(1) else: print(0)
p02582
s887780975
Accepted
S = input() if S[0]=="R": if S[1]=="R" and S[2]=="R": print(3) elif S[1]=="R" and S[2]=="S": print(2) else: print(1) else: if S[1]=="R" and S[2]=="R": print(2) elif S[1]=="S" and S[2]=="S": print(0) else: print(1)
p02582
s992533095
Accepted
s = input() res = 0 ans = 0 for i in range(3): if s[i] == "R": res += 1 else: if ans < res: ans = res res = 0 if ans < res: ans = res print(ans)
p02582
s923681548
Accepted
s = input() if s == 'RSR': print(1) else: print(s.count(('R')))
p02582
s613217314
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
s697412751
Accepted
s = input().split('S') s = sorted(s, reverse=True) print(len(s[0]))
p02582
s072893473
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
s196176361
Accepted
s = input() ans = 0 a = 0 for si in s: if si == "R": a += 1 else: ans = max(ans,a) a = 0 print(max(ans,a))
p02582
s773436746
Accepted
if __name__=="__main__": S=input() if S=="RRR": print(3) elif S=="SSS": print(0) elif S=="RRS" or S=="SRR": print(2) else: print(1)
p02582
s556236793
Accepted
s=input() if s=="SSS":print(0) elif s=="RRS" or s=="SRR":print(2) elif s=="RRR":print(3) else:print(1)
p02582
s353312362
Accepted
s=input() if "R" in s: if s=="RRR": print(3) else: if "RR" in s: print(2) else: print(1) else: print(0)
p02582
s302782291
Accepted
s = input() ans=0 if s[0]=='R' and s[1]=='R' and s[2]=='R': print(3) elif s[1]=='R' and s[2]=='R': print(2) elif s[0]=='R' and s[1]=='R': print(2) elif s[0]=='R' or s[1]=='R' or s[2]=='R': print(1) else: print(0)
p02582
s991963595
Accepted
def main(): 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 'R' in s: print(1) else: print(0) if __name__=='__main__': main()
p02582
s128610973
Accepted
#!/usr/bin/env pypy3 def main(): string = input() count = 0 maxv = -1 for s in string: if s == "R": count = count + 1 else: maxv = max(count, maxv) count = 0 maxv = max(count, maxv) print(maxv) main()
p02582
s051202916
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
s173425363
Accepted
from collections import defaultdict from collections import deque from collections import Counter import itertools import math import bisect def readInt(): return int(input()) def readInts(): return list(map(int, input().split())) def readChar(): return input() def readChars(): return input().split() s = input() ...
p02582
s082981299
Accepted
x = input() if 'RRR' in x: print(3) elif 'RR' in x: print(2) elif 'R' in x: print(1) else: print(0)
p02582
s341928590
Accepted
S=input() p=S[0] q=S[1] r=S[2] if p == 'R' and q=='R' and r=='R': print(3) elif (p=='R' and q=='R') or (q=='R' and r=='R') : print(2) elif p=='R'or q=='R' or r=='R': print(1) else: print(0)
p02582
s391483437
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
s179903534
Accepted
S = input() ans = S.count('R') if ans == 2 and S[1] != 'R': ans = 1 print(ans)
p02582
s315026757
Accepted
s = input() if s == 'RRR': print(3) elif s[:2] == 'RR' or s[1:] == 'RR': print(2) elif s.count('R') >= 1: print(1) else: print(0)
p02582
s822884702
Accepted
import sys sys.setrecursionlimit(10 ** 7) input = sys.stdin.readline f_inf = float('inf') mod = 10 ** 9 + 7 def resolve(): S = input() res = 0 cnt = 0 for s in S: if s == "R": cnt += 1 res = max(res, cnt) else: cnt = 0 print(res) if __name__ =...
p02582
s980554133
Accepted
# -*- coding: utf-8 -*- S = str(input()) if S.count("RRR") > 0: print(3) elif S.count("RR") > 0: print(2) elif S.count("R") > 0: print(1) else: print(0)
p02582
s066702339
Accepted
def main(): s = list(str(input())) if s.count('R') == 3: print(3) return elif s.count('R') == 2 and s[1] == 'S': print(1) return elif s.count('R') == 2: print(2) return elif s.count('R') == 1: print(1) return else: print(0) ...
p02582
s765988990
Accepted
from sys import stdin import sys import math from functools import reduce import functools import itertools from collections import deque,Counter,defaultdict from operator import mul import copy # ! /usr/bin/env python # -*- coding: utf-8 -*- import heapq sys.setrecursionlimit(10**6) # INF = float("inf") INF = 10**18 ...
p02582
s780998023
Accepted
s=list(input()) count=0 ans=s.count("R") if s[1]=="S" and ans==2: print(1) else:print(ans)
p02582
s330523853
Accepted
s = input() if s in ['SSS']: ans = 0 elif s in ['SSR', 'SRS', 'RSS', 'RSR']: ans = 1 elif s in ['SRR', 'RRS']: ans = 2 else: ans = 3 print(ans)
p02582
s311807279
Accepted
a=input() if "RRR" in a: print(3) elif "RR" in a: print(2) elif "R" in a: print(1) else: print(0)
p02582
s522337857
Accepted
S = input() if S.count('RRR') != 0: print(3) elif S.count('RR') != 0: print(2) elif S.count('R') != 0: print(1) else : print(0)
p02582
s905506584
Accepted
S = str(input()) if S == 'RRR': print(3) elif S == 'RRS' or S == 'SRR': print(2) elif S == 'SSS': print(0) else: print(1)