problem_id
stringlengths
6
6
user_id
stringlengths
10
10
time_limit
float64
1k
8k
memory_limit
float64
262k
1.05M
problem_description
stringlengths
48
1.55k
codes
stringlengths
35
98.9k
status
stringlengths
28
1.7k
submission_ids
stringlengths
28
1.41k
memories
stringlengths
13
808
cpu_times
stringlengths
11
610
code_sizes
stringlengths
7
505
p02582
u454632464
2,000
1,048,576
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.
["S = 'RRS'\np = 0\nfor i in range(len(S)):\n if S[i] != 'S':\n p =+ 1\n else:\n \tp == 0\nprint(p)", "p = 0\nfor i in range(len(S)):\n if S[i] != 'S':\n p =+ 1\nprint(p)\n", "S = input()\np = 0\nfor i in range(len(S)):\n if S[i] != 'S':\n p =+ 1\nprint(p)", "S = 'RRS'\np = 0\nfor i in range(len(S)):\n if S[i] != 'S':\n p =+ 1\nprint(p)", "p = 0\nfor i in range(len(S)):\n if S[i] != 'S':\n p =+ 1\n\telse:\n \tp == 0\nprint(p)", "p = 0\nq = 0\nfor i in range(len(S)):\n if S[i] != 'S':\n p += 1\n if p > q:\n q = p\n else:\n \tp = 0\nprint(q)\n\n\n\n", "S = input()\np = 0\nq = 0\nfor i in range(len(S)):\n if S[i] != 'S':\n p += 1\n if p > q:\n q = p\n else:\n \tp = 0\nprint(q)\n"]
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s020887021', 's083941098', 's250389051', 's422783251', 's814011668', 's900201072', 's511909999']
[9080.0, 9044.0, 9104.0, 8956.0, 8968.0, 9080.0, 9092.0]
[30.0, 22.0, 27.0, 30.0, 25.0, 29.0, 29.0]
[107, 74, 85, 83, 94, 142, 151]
p02582
u456640225
2,000
1,048,576
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.
["sr_list = list(input().split())\nr_count = sr_list.count('R')\nif r_count == 0:\n print('0')\nelif r_count == 1:\n print('1')\nelif r_count ==3:\n print('3')\nelse:\n if sr_list[1] == 'S':\n print('1')\n else:\n print('2')", "sr_list = list(input())\nr_count = sr_list.count('R')\nif r_count == 0:\n print('0')\nelif r_count == 1:\n print('1')\nelif r_count ==3:\n print('3')\nelse:\n if sr_list[1] == 'S':\n print('1')\n else:\n print('2')"]
['Wrong Answer', 'Accepted']
['s943626486', 's427069652']
[9008.0, 9104.0]
[35.0, 29.0]
[221, 213]
p02582
u460386402
2,000
1,048,576
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.
['x,k,d=map(int,input().split())\nx=abs(x)\n\nsemin=x//d \nif semin%2==0:\n minb=0 が偶数\nelse:\n minb=1 が奇数\n\nif semin>k:\n print(abs(x-k*d))\nelse:\n k=k-semin\n if k%2==0:\n ans=0 \n else:\n ans=1 \n if ans==0:\n if minb==0:\n print(abs(x-d*semin))\n else:\n print(min(abs((x-(d*semin))-d),abs(x-d*semin)))\n else:\n if minb==0:\n print(abs((x-(d*semin))-d))\n else:\n print(abs(x-d*semin)) ', 's=input()\nans=0\n\nfor i in range(1,4):\n r="R"*i\n if r in s:\n ans=i\nprint(ans)']
['Runtime Error', 'Accepted']
['s795015656', 's929970084']
[9216.0, 9084.0]
[25.0, 27.0]
[569, 81]
p02582
u464912173
2,000
1,048,576
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.
["a = list(input())\n\nA=0\nfor i in range(3):\n if a[i]=='R':\n A+=1\n else: A=0\n \nprint(A)", "a = input()\n\nif a =='RRR':\n print(3)\nelif 'RR' in a: \n print(2)\nelif 'R' in a: \n print(1)\n\nelse: print(0)\n\n"]
['Wrong Answer', 'Accepted']
['s446848104', 's146441645']
[8972.0, 8992.0]
[34.0, 29.0]
[90, 110]
p02582
u467463073
2,000
1,048,576
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.
['s = input().rstrip()\nif "SSS" in s:\n print(3)\nelif "SS" in s:\n print(2)\nelif "S" in s:\n print(1)\nelse:\n print(0)', 's = input().rstrip()\nif "RRR" in s:\n print(3)\nelif "RR" in s:\n print(2)\nelif "R" in s:\n print(1)\nelse:\n print(0)']
['Wrong Answer', 'Accepted']
['s391590019', 's559646582']
[8964.0, 9088.0]
[31.0, 29.0]
[124, 124]
p02582
u469380846
2,000
1,048,576
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.
['n,k=map(int,input().rstrip().split())\np=list(map(int,input().rstrip().split()))\nc=list(map(int,input().rstrip().split()))\ndef find(start,now,up,max,sum,count,flag):\n if start==now:\n flag+=1\n if start==now and flag==2:\n return [max,sum,count]\n elif count==up:\n return [max,sum,count]\n else:\n count+=1\n sum+=c[p[now-1]-1]\n if max<=sum:\n max=sum\n return find(start,p[now-1],up,max,sum,count,flag)\nkara=[]\nif n>k:\n for i in range(1,n+1):\n kara.append(find(i,i,k,c[p[i-1]-1],0,0,0)[0])\n result=max(kara)\nelse:\n for i in range(1,n+1):\n m=find(i,i,n,c[p[i-1]-1],0,0,0)\n if m[1]<=0:\n kara.append(m[0])\n else:\n w=k%m[2]\n spe=find(i,i,w,c[p[i-1]-1],0,0,0)[0]\n if w==0:\n spe=0\n if m[0]>int(m[1]*(k-w)//m[2]+spe):\n kara.append(m[0])\n else:\n kara.append(int(m[1]*(k-w)//m[2]+spe))\n result=max(kara)\nprint(result)\n', "main=input().rstrip()\ncount=0\nflag=0\nfor i in range(3):\n if main[i]=='R' and flag==0:\n count+=1\n elif main[i]=='R' and flag==1:\n count=0\n count+=1\n flag=0\n else:\n flag=1\nprint(count)\n"]
['Runtime Error', 'Accepted']
['s898425323', 's461220693']
[9152.0, 9100.0]
[29.0, 25.0]
[1023, 227]
p02582
u472534477
2,000
1,048,576
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.
['S=list(input())\nans=0\n\nfor i in range(len(S)):\n if ans=0 and S[i]="R":\n ans=1\nfor i in range(len(S)-1):\n if S[i]=="R" and S[i+1]=="R":\n ans+=1\n\nprint(ans)\n\n', 'S=list(input())\nans=0\nfor i in range(len(S)-1):\n if S[i]=="R" and S[i+1]=="R":\n ans+=1\n\nprint(ans)\n\n', 'Slist=list(input())\nans=0\n\nfor i in range(len(S)):\n if ans=0 and S[i]="R":\n ans=1\nfor i in range(len(S)-1):\n if S[i]=="R" and S[i+1]=="R":\n ans+=1\n\nprint(ans)\n\n', 'S=list(input())\nans=0\n\nfor i in range(len(S)):\n if ans==0 and S[i]=="R":\n ans=1\nfor i in range(len(S)-1):\n if S[i]=="R" and S[i+1]=="R":\n ans+=1\n\nprint(ans)\n\n']
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s130263353', 's646332493', 's912981333', 's548876607']
[9012.0, 9020.0, 8940.0, 9104.0]
[27.0, 34.0, 21.0, 28.0]
[176, 110, 180, 178]
p02582
u473234868
2,000
1,048,576
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.
['a = input()\ntotal = 0\nfor i in a[range(1,4)]:\n if i = R:\n total +=1\n else:\n total = 0', "a = input()\ntotal = 0\nfor i in a[range(1,4)]:\n if i = 'R':\n total +=1\n else:\n total = 0\n", "a = input()\nif a =='SSS':\n print(0)\nelif a=='RSS' or'SRS'or 'SSR'or 'RSR':\n print(1)\nelif a == 'RRS'or 'SRR':\n print(2)\nelse:\n print(3)", "a = input()\nif a =='SSS':\n print(0)\nelif a=='RRR':\n print(3)\nelif a == 'RRS' or a== 'SRR':\n print(2)\nelse:\n print(1)\n"]
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s020651068', 's560115576', 's975013173', 's767744980']
[8944.0, 8956.0, 8956.0, 8944.0]
[24.0, 25.0, 28.0, 33.0]
[93, 96, 139, 121]
p02582
u479937725
2,000
1,048,576
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.
['S = input()\nren = 0\n\nif "SSS" in S:\n print(3)\nelif "SS" in S:\n print(2)\nelif "S" in S:\n print(1)\nelse:\n print(0)', 'S = input()\nren = 0\n\nif "RRR" in S:\n print(3)\nelif "RR" in S:\n print(2)\nelif "R" in S:\n print(1)\nelse:\n print(0)']
['Wrong Answer', 'Accepted']
['s077668787', 's233430229']
[9096.0, 9028.0]
[30.0, 34.0]
[116, 116]
p02582
u481919972
2,000
1,048,576
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.
['days = input()\n\nday1 = days[0]\nday2 = days[1]\nday3 = days[2]\n\n\nans = 0\n\nif day1 == "R":\n ans += 1\n if day2 == "R":\n ans += 1\n if day3 == "R":\n ans +=1\n \nif day2 == "R":\n ans += 1\n if day3 == "R":\n ans +=1\n\nif day3 == "R":\n ans +=1\n\nprint(ans)', 'days = input()\n\nday1 = days[0]\nday2 = days[1]\nday3 = days[2]\n\nans = 0\n\nif day1 == "R":\n ans += 1\n if day2 == "R":\n ans += 1\n if day3 == "R":\n ans +=1\nelif day2 == "R":\n ans += 1\n if day3 == "R":\n ans +=1\n\nelif day3 == "R":\n ans +=1\n\nprint(ans)']
['Wrong Answer', 'Accepted']
['s104326776', 's496448640']
[9088.0, 8956.0]
[25.0, 28.0]
[290, 291]
p02582
u486209657
2,000
1,048,576
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.
["S = input()\n\nif S[0] == 'S':\n if S[1] == 'S':\n if S[2] == 'S':\n print(3)\n else:\n print(2)\n else:\n print(1)\nelif S[1] == 'S':\n if S[2] == 'S':\n print(2)\n else:\n print(1)\nelif S[1] == 'R':\n print(0)\n if S[2] == 'S':\n print(1)", "S = input()\n\na = (S[0] == 'S')\nb = (S[1] == 'S')\nc = (S[2] == 'S')\n\nif a and b and c:\n print(3)\nelif (a and b and (c == False)) or ((a == False) and b and c):\n print(2)\nelif (a == False) and (b == False) and (c == False):\n print(0)\nelse:\n print(1)", "S = input()\n \na = (S[0] == 'R')\nb = (S[1] == 'R')\nc = (S[2] == 'R')\n \nif a and b and c:\n print(3)\nelif (a and b and (c == False)) or ((a == False) and b and c):\n print(2)\nelif (a == False) and (b == False) and (c == False):\n print(0)\nelse:\n print(1)"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s452137844', 's885398977', 's955441654']
[9052.0, 8756.0, 9068.0]
[32.0, 26.0, 27.0]
[257, 251, 253]
p02582
u491769203
2,000
1,048,576
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.
['N, X, T = map(int, input().split())\ny = N // X\nc = N % X\nprint((y * T + T) if c else (y * T))', 's=input()\nfor i in range(4)[::-1]:\n if "R"*i in s:\n print(i)\n break']
['Runtime Error', 'Accepted']
['s215062890', 's471152025']
[9140.0, 9044.0]
[27.0, 32.0]
[93, 84]
p02582
u496148227
2,000
1,048,576
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.
['X, K, D = map(int, input().split())\nX_a = abs(X)\nif X_a - K * D > D:\n print(X_a - K * D)\nelse:\n K -= X_a // D\n X_a = X_a % D\n while X_a >= D:\n X_a -= D\n K -= 1\n if K % 2 == 0:\n print(X_a)\n else:\n print(abs(X_a-D))', "S = input()\nif S == 'SSS':\n print(0)\nelif S == 'RRR':\n print(3)\nelif S == 'RRS' or S == 'SRR':\n print(2)\nelse:\n print(1)"]
['Runtime Error', 'Accepted']
['s704140120', 's118380127']
[9084.0, 9092.0]
[28.0, 31.0]
[260, 132]
p02582
u498575211
2,000
1,048,576
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.
["s=input()\nif s=='RRR':\n print(3)\nelif s=='SSS':\n print(0)\nelif (s=='SRR' or s=='RRS'):\n prinr(2)\nelse:\n print(1)", "s=input()\nif s=='RRR':\n print(3)\nelif s=='SSS':\n print(0)\nelif (s=='SRR' or s=='RRS'):\n print(2)\nelse:\n print(1)\n"]
['Runtime Error', 'Accepted']
['s296080406', 's365523274']
[9092.0, 9088.0]
[33.0, 32.0]
[116, 117]
p02582
u498699271
2,000
1,048,576
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.
['S = input()\nif S.contains("RRR"):\n print("3")\nelif S.contains("RR"):\n print("2")\nelif S.contains("R"):\n print("1")\nelse:\n print("0")', 'days = input()\nif days.contains("RRR"):\n print("3")\nelif days.contains("RR"):\n print("2")\nelif days.contains("R"):\n print("1")\nelse:\n print("0")', "s = input().upper()\nif s.count('RRR') == 1:\n print(3)\nelif s.count('RR') == 1:\n print(2)\nelif s.count('R') > 0:\n print(1)\nelse:\n print(0)\n "]
['Runtime Error', 'Runtime Error', 'Accepted']
['s538203366', 's616278175', 's190365319']
[8964.0, 9048.0, 8928.0]
[21.0, 28.0, 32.0]
[144, 156, 144]
p02582
u507456172
2,000
1,048,576
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.
['S = input()\n\nif S.count("RRR") <= 1:\n print("3")\nelif S.count("RR") <= 1:\n print("2")\nelif S.count("R") <= 1:\n print("1")\nelse:\n print("0")', 'S = input()\n\nif S.count("RRR") >= 1:\n print("3")\nelif S.count("RR") >= 1:\n print("2")\nelif S.count("R") >= 1:\n print("1")\nelse:\n print("0")']
['Wrong Answer', 'Accepted']
['s586836952', 's925372120']
[9096.0, 9028.0]
[29.0, 31.0]
[143, 143]
p02582
u514334797
2,000
1,048,576
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.
['S = input()\n\nif S == "RRR":\n print(3)\nelif S == "SSS":\n print(0)\nelif S[0:2] == "R" or S[1:3] == "R":\n print(2)\nelse:\n print(1)', 'S = input()\n\nif S == "RRR":\n print(3)\nelif S[0,1] == "R" or S[1,2] == "R":\n print(2)\nelif S[0,1] == "S" or S[1,2] == "S":\n print(1)\nelse:\n print(0)\n', 'S = input()\n\nif S == "RRR":\n print(3)\nelif S == "SSS":\n print(0)\nelif S[0:2] == "RR" or S[1:3] == "RR":\n print(2)\nelse:\n print(1) ']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s016469479', 's632474738', 's459434920']
[8964.0, 9096.0, 8868.0]
[29.0, 24.0, 29.0]
[139, 160, 142]
p02582
u516494592
2,000
1,048,576
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.
['temp = str(input())\ncount = 0\n\nfor i in temp:\n if i == R:\n count = count + 1\n else:\n count = 0\n \nprint(count)', "temp = str(input())\ncount = 0\nmax_count = 0 \n\nfor i in temp:\n if i == 'R':\n count = count + 1\n max_count = count\n else:\n if max_count < count:\n max_count = count\n count = 0\n \nprint(max_count)"]
['Runtime Error', 'Accepted']
['s798968752', 's121454049']
[9088.0, 9096.0]
[28.0, 33.0]
[120, 213]
p02582
u517674755
2,000
1,048,576
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.
["S = input()\nx = 0\nif S == 'RSR':\n print(1)\nelse:\n for i in S:\n if i == 'R':\n x += 1\n print(a)", 'str = input()\nif str == "RRR":\n print(3)\nelif str == "SSS":\n print(0)\nelif str == "RRS":\n print(2)\nelif str == "SRS":\n print(1)\nelif str == "SRR":\n print(2)\nelif str == "RSR":\n print(1)\nelif str == "RSS":\n print(1)\nelif str == "SSR":\n print(1)\n`', "S = input()\nx = 0\nif S == 'RSR':\n print(1)\nelse:\n for i in S:\n if i == 'R':\n x += 1\n print(x)"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s356827058', 's822147656', 's886664772']
[8984.0, 8908.0, 9032.0]
[25.0, 27.0, 26.0]
[120, 269, 120]
p02582
u518958552
2,000
1,048,576
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.
['a = input()\nif s == "SSS":\n print(0)\nelif s == "SSR":\n print(1)\nelif s == "SRS":\n print(1)\nelif s == "SRR":\n print(2)\nelif s == "RSS":\n print(1)\nelif s == "RSR":\n print(1)\nelif s == "RRS":\n print(2)\nelif s == "RRR":\n print(3)\n\n ', 'a = input()\nb = 0\nif s == "SSS":\n print(0)\nelif s == "SSR":\n print(1)\nelif s == "SRS":\n print(1)\nelif s == "SRR":\n print(2)\nelif s == "RSS":\n print(1)\nelif s == "RSR":\n print(1)\nelif s == "RRS":\n print(2)\nelif s == "RRR":\n print(3)\n\n ', 's = input()\nif s == "SSS":\n print(0)\nelif s == "SSR":\n print(1)\nelif s == "SRS":\n print(1)\nelif s == "SRR":\n print(2)\nelif s == "RSS":\n print(1)\nelif s == "RSR":\n print(1)\nelif s == "RRS":\n print(2)\nelif s == "RRR":\n print(3)\n\n ']
['Runtime Error', 'Runtime Error', 'Accepted']
['s160555559', 's284038825', 's152804231']
[9072.0, 9108.0, 9044.0]
[24.0, 26.0, 30.0]
[259, 265, 259]
p02582
u520697798
2,000
1,048,576
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.
["s = input()\nif s == 'RRR':\n print(3)\nelif s=='RSR' or 'SRS' or 'SSR' or 'RSS':\n print(1)\nelif s == 'RRS' or 'SRR':\n print(2)\nelse:\n print(0)", 'N = int(input())\nA = list(map(int,input().split()))\nA.sort()\ncnt = 0\nfor i in range(0,N):\n for j in range(i+1,N):\n for k in range(j+1,N):\n if (A[i]!=A[k]!=A[j]):\n if (A[i]+A[j])>A[k]:\n cnt+=1\n \nprint(cnt)', "s = input()\nif s == 'RRR':\n print(3)\nelif s=='RSR' or s=='SRS' or s=='SSR' or s=='RSS':\n print(1)\nelif s == s=='RRS' or s=='SRR':\n print(2)\nelse:\n print(0)"]
['Wrong Answer', 'Runtime Error', 'Accepted']
['s035812163', 's939509991', 's166112204']
[8936.0, 9072.0, 8924.0]
[30.0, 23.0, 28.0]
[144, 236, 159]
p02582
u525589885
2,000
1,048,576
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.
['a = input()\ns = 0\nif a == "RRR":\n s = 3\nelif a == "RRS" or a == "SRR":\n s = 2\nelif a = "SSS":\n s = 0\nelse:\n s = 1\nprint(s)', 'a = input()\ns = 0\nif a == "RRR":\n s = 3\nelif a == "RRS" or a == "SRR":\n s = 2\nelif a == "SSS":\n s = 0\nelse:\n s = 1\nprint(s)']
['Runtime Error', 'Accepted']
['s060614143', 's264436483']
[9012.0, 9040.0]
[25.0, 35.0]
[126, 127]
p02582
u536642030
2,000
1,048,576
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.
["s = input()\nsum_ = 0\nif s[0] == 'R':\n sum_ += 1\n if s[1] == 'R':\n sum_ += 1\n if s[2] == 'R':\n sum_ += 1\n else:\n sum_ = 1\nelse:\n if s[1] == 'R':\n sum_ += 1\n if s[2] == 'R':\n sum_ += 1\n else:\n s[2] == 'R':\n sum_ = 1\nprint(sum_)", "s = input()\nsum_ = 0\nif s[0] == 'R':\n sum_ += 1\n if s[1] == 'R':\n sum_ += 1\n if s[2] == 'R':\n sum_ += 1\n else:\n sum_ = 1\nelse:\n if s[1] == 'R':\n sum_ += 1\n if s[2] == 'R':\n sum_ += 1\n else:\n if s[2] == 'R':\n sum_ = 1\nprint(sum_)"]
['Runtime Error', 'Accepted']
['s163589224', 's867374517']
[9024.0, 9104.0]
[24.0, 28.0]
[263, 266]
p02582
u538784937
2,000
1,048,576
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.
["s = input()\nans=0\n\nR = 'R'*i\nfor i in range(1,4):\n R = 'R'*i\n if R in s:\n ans = i\n \nprint(ans)", "s = input()\nans=0\n \n\nfor i in range(1,4):\n R = 'R'*i\n if R in s:\n ans = i\n \nprint(ans)"]
['Runtime Error', 'Accepted']
['s195192628', 's698670329']
[9036.0, 8984.0]
[21.0, 27.0]
[102, 94]
p02582
u539248699
2,000
1,048,576
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.
['s = input()\nx = 0\nfor i in range(3):\n if s[i] == "R":\n x += 1\n else:\n x = 0\nprint(x)', 's = input()\nif "RRR" in s:\n print("3")\nelif "RR" in s:\n print("2")\nelif "R" in s:\n print("1")\nelse:\n print("0")']
['Wrong Answer', 'Accepted']
['s445010913', 's161747189']
[9084.0, 9084.0]
[32.0, 30.0]
[104, 123]
p02582
u539659844
2,000
1,048,576
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.
['a = input()\nif a == "RRR":\n print(0)\nelif a == "RRS" or "RSR" or "SRR":\n print(1)\nelif a == "SSS":\n print(3)\nelse:\n print(2)', 'a = input()\nif a == "RRR":\n print(3)\nelif a in "RR":\n print(2)\nelif a == "SSS":\n print(0)\nelse:\n print(1)', 'a = input()\nif a == "RRR":\n print(3)\nelif "RR" in a:\n print(2)\nelif a == "SSS":\n print(0)\nelse:\n print(1)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s626376550', 's915301881', 's909817746']
[9100.0, 9096.0, 8896.0]
[25.0, 28.0, 33.0]
[128, 109, 109]
p02582
u541055501
2,000
1,048,576
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.
['s=input();s.count(\'R\')-(s=="RSR")', 's=input();print(s.count(\'R\')-(s=="RSR"))']
['Wrong Answer', 'Accepted']
['s269908924', 's947961382']
[9012.0, 9064.0]
[29.0, 28.0]
[33, 40]
p02582
u543489264
2,000
1,048,576
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.
["line = input().split()\n\nans = int(0)\n\nfor l in line:\n\tif l is 'S':\n\t\tbreak\n\tans += 1\n\nprint(ans)\n", 'line = list(input())\nans = int(0)\n\nif line[0] == "R":\n\tans += 1\n\tif line[1] == "R":\n\t\tans += 1\n\t\tif line[2] == "R":\n\t\t\tans+=1\nelse:\n\tif line[1] == "R":\n\t\tans += 1\n\t\tif line[2] == "R":\n\t\t\tans+=1\n\telse:\n\t\tif line[2] == "R":\n\t\t\tans+=1\n\nprint(ans)']
['Wrong Answer', 'Accepted']
['s831056178', 's524883070']
[9020.0, 8992.0]
[31.0, 34.0]
[97, 243]
p02582
u548272916
2,000
1,048,576
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.
["a = input()\ncount = 0\n\nfor i in range(len(a)):\n if i = 'R':\n count += 1\n\nprint(count)", "a = str(input())\ncount = 0\n \nfor i in a:\n if i == 'R':\n count += 1\n else:\n count = 0\n answer = count\n \nprint(answer)", "a = str(input())\n\nif a[0] == 'R' and a[1] == 'R' and a[2] == 'R':\n print(3)\nelif a[1] == 'R' and a[2] == 'R' and a[0] != 'R':\n print(2)\nelif a[0] == 'R' and a[1] == 'R' and a[0] != 'R':\n print(2)\nelif 'R' not in a:\n print(0)\nelse:\n print(1)", "a = str(input())\n\nif a[0] == 'R' and a[1] == 'R' and a[2] == 'R':\n print(3)\nelif a[1] == 'R' and a[2] == 'R' and a[0] != 'R':\n print(2)\nelif a[0] == 'R' and a[1] == 'R' and a[2] != 'R':\n print(2)\nelif 'R' not in a:\n print(0)\nelse:\n print(1)"]
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s310320184', 's394835537', 's543745724', 's690729712']
[8944.0, 9004.0, 8996.0, 9020.0]
[26.0, 27.0, 26.0, 27.0]
[89, 125, 245, 245]
p02582
u548684908
2,000
1,048,576
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.
["S = input()\ncnt = 0\nfor i in range(len(S)):\n if S[i] == 'R':\n cnt += 1\n else:\n cnt = 0\nprint(cnt)", "S = input()\ncnt = 0\nfor i in range(1,len(S)):\n if S[i-1] == 'R' and S[i] == 'R':\n cnt += 1\n else:\n cnt = 0\nprint(cnt)", "S = input()\ncnt = 0\nM = 0\nfor i in range(len(S)):\n if S[i] == 'R':\n cnt += 1\n else:\n cnt = 0\n if cnt > M:\n M = cnt\nprint(M)\n"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s248386505', 's979032325', 's343335123']
[9024.0, 9044.0, 9024.0]
[35.0, 33.0, 34.0]
[117, 137, 154]
p02582
u550091708
2,000
1,048,576
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.
["S = input()\n\nn_rainy_day = 0\n\nfor i in range(3):\n if S[i] == 'S':\n if n_rainy_day == 0: \n n_rainy_day += 1\n elif S[i-1] == 'S':\n n_rainy_day += 1\n \nprint(n_rainy_day)\n", "S = input()\n\nn_rainy_day = 0\n\nfor i in range(3):\n if S[i] == 'S':\n n_rainy_day += 1\n \nprint(n_rainy_day)\n", "S = input()\n\nn_rainy_day = 0\n\nfor i in range(3):\n if S[i] == 'R':\n if n_rainy_day == 0:\n n_rainy_day += 1\n elif S[i-1] == 'R':\n n_rainy_day += 1\n \nprint(n_rainy_day)"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s062263892', 's371779590', 's297944505']
[8940.0, 8912.0, 9032.0]
[29.0, 26.0, 31.0]
[198, 112, 191]
p02582
u551437236
2,000
1,048,576
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.
['ss=input()\nif ss[0] == ss[1] ==s[2] = "R":\n print(3)\nelif ss[0] == s[1] = "R" or ss[1]==ss[2] = "R" or ss[2] == ss[0] = "R"\n print(2)\nelif "R" in ss:\n print(1)\nelse:\n print(0)', 'ss=input()\nif ss[0] == ss[1] ==s[2] == "R":\n print(3)\nelif ss[0] == s[1] == "R" or ss[1]==ss[2] == "R" or ss[2] == ss[0] == "R"\n print(2)\nelif "R" in ss:\n print(1)\nelse:\n print(0)\n', 'ss=input()\nif ss[0] == ss[1] ==ss[2] == "R":\n print(3)\nelif ss[0] == ss[1] == "R" or ss[1]==ss[2] == "R":\n print(2)\nelif "R" in ss:\n print(1)\nelse:\n print(0)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s373647053', 's891065399', 's605968854']
[9008.0, 8976.0, 8976.0]
[29.0, 24.0, 29.0]
[179, 184, 161]
p02582
u553600587
2,000
1,048,576
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.
['X, K, D = [int(x) for x in input().strip().split(" ")]\n\nk, x = divmod(X, D)\nif K >= k:\n X = x\n K -= k\n if k % 2 == 0:\n print(abs(X))\n elif X < 0:\n print(abs(X + D))\n else:\n print(abs(X - D))\nelif X < 0:\n print(abs(X + D * K))\nelse:\n print(abs(X - D * K))', 'S = input().strip()\n\nif S == "RRR":\n print(3)\nelif "RR" in S:\n print(2)\nelif "R" in S:\n print(1)\nelse:\n print(0)']
['Runtime Error', 'Accepted']
['s218585868', 's321854377']
[9188.0, 9024.0]
[22.0, 31.0]
[296, 124]
p02582
u556594202
2,000
1,048,576
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.
['S = input()\nif S.count("SSS")>=1:\n print(3)\n exit()\nif S.count("SS")>=1:\n print(2)\n exit()\nif S.count("S")==0:\n print(0)\n exit()\nelse:\n print(1)\n', 'S = input()\nif S.count("RRR")>=1:\n print(3)\n exit()\nif S.count("RR")>=1:\n print(2)\n exit()\nif S.count("R")==0:\n print(0)\n exit()\nelse:\n print(1)\n']
['Wrong Answer', 'Accepted']
['s788565912', 's850559028']
[9112.0, 9060.0]
[31.0, 34.0]
[166, 166]
p02582
u557190902
2,000
1,048,576
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.
['\n\nS = input()\nif S == "RRR":\n print(3)\nif S == "RRS"or S == "SRR" :\n print(2)\nif S == "SSS":\n print(0)\nelse:\n print(1)', '\n\nS = input()\nif S == "RRR":\n print(3)\n if S == "RRS"or S == "SRR" :\n print(2)\n if S == "SSS":\n print(0)\n else:\n print(1)\n ', '\n\nS = input()\nif S == "RRR":\n print(3)\nif S == "RRS"or S == "SRR" :\n print(2)\nif S == "RSR"or S == "RSS" or S == "SRS" or S == "SSR":\n print(1)\nif S == "SSS":\n print(0) ']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s022485148', 's552679235', 's090793307']
[9040.0, 8904.0, 8912.0]
[27.0, 28.0, 26.0]
[138, 183, 189]
p02582
u559330355
2,000
1,048,576
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.
['weather = input()\n\nelif weather in ["RRR"]:\n print("3")\nelif weather in ["SRR","RRS"]:\n print("2")\nelif weather in ["SSR","SRS","RSS","RSR"]:\n print("1")\nelse:\n print("0")', 'weather = input()\n\nif weather in [RRR]:\n print("3")\nelif weather in [RR]:\n print("2")\nelif weather in [R]:\n print("1")\nelse:\n print("0")', 'weather = input()\n\nif weather in ["RRR"]:\n print("3")\nelif weather in ["SRR","RRS"]:\n print("2")\nelif weather in ["SSR","SRS","RSS","RSR"]:\n print("1")\nelse:\n print("0")']
['Runtime Error', 'Runtime Error', 'Accepted']
['s790915931', 's926259680', 's988722710']
[8948.0, 9092.0, 9040.0]
[28.0, 28.0, 29.0]
[183, 148, 181]
p02582
u560222605
2,000
1,048,576
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.
["a=s.count('R')\nif a==0:\n print(a)\nelif s[1]=='S':\n print(a-1)\nelse:\n print(a)", "s=input()\na=s.count('R')\nif a==0:\n print(a)\nelif s[1]=='S' and a==2:\n print(a-1)\nelse:\n print(a)"]
['Runtime Error', 'Accepted']
['s542350162', 's485570203']
[9020.0, 9032.0]
[23.0, 31.0]
[86, 105]
p02582
u561615664
2,000
1,048,576
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.
['a,b,c = map(input().split())\n\nif a == R:\n if b == R:\n if c == R:\n print(3)\n else:\n print(2)\n else:\n print(1)\nelse:\n if b == R:\n if c == R:\n print(2)\n else:\n print(1)\n else:\n if c == R:\n print(1)\n else:\n print(0)\n', 'N = int(input())\nL = list(int, input())\ncount = 0\n\nfor i in range(N-2):\n Li = L[i]\n for j in range(i+1, N-1):\n Lj = L[j]\n for k in range(j+1, N):\n Lk = L[k]\n if (Li == Lj) or (Lj == Lk) or (Lk == Li):\n continue\n else:\n if ((Li + Lj) >= Lk) and ((Li + Lk) >= Lj) and ((Lk + Lj) >= Li):\n count = count + 1\nprint(count)', 'N = int(input())\nL = list(input().split())\ncount = 0\n\nfor i in range(N-2):\n Li = L[i]\n for j in range(i+1, N-1):\n Lj = L[j]\n for k in range(j+1, N):\n Lk = L[k]\n if (Li == Lj) or (Lj == Lk) or (Lk == Li):\n continue\n else:\n if ((Li + Lj) >= Lk) and ((Li + Lk) >= Lj) and ((Lk + Lj) >= Li):\n count = count + 1\nprint(count)', 'a, b, c = input()\n\nif a == R:\n if b == R:\n if c == R:\n print(3)\n else:\n print(2)\n else:\n print(1)\nelse:\n if b == R:\n if c == R:\n print(2)\n else:\n print(1)\n else:\n if c == R:\n print(1)\n else:\n print(0)\n', 'N = int(input())\nL = list(int, input().split())\ncount = 0\n\nfor i in range(N-2):\n Li = L[i]\n for j in range(i+1, N-1):\n Lj = L[j]\n for k in range(j+1, N):\n Lk = L[k]\n if (Li == Lj) or (Lj == Lk) or (Lk == Li):\n continue\n else:\n if ((Li + Lj) >= Lk) and ((Li + Lk) >= Lj) and ((Lk + Lj) >= Li):\n count = count + 1\nprint(count)', 'a, b, c = input().split()\n\nif a == R:\n if b == R:\n if c == R:\n print(3)\n else:\n print(2)\n else:\n print(1)\nelse:\n if b == R:\n if c == R:\n print(2)\n else:\n print(1)\n else:\n if c == R:\n print(1)\n else:\n print(0)', 'a,b,c = input().split()\n\nif a == R:\n if b == R:\n if c == R:\n print(3)\n else:\n print(2)\n else:\n print(1)\nelse:\n if b == R:\n if c == R:\n print(2)\n else:\n print(1)\n else:\n if c == R:\n print(1)\n else:\n print(0)', "A = list(input())\n\nn = A.count('R')\nif n != 2:\n print(n)\nelse:\n m = A.index('S')\n if m == 1:\n print(1)\n else:\n print(2)"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s176349176', 's189569062', 's215336243', 's249754711', 's324510791', 's644928494', 's648569913', 's559575970']
[9116.0, 9120.0, 8940.0, 9112.0, 9120.0, 8980.0, 9044.0, 9028.0]
[25.0, 23.0, 23.0, 25.0, 26.0, 28.0, 24.0, 29.0]
[339, 418, 421, 328, 426, 335, 333, 145]
p02582
u567351889
2,000
1,048,576
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.
['N = int(input())\nL = int(input().split())\nL2 = set(L) \n\nans = 0\n\nfor i in len(L2):\n for j in range(i+1, len(L2)):\n for k in range(i+2, len(L2)):\n l = [i, j, k]\n l = sorted(l, reverse = True)\n if l[0] < l[1] + l[2]:\n ans += L.count(i) * L.count(j) * L.count(k)\n\nprint(ans) \n \n', "s = input().replace('R','S')\n\nif s == '':\n print(0)\nelse:\n print(len(s))", "s = input()\n\nans = 0\n\nif 'R' in s:\n ans = 1\nelif 'RR' in s:\n ans = 2\nelif s == 'RRR':\n ans = 3\n \nprint(ans)\n ", "s = input().split('S')\n\nans = 0\n\nfor i in s:\n if len(i) > ans:\n ans = len(i)\n \nprint(ans)\n"]
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s043145445', 's861704606', 's968418678', 's568566117']
[9188.0, 9000.0, 8956.0, 9024.0]
[25.0, 28.0, 25.0, 27.0]
[326, 74, 114, 97]
p02582
u568512222
2,000
1,048,576
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.
["inn = input()\nnumS = 0\nfor c in inn:\n if c == 'R':\n numS += 1\nif numR != 2:\n print(numR)\nelse:\n print(1 if inn[1] == 'S' else 2)", "inn = input()\nnumS = 0\nfor c in inn:\n if c == 'R':\n numS += 1\nif numR != 2:\n print(numR)\nelse:\n print(1 if inn[1] == 'S' else 2);", "inn = input()\nnumR = 0\nfor c in inn:\n if c == 'R':\n numR += 1\nif numR != 2:\n print(numR)\nelse:\n print(1 if inn[1] == 'S' else 2)"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s173417687', 's716168227', 's515610474']
[8828.0, 8932.0, 9040.0]
[24.0, 24.0, 30.0]
[144, 145, 144]
p02582
u570155187
2,000
1,048,576
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.
['x,k,d = list(map(int,input().split()))\n\nxi = abs(x)\nif abs(x) > d*k:\n m = min(abs(x+d*k),abs(x-d*k))\nelse:\n for _ in range(k):\n xi -= d\n if xi < 0:\n m = min(abs(xi),abs(xi+d),abs(xi-d))\n break\nprint(m)', 's = input()\n\nif s == "RRR":\n d = 3\nelif s == "RRS" or s == "SRR":\n d = 2\nelif s == "SSS":\n d = 0\nelse:\n d = 1\nprint(d)']
['Runtime Error', 'Accepted']
['s235171877', 's120574326']
[9176.0, 9024.0]
[34.0, 31.0]
[219, 122]
p02582
u571999153
2,000
1,048,576
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.
["word = input():\nif word == 'SSS':\n print(0)\nif word == 'SSR':\n print(1)\nif word == 'SRS':\n print(1)\nif word == 'RSS':\n print(1)\nif word == 'SRR':\n print(2)\nif word == 'RRS':\n print(2)\nif word == 'RSR':\n print(1)\nif word == 'RRR':\n print(3)", "word = input()\nif word == 'SSS':\n print(0)\nif word == 'SSR':\n print(1)\nif word == 'SRS':\n print(1)\nif word == 'RSS':\n print(1)\nif word == 'SRR':\n print(2)\nif word == 'RRS':\n print(2)\nif word == 'RSR':\n print(1)\nif word == 'RRR':\n print(3)\n"]
['Runtime Error', 'Accepted']
['s414573318', 's801782864']
[8972.0, 9044.0]
[25.0, 31.0]
[247, 247]
p02582
u572612802
2,000
1,048,576
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.
["S = input()\nif S == 'RSR' or 'RSS' or 'SRS' or 'SSR' :\n print(1)\nelif S == 'SSS' :\n print(0)\nelif S == 'RRR' :\n print(3)\nelse :\n print(2)\n \n ", "S = input()\nif S == 'RSR' or S == 'RSS' or S == 'SRS' or S == 'SSR' :\n print(1)\nelif S == 'SSS' :\n print(0)\nelif S == 'RRR' :\n print(3)\nelse :\n print(2)\n \n \n"]
['Wrong Answer', 'Accepted']
['s315604055', 's392286040']
[9028.0, 9028.0]
[25.0, 26.0]
[147, 163]
p02582
u574027201
2,000
1,048,576
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.
['inp = input()\ncount=0\nres=0\nfor ch in inp:\n if ch=="R":\n count+=1\n else:\n res=max(res,count)\n count=0\nprint(count)\n', 'count=0 \nres=0 \nfor ch in inp: \n if ch=="R": \n count+=1 \n res = max(res,count) \n else: \n res=max(res,count) \n count=0 \nprint(res)', 'inp = input()\ncount=0\nres=0\nfor ch in inp:\n if ch=="R":\n count+=1\n else:\n res=max(res,count)\n count=0\nres=max(res,count)\nprint(count)\n', 'inp =input()\ncount=0 \nres=0 \nfor ch in inp: \n if ch=="R": \n count+=1 \n res = max(res,count) \n else: \n res=max(res,count) \n count=0 \nprint(res)\n']
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s293477481', 's470385955', 's745510720', 's358895047']
[9096.0, 9048.0, 9104.0, 9104.0]
[25.0, 26.0, 26.0, 27.0]
[126, 143, 145, 157]
p02582
u577460726
2,000
1,048,576
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.
["counter = 0\nfor i in S:\n\tif i == 'S':\n\t\tcounter = 0\n\telif i == 'R':\n \tcounter += 1\n\nprint(counter)", "counter = 0\nfor i in S:\n if i == 'S':\n counter = 0\n elif i == 'R':\n counter += 1\n\nreturn counter\n", "S = input()\nmax_count = 0\ncounter = 0\nfor i in S:\n if i == 'S':\n if max_counter < counter:\n max_count = counter\n counter = 0\n elif i == 'R':\n counter += 1\n\nif max_counter < counter:\n max_count = counter\n\nprint(max_counter)\n", "S = input()\ncounter = 0\nfor i in S:\n if i == 'S':\n counter = 0\n elif i == 'R':\n counter += 1\n\nprint(counter)", "counter = 0\nfor i in S:\n\tif i == 'S':\n\t\tcounter = 0\n\telif i == 'R':\n \tcounter += 1\n\nreturn counter\n", "S = input()\ncounter = 0\nfor i in S:\n if i == 'S':\n counter = 0\n elif i == 'R':\n counter += 1\n\nreturn counter\n", "S = input()\nmax_count = 0\ncounter = 0\nfor i in S:\n if i == 'S':\n if max_count < counter:\n max_count = counter\n counter = 0\n elif i == 'R':\n counter += 1\n\nif max_count < counter:\n max_count = counter\n\nprint(max_count)\n"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s045883346', 's106843548', 's110902176', 's152432164', 's780789182', 's980109175', 's085641745']
[8940.0, 8936.0, 9064.0, 9036.0, 8956.0, 9004.0, 9096.0]
[27.0, 22.0, 26.0, 27.0, 21.0, 26.0, 28.0]
[103, 105, 242, 116, 104, 117, 236]
p02582
u578441226
2,000
1,048,576
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.
['s = input()\n\nif s[0] == "S":\n if s[1] == "S":\n if s[2] == "S":\n print("3")\n else:\n print("2")\n else:\n print("1")\n \nelif s[1] == "S":\n if s[2] == "S":\n print("2")\n else:\n print("1")\nelif s[2] == "S":\n print("1")\nelse:\n print("0")', 's = input()\n\nr = ["RRS","RRR","RSR","SRR","SSR","RSS","SSS","SRS"]\nra = [2,3,1,2,1,1,0,1]\nfor i in range(8):\n if r[i] == s:\n print(ra[i])']
['Wrong Answer', 'Accepted']
['s170977464', 's902070756']
[9052.0, 9036.0]
[30.0, 27.0]
[427, 147]
p02582
u579610094
2,000
1,048,576
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.
["string=input()\n\nr=0\nfor i in range(len(string)-1):\n if string[i]=='R' and string[i+1]=='R':\n r+=1\nprint(r)\n", 'string=input()\n\nr=0\nif string=="RRR":\n\tr=3\nelif string=="RRS" or string =="SRR":\n\tr=2\nelif string==\'RSS\' or string==\'SRS\' or string==\'SSR\' or string==\'RSR\':\n\tr=1\nprint(r)\n']
['Wrong Answer', 'Accepted']
['s820538083', 's097531565']
[9080.0, 9092.0]
[30.0, 29.0]
[111, 171]
p02582
u586160264
2,000
1,048,576
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.
["L = []\n\nfor i in range(3):\n\tL.append(input())\n\n \nc=0\nans=0\n\nfor i in range(3):\n\tif L[i] == 'R':\n if c !=0:\n ans = 1\n else:\n \tans += 1\n if L[i] == 'S':\n c += 1\n \nprint(ans)\n \t", "\n\nL = []\n \nfor i in range(3):\n\tL.append(input())\n \n \nc=0\nans=0\n \nfor i in range(3):\n\tif L[i] == 'R':\n \t\t if c != 0:\n \t\t\tans = 1\n\telse:\n \t\tans += 1\n\n\tif L[i] == 'S':\n \t\tc += 1\n \nprint(ans)", "\n\nL = []\nL.append(input())\n\nif L[0] == 'SSS':\n\tprint(0)\nelif L[0] == 'RRR':\n\tprint(3)\nelif L[0] == 'SSR' or L[0] == 'SRS':\n\tprint(1)\nelif L[0] =='RSS':\n\tprint(1)\nelif L[0] == 'SRR' or L[0] == 'RRS':\n\tprint(2)\nelif L[0] == 'RSR':\n\tprint(1)\n"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s114228044', 's196020776', 's308873620']
[9016.0, 9116.0, 9052.0]
[23.0, 25.0, 28.0]
[217, 216, 239]
p02582
u587429593
2,000
1,048,576
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.
['s = str(input())\nif s.count("R") = 3:\n print(3)\n elif s.count("R") = 2:\n print(2)\n elif s.count("R") = 1:\n print(1)\n else:\n print(0)', 'if S = "RRR":\n print(3)\n elif S = "RRS" or S = "SRR":\n print(2)\n elif S = "SSS":\n print(0)\n else:\n print(1)', 'S = str(input())\nif S = "RRR":\n print(3)\nelif S = "RRS" or S = "SRR":\n print(2)\nelif S = "RSR":\n print(1)\nelse S = "SSS":\n print(0)', 's = str(input())\nif "RRR" in s:\n print(3)\n elif "RR" in s:\n print(2)\n elif "SSS" in s:\n print(0)\n else:\n print(1)', 's = str(input())\nif s = "RRR":\n print(3)\nif s = "RRS" and s = "SRR":\n print(2)\nif s = "RSS" and s = "SRS" and s = "SSR" and s = "RSR":\n print(1)\nif s = "SSS":\n print(0)', 's = input()\nif s = "RRR":\n print(3)\n elif s = "RRS" or s = "SRR":\n print(2)\n elif s = "SSS":\n print(0)\n else:\n print(1)', 's = str(input())\nif s = "RRR":\n print(3)\nelif s = "RRS" and s = "SRR":\n print(2)\nelif s = "RSS" and s = "SRS" and s = "SSR" and s = "RSR":\n print(1)\nelse:\n print(0)\n', 's = input()\nif s == "RRR":\n print(3)\n elif s == "RRS" or s == "SRR":\n print(2)\n elif s == "SSS":\n print(0)\n else:\n print(1)', 's = str(input())\nif s = "RRR":\n print(3)\nelif s = "RRS" or s = "SRR":\n print(2)\nelif s = "RSS" or s = "SRS" or s = "SSR" or s = "RSR":\n print(1)\nelse:\n print(0)', 's = str(input())\nif RRR in s:\n print(3)\n elif RR in s:\n print(2)\n elif SSS in s:\n print(0)\n else:\n print(1)', 's = input()\nif s == "RRR":\n print(3)\nif s == "SSS":\n print(0)\nif s == "RRS":\n print(2)\nif s == "SRR":\n print(2)\nif s == "RSS":\n print(1)\nif s == "SRS":\n print(1)\nif s == "SSR":\n print(1)\nif s == "RSR":\n print(1)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s104204968', 's193718120', 's399755207', 's568299166', 's645311034', 's662916634', 's710348958', 's767980647', 's906376622', 's915372898', 's784646730']
[9000.0, 9008.0, 8852.0, 8820.0, 8860.0, 8988.0, 9004.0, 8832.0, 8944.0, 8912.0, 9120.0]
[29.0, 24.0, 30.0, 27.0, 24.0, 25.0, 25.0, 31.0, 27.0, 22.0, 31.0]
[157, 132, 135, 138, 172, 144, 169, 148, 164, 132, 219]
p02582
u589578850
2,000
1,048,576
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.
['s = input()\ncnt = 0\nfor i in range(3):\n if s[i] == "R":\n cnt += 1\n else:\n cnt = 0\nprint(cnt)\n ', 's = input()\ncnt = 0\nl =[]\nfor i in range(3):\n if s[i] == "R":\n cnt += 1\n else:\n l.append(cnt)\n cnt = 0\n\nl.append(cnt)\n\nprint(max(l))']
['Wrong Answer', 'Accepted']
['s516552322', 's181485478']
[8988.0, 8896.0]
[29.0, 31.0]
[117, 159]
p02582
u590145149
2,000
1,048,576
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.
["s = input().strip().split('S')\nprint(max(s, key = len))\n", "s = input().strip().split('S')\nprint(len(max(s, key = len)))\n"]
['Wrong Answer', 'Accepted']
['s948823151', 's639533708']
[9096.0, 9072.0]
[32.0, 31.0]
[56, 61]
p02582
u597455618
2,000
1,048,576
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.
['s = input()\nans = 0\ntmp = 0\nfor i in range(3):\n print(s[i])\n if s[i] == "R":\n tmp += 1\n else:\n ans = tmp\n tmp = 0\nif ans < tmp:\n ans = tmp\nprint(ans )\n', 's = input()\nans = 0\ntmp = 0\nfor i in range(3):\n if s[i] == "R":\n tmp += 1\n else:\n ans = tmp\n tmp = 0\nans = tmp\nprint(ans )\n', 's = input()\nprint(len(max(s.split("S"))))']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s176737878', 's829700735', 's737319184']
[9064.0, 9024.0, 8976.0]
[31.0, 31.0, 28.0]
[184, 150, 41]
p02582
u602081607
2,000
1,048,576
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.
['S = input()\nprint(max([len(i) for i in S.split("R")]))', 'S = input()\nprint(max([len(i) for i in S.split("S")]))']
['Wrong Answer', 'Accepted']
['s192116159', 's038998703']
[9088.0, 9020.0]
[34.0, 32.0]
[54, 54]
p02582
u602873084
2,000
1,048,576
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.
["import sys\n\ndef read_input():\n return sys.stdin.readline().strip().split(' ')\n\ndef task(s):\n rainy_til = []\n l = len(s)\n i = 0\n while i < l:\n if s[i] == 'R':\n last_rainy = rainy_til[i-1] if i > 0 else 0\n rainy_til[i] = last_rainy + 1\n else:\n rainy_til[i] = 0\n return max(rainy_til)\n\ndef main():\n s = read_input()\n result = task(s)\n print(result)\n", "import sys\n \ndef read_input():\n return sys.stdin.readline().strip().split(' ')\n \ndef task(s):\n rainy_til = []\n l = len(s)\n i = 0\n while i < l:\n if s[i] == 'R':\n last_rainy = rainy_til[i-1] if i > 0 else 0\n rainy_til[i] = last_rainy + 1\n else:\n rainy_til[i] = 0\n return max(rainy_til)\n \ndef main():\n s = read_input()\n result = task(s)\n print(result)\n\nmain()\n", "import sys\n\n\ndef read_input():\n return sys.stdin.readline().strip().split(' ')\n\n\ndef task(s):\n rainy_til = []\n l = len(s)\n i = 0\n while i < l:\n if s[i] == 'R':\n last_rainy = rainy_til[i - 1] if i > 0 else 0\n rainy_til.append(last_rainy + 1)\n else:\n rainy_til.append(0)\n i += 1\n return max(rainy_til)\n\n\ndef main():\n [s] = read_input()\n result = task(s)\n print(result)\n\n\nmain()\n"]
['Wrong Answer', 'Runtime Error', 'Accepted']
['s000458752', 's661529545', 's708354665']
[9080.0, 9052.0, 9076.0]
[25.0, 28.0, 24.0]
[376, 387, 457]
p02582
u607629451
2,000
1,048,576
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.
['s = input()\n\nif s == "S" :\n print(\'天気が雨である日が連続していた最大の日数を入力せよ\')\nelif s == "RRR" :\n print(3)\nelif s == "RR" :\n print(2)\nelif s == "R" :\n print(1)\nelse :\n print(0)', 's = input()\n\nif s == "S" :\n print(\'天気が雨である日が連続していた最大の日数を入力せよ\')\nelif s == "RRR" :\n print(3)\nelif s == "RRS" or s =="SRR" :\n print(2)\nelif s == "SSS" :\n print(0)\nelse :\n print(1)']
['Wrong Answer', 'Accepted']
['s408816155', 's217626072']
[8956.0, 9004.0]
[29.0, 25.0]
[225, 241]
p02582
u608262290
2,000
1,048,576
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.
["N = list(input())\n\n#print(N)\n\ndef count(list_1):\n return list_1.count('R')\n\n#print(count(N))", "N = list(input())\n\n#print(N)\n\ndef count(list_1):\n count_2 = 0\n count_1 = 0\n for a in range(len(list_1)):\n if list_1[a] == 'R':\n count_1 += 1\n else:\n count_1 = 0\n if count_2 < count_1:\n count_2 = count_1\n #print(count_2)\n return count_2\n\nprint(count(N))"]
['Wrong Answer', 'Accepted']
['s607768615', 's888555087']
[9080.0, 9068.0]
[24.0, 27.0]
[95, 329]
p02582
u612635771
2,000
1,048,576
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.
['s = input()\nprint("3" if "RRR" in s else "2" if "RR" in s else "1" "R" in s else "0" )', 's = input()\nprint("3" if "RRR" in s else "2" if "RR" in s else "1" if "R" in s else "0" )']
['Runtime Error', 'Accepted']
['s050640174', 's239298908']
[9016.0, 9016.0]
[23.0, 29.0]
[86, 89]
p02582
u614181788
2,000
1,048,576
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.
['s = input()\nans = 0\nif "S" in s:\n ans = 1\nif "SS" in s:\n ans = 2\nif s == "SSS":\n ans = 3\nprint(ans)', 's = input()\nans = 0\nif "R" in s:\n ans = 1\nif "RR" in s:\n ans = 2\nif s == "RRR":\n ans = 3\nprint(ans)']
['Wrong Answer', 'Accepted']
['s478260939', 's809528566']
[8908.0, 9032.0]
[32.0, 32.0]
[108, 108]
p02582
u618532828
2,000
1,048,576
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.
["S= input()\n\nif S.count('RRR') == 1:\n print(3)\nelif S.count('RR') == 1:\n print(2)\nelif S.count('RSR') == 1 or S.count('RSS') == 1 or S.count('SRS') == 1 or S.count('SSR') == 1\n print(1)\nelse:\n print(0)\n", "S= input()\n\nif S.count('RRR') == 1:\n print(3)\nelif S.count('RR') == 1:\n print(2)\nelif S.count('RSR') == 1 or S.count('RSS') == 1 or S.count('SRS') == 1 or S.count('SSR') == 1:\n print(1)\nelse:\n print(0)\n"]
['Runtime Error', 'Accepted']
['s054756753', 's520250784']
[9020.0, 9096.0]
[25.0, 29.0]
[213, 214]
p02582
u618747173
2,000
1,048,576
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.
["def A(S):\n answer = 0\n\n if S[1] == 'R':\n answer += 1\n if S[0] == 'R':\n answer += 1\n if S[2] == 'R':\n answer += 1\n elif S[0] == 'R' or S[2] == 'R':\n answer = 1\n\n return answer\n\n \n print(A(input()))", "def A(S):\n answer = 0\n\n if S[1] == 'R':\n answer += 1\n if S[0] == 'R':\n answer += 1\n if S[2] == 'R':\n answer += 1\n elif S[0] == 'R' or S[2] == 'R':\n answer = 1\n\n return answer\n\n \nS = input()\nprint(A(S))"]
['Runtime Error', 'Accepted']
['s708729556', 's562443596']
[8964.0, 8980.0]
[32.0, 26.0]
[259, 264]
p02582
u623687794
2,000
1,048,576
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.
['import sys\ninput = sys.stdin.readline\nn,K=map(int,input().split())\np=list(map(lambda x:int(x)-1,input().split()))\nc=list(map(int,input().split()))\nif K == 1:\n print(max(c));exit()\nans = -10**10\ndef cycle(k):\n mo=k\n clen=0\n cscore=0\n flg = True\n cmax=[-10**10]\n while (mo != k or flg):\n clen+=1\n cscore+=c[mo]\n mo = p[mo]\n cmax.append(max(cmax[-1],cscore))\n if mo == k:\n flg = False\n if cscore<0:\n return cmax[min(K-1,clen-1)]\n return cscore*((K-1)//clen)+cmax[(K-1)%clen+1]\nfor i in range(n):\n a=cycle(i)\n if a>ans:\n ans = a\nprint(ans)\n', 's = input()\nif "RRR" in s:\n print(3)\nelif "RR" in s:\n print(2)\nelif "R" in s:\n print(1)\nelse:\n print(0)']
['Runtime Error', 'Accepted']
['s500819150', 's052607710']
[9204.0, 9084.0]
[26.0, 24.0]
[629, 107]
p02582
u625549378
2,000
1,048,576
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.
['c_place, N, distance = [ int(v) for v in input().split(" ") ]\n\nmax_distance = distance * N\ncandidate=[]\n\n#for n in range(1, N):\n# candidate.append(abs(c_place - distance*n))\n\nn = c_place // distance\ncandidate.append(abs(c_place - distance*n))\ncandidate.append(abs(c_place - distance*(n+1)))\n\n#print(n, n+1)\n#print(candidate)\n\nif c_place > max_distance:\n print(c_place - max_distance)\nelse:\n if N % (n+1) == 0:\n print(candidate[1])\n else:\n print(min(candidate))', "days = input()\n\n\n\nresult = []\n\nnum = 0\nfor d in days:\n if d == 'R':\n num += 1\n else:\n result.append(num)\n num = 0\nresult.append(num)\n\nprint(max(result))"]
['Runtime Error', 'Accepted']
['s374967399', 's829929864']
[9116.0, 9092.0]
[30.0, 31.0]
[470, 163]
p02582
u625864724
2,000
1,048,576
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.
['s = input()\nif (s = "SSS"):\n print("0")\nelif (s = "SSR"):\n print("1")\nelif (s = "SRS"):\n print("1")\nelif (s = "RSS"):\n print("1")\nelif (s = "SRR"):\n print("2")\nelif (s = "RSR"):\n print("1")\nelif (s = "RRS"):\n print("2")\nelse:\n print("3")\n ', 's = input()\nif (s == "SSS"):\n print("0")\nelif (s == "SSR"):\n print("1")\nelif (s == "SRS"):\n print("1")\nelif (s == "RSS"):\n print("1")\nelif (s == "SRR"):\n print("2")\nelif (s == "RSR"):\n print("1")\nelif (s == "RRS"):\n print("2")\nelse:\n print("3")']
['Runtime Error', 'Accepted']
['s178130772', 's853195783']
[9000.0, 9116.0]
[28.0, 33.0]
[248, 252]
p02582
u629355744
2,000
1,048,576
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.
["S = input()\n\ncnt = 0\nmax_cnt=0\n\nif S[0] == 'R':\n cnt += 1\n\nfor i in range(1,3):\n if S[i] == 'R':\n cnt+=1\n print('i')\n else:\n if cnt > max_cnt:\n max_cnt = cnt\n cnt = 0\n \nif S[len(S)-1] == 'R' and max_cnt == 0:\n max_cnt = 1\nif cnt > max_cnt:\n max_cnt = cnt\nprint(max_cnt)", "S = input()\n\ncnt = 0\nmax_cnt=0\n\nif S[0] == 'R':\n cnt += 1\n\nfor i in range(1,3):\n if S[i] == 'R':\n cnt+=1\n # print('i')\n else:\n if cnt > max_cnt:\n max_cnt = cnt\n cnt = 0\nif cnt > max_cnt:\n max_cnt = cnt \nif S[len(S)-1] == 'R' and max_cnt == 0:\n max_cnt = 1\n\nprint(max_cnt)"]
['Wrong Answer', 'Accepted']
['s384712707', 's233057215']
[9116.0, 8972.0]
[28.0, 27.0]
[330, 332]
p02582
u631128089
2,000
1,048,576
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.
["day=input()\nresMax=0\nresTemp=0\nfor i in range(len(day)):\n if day[i]=='S':\n resTemp=0\n elif day[i]=='R':\n while(day[i]!='S'):\n resTemp+=1\n i+=1\n if resMax<resTemp:\n resMax=resTemp\nprint(resMax)\n ", "day = input()\nresMax = 0\nresTemp = 0\nfor i in range(len(day)):\n if day[i]=='S':\n resTemp=0\n elif day[i]=='R':\n resTemp=0\n while (i<len(day)) and (day[i]!='S'):\n resTemp+=1\n i+=1\n if resTemp>resMax:\n resMax=resTemp\nprint(resMax)"]
['Runtime Error', 'Accepted']
['s232642577', 's493556737']
[9016.0, 8868.0]
[26.0, 30.0]
[219, 256]
p02582
u633535831
2,000
1,048,576
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.
['#from functools import lru_cache\nimport sys\nfrom itertools import product,combinations,accumulate\nfrom functools import reduce,lru_cache\nimport heapq\n\ndef vfunc(f): return lambda *lst, **kwargs: list(map(lambda *x:f(*x,**kwargs),*lst))\n\ndef 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))\n\ndef reader():return vfunc(lambda l:l.split())(sys.stdin.readlines())\n\ns = rvfunc(int)(reader())\nn,k=s[0]\np=s[1]\nc=s[2]\n\ndef pnt(i):\n out = []\n current=i\n for j in range(n):\n current=p[current-1]\n out.append(c[current-1])\n return out\ndef loc(i):\n out = []\n current=i\n for j in range(n):\n current=p[current-1]\n out.append(current)\n return out\n \ndef acc(i): \n p,l=pnt(i),loc(i)\n sp = sum(p)\n# print(p,sp)\n init = l.index(i)\n pini = p[init:]+p[:init]\n last = p[(init+int((k-1)%n))%n]\n plst = p[:last]\n if k+1<n:\n return max(list(accumulate(pini[:k-1])))\n else:\n if sp<0:\n return max(list(accumulate(p)))\n else:\n return max(list(accumulate(p)))+sum(p[:last])+sp*int((k-1)/n)\n\nprint(max(vfunc(acc)(range(1,n+1))))\n', "import sys\nfrom itertools import product,combinations\nfrom functools import reduce,lru_cache\nimport heapq\n\ndef vfunc(f): return lambda *lst, **kwargs: list(map(lambda *x:f(*x,**kwargs),*lst))\n\ndef 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))\n\ndef reader():return vfunc(lambda l:l.split())(sys.stdin.readlines())\n\ns=reader()\n\nprint(max(vfunc(len)(s[0][0].split('S'))))\n"]
['Runtime Error', 'Accepted']
['s710992726', 's762603791']
[9500.0, 9516.0]
[31.0, 33.0]
[1234, 479]
p02582
u634202910
2,000
1,048,576
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.
["s=input()\nl=list(s)\nc=0\nfor i in range(len(l)):\n if l[i]=='S':\n c=0\n else:\n c+=1\nprint(c)", 'l=list(input())\nc=0\nr=0\nfor i in range(len(l)):\n if l[i]=="S":\n c=0\n else:\n c+=1\n r=max(r,c)\nprint(max(c,r))']
['Wrong Answer', 'Accepted']
['s550141884', 's106375985']
[9084.0, 9096.0]
[29.0, 24.0]
[97, 135]
p02582
u635252313
2,000
1,048,576
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.
['s=input()\nnum=0\nfor i in s:\n if i=="R":\n num+=1\n elif i!="R":\n num=0\nprint(num)', 's=input()\nnum=0\na=[0]\nfor i in s:\n if i=="R":\n num+=1\n a.append(num)\n else:\n num=0\nprint(max(a))']
['Wrong Answer', 'Accepted']
['s740810229', 's377848120']
[9032.0, 9036.0]
[27.0, 26.0]
[99, 123]
p02582
u636995651
2,000
1,048,576
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.
["a=input()\nsum=0\nfor i in a:\n if i=='R'\n sum=sum+1\nprint (sum)", "a=input()\nb=[]\nfor i in f:\n b.append(i)\ncons=0\nfor j in b:\n if j=='R':\n cons=cons+1\nprint cons", "a=input()\nsum=0\nif a[0]=='R':\n sum=1\n if a[0]==a[1]:\n sum=2\n if a[1]==a[2]:\n sum=3\nelse :\n if a[1]=='R':\n sum=1\n if a[2]==a[1]:\n sum =2\n elif a[2]=='R':\n sum=1\nprint (sum)\n\n \n\n"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s086462359', 's436372542', 's194236224']
[8948.0, 9028.0, 9112.0]
[30.0, 30.0, 33.0]
[63, 99, 248]
p02582
u643007500
2,000
1,048,576
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.
['S = ("S","S","R")\nli = list(S)\ncount = 0\nfor num in range(1):\n if li[num] == "R" and li[num+1] == "R" :\n count = count + 1\nprint(count)', 'S = input()\nli = list(S)\ncount = 0\nre_num = 0\nfor num in range(3):\n if li[num] == "R" :\n count = count + 1\n\nif count == 0 :\n re_num = 0\nelif count == 1 :\n re_num = 1\nelif count == 2 and li[2] == "S" :\n re_num = 1\nelif count == 2 and li[2] == "R" :\n re_num = 2\nelse :\n re_num = 3\n\nprint(re_num)', 'S = input()\nli = list(S)\ncount = 0\nfor num in range(1):\n if li[num] == "R" and li[num+1] == "R" :\n count = count + 1\nprint(count)', 'li = list(S)\ncount = 0\nfor num in range(1):\n if li[num] == "R" and li[num+1] == "R" :\n count = count + 1\nprint(count)', '\ndef judge(S):\n li = list(S)\n count = 0\n for num in range(1):\n if li[num] == "R" and li[num+1] == "R" :\n count = count + 1\n print(count)\n\njudge(S)', 'X = int(input())\nK = int(input())\nD = int(input())\nloc = 0\nlis = []\n\ndef calucu_min(X,K,D):\n for num in range(K) :\n lis.append( abs(abs(2 *D *num -K *D) - abs(X)))\n lis_unique = set(lis)\n print (max(lis_unique))\n\ncalucu_min(X,K,D)', 'X = int(input())\nK = int(input())\nD = int(input())\nloc = 0\nlis = []\n\ndef calucu_min(X,K,D):\n for num in range(K) :\n lis.append( abs(abs(2 *D *num -K *D) - abs(X)))\n lis_unique = set(lis)\n print (min(lis_unique))\n\ncalucu_min(X,K,D)', 'S = input()\nli = list(S)\ncount = 0\nfor num in range(1):\n if li[num] == "R" and li[num+1] == "R" :\n count = count + 1\nprint(count)', 'S = input()\nli = list(S)\ncount = 0\nfor num in range(1):\n if li[num] == "R" and li[num+1] == "R" :\n count = count + 1\nprint(count)', 'X = int(input())\nK = int(input())\nD = int(input())\nloc = 0\nlis = []\n\ndef calucu_min(X,K,D):\n for num in range(K) :\n lis.append( abs(abs(2 *D *num -K *D) - abs(X)))\n lis_unique = set(lis)\n print (min(lis_unique))\n\ncalucu_min(X,K,D)', 'S = input()\nli = list(S)\ncount = 0\nre_num = 0\nfor num in range(2):\n if li[num] = "R" :\n count = count + 1\n\nif count = 0 :\n re_num = 0\nelif count = 1 :\n re_num = 1\nelif count = 2 and li[2] = "S" :\n re_num = 1\nelif count = 2 and li[2] = "R" :\n re_num = 2\nelse re_num = 3\n\nprint(re_num)', 'S = input()\nli = list(S)\ncount = 0\nre_num = 0\nfor num in range(3):\n if li[num] == "R" :\n count = count + 1\n\nif count == 0 :\n re_num = 0\nelif count == 1 :\n re_num = 1\nelif count == 2 and li[1] == "S" :\n re_num = 1\nelif count == 2 and li[1] == "R" :\n re_num = 2\nelse :\n re_num = 3\n\nprint(re_num)']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s200636555', 's234813323', 's339622506', 's356084350', 's635349360', 's717384457', 's725593907', 's726882096', 's779888116', 's795969048', 's956339556', 's660451186']
[9100.0, 9016.0, 9088.0, 9012.0, 8940.0, 9152.0, 9108.0, 9040.0, 9100.0, 9092.0, 8808.0, 9004.0]
[28.0, 31.0, 26.0, 27.0, 27.0, 25.0, 22.0, 35.0, 29.0, 25.0, 28.0, 35.0]
[145, 318, 139, 127, 176, 254, 250, 139, 139, 250, 305, 318]
p02582
u646083276
2,000
1,048,576
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.
["s = input().upper()\nc = s.count('R')\nif c == 3:\n if s.count('RRR') == 1:\n print(3)\n elif s.count('RR') == 1:\n \tprint(2)\n else:\n print(1)\nelif c == 2:\n if s.count('RR') == 1:\n print(1)\n else:\n print(1)\nelse:\n print(1)", "s = input().upper()\nif s.count('RRR') == 1:\n print(3)\nelif s.count('RR') == 1:\n print(2)\nelif s.count('R') > 0:\n print(1)\nelse:\n print(0)"]
['Wrong Answer', 'Accepted']
['s244339867', 's913653968']
[9044.0, 9032.0]
[26.0, 29.0]
[235, 141]
p02582
u648913791
2,000
1,048,576
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.
["S = input()\nrain_d = 0\nfor s in S:\n if s == 'R':\n rain_d += 1\n elif s == 'S':\n rain_d = 0\nprint(rain_d)\n", "S = input()\nrain_d = 0\nmax_rain_d = 0\nfor s in S:\n if s == 'R':\n rain_d += 1\n max_rain_d = rain_d\n elif s == 'S':\n rain_d = 0\nprint(max_rain_d)"]
['Wrong Answer', 'Accepted']
['s718479241', 's236047979']
[8804.0, 8908.0]
[34.0, 29.0]
[124, 170]
p02582
u655048024
2,000
1,048,576
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.
['s = str(input())\nans = 0\nif(s[0]=="R"):\n if(s[1]=="R"):\n if(s[2]=="R"):\n ans = 3\n else:\n ans = 2\n else:\n ans = 1\nelse:\n if(s[1]=="R"):\n if(s[2]=="R"):\n ans = 2\n else:\n ans = 1\n else:\n ans = 0', 's = str(input())\nans = 0\nif(s[0]=="R"):\n if(s[1]=="R"):\n if(s[2]=="R"):\n ans = 3\n else:\n ans = 1\nelse:\n if(s[1]=="R"):\n if(s[2]=="R"):\n ans = 2\n else:\n ans = 1\n else:\n if(s[2]=="R"):\n ans = 1\n else:\n ans = 0\nprint(ans)\n', 's = str(input())\nans = 0\nif(s[0]=="R"):\n if(s[1]=="R"):\n if(s[2]=="R"):\n ans = 3\n else:\n ans = 2\n else:\n ans = 1\nelse:\n if(s[1]=="R"):\n if(s[2]=="R"):\n ans = 2\n else:\n ans = 1\n else:\n if(s[2]=="R"):\n ans = 1\n else:\n ans = 0\nprint(ans)\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s186911866', 's849367949', 's764089736']
[9112.0, 9036.0, 9064.0]
[32.0, 33.0, 33.0]
[233, 266, 290]
p02582
u656803083
2,000
1,048,576
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.
["s = input().split()\ncount = 0\nfor i in s:\n if 'R' == i:\n count += 1\n\nprint(count)", 's = input()\nans = s.count("R")\nif s == "RSR":\n ans = 1\n \nprint(ans)']
['Wrong Answer', 'Accepted']
['s266950690', 's597133808']
[9068.0, 9080.0]
[28.0, 28.0]
[85, 68]
p02582
u657284954
2,000
1,048,576
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.
["if l == 'SSS':\n\tprint(0)\n\nelif l == 'SSR' or l == 'RSS' or l == 'SRS' or l == 'RSR':\n\tprint(1)\n\nelif l == 'SRR' or l == 'RRS':\n\tprint(2)\n \nelif l == 'RRR':\n\tprint(3)", "l = input()\n\nif l == 'SSS':\n\tprint(0)\n\nelif l == 'SSR' or l == 'RSS' or l == 'SRS' or l == 'RSR':\n\tprint(1)\n\nelif l == 'SRR' or l == 'RRS':\n\tprint(2)\n \nelif l == 'RRR':\n\tprint(3)"]
['Runtime Error', 'Accepted']
['s680481418', 's267833067']
[9024.0, 9040.0]
[30.0, 33.0]
[166, 179]
p02582
u658600714
2,000
1,048,576
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.
["s = input()\nans = 0\nif s == 'RSR':\n ans == 1\nelse:\n for i in s:\n if i == 'R':\n ans +=1\n\nprint(ans)", "s = input()\n\nif 'RRR' in s:\n print(3)\nelif 'RR' in s:\n print(2)\nelif 'R' in s:\n print(1)\nelse:\n print(0)\n\n"]
['Runtime Error', 'Accepted']
['s843517163', 's230102169']
[8852.0, 9064.0]
[25.0, 31.0]
[104, 110]
p02582
u667694979
2,000
1,048,576
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.
['s = input()\n\nif s = "RRR":\n print(3)\nelif s = "RRS" or s = "SRR":\n print(2)\nelif s = "SSS":\n print(0)\nelse:\n print(1)', 's = input()\n\nif s == "RRR":\n print(3)\nelif s == "RRS" or s == "SRR":\n print(2)\nelif s == "SSS":\n print(0)\nelse:\n print(1)']
['Runtime Error', 'Accepted']
['s582359390', 's263209128']
[8932.0, 9000.0]
[24.0, 29.0]
[121, 125]
p02582
u669742612
2,000
1,048,576
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.
["s=input()\nn=0\nfor i in range(len(s)):\n if s[i]=='S':\n n=0\n else:\n n+=1\nprint(n)", "s=input()\nn=0\nm=0\nfor i in range(len(s)):\n if s[i]=='S':\n n=0\n else:\n n+=1\n m=n\nprint(m)"]
['Wrong Answer', 'Accepted']
['s964025666', 's201640168']
[8764.0, 9036.0]
[26.0, 29.0]
[99, 115]
p02582
u674588203
2,000
1,048,576
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.
['y Season\n\nS=input()\n\nans=0\n\nfor i in range (len(S)-1):\n if S[i]=="R":\n tempans=1\n for j in range (i+1,len(S)):\n if S[i]==S[j]:\n tempans+=1\n else:\n if tempans>ans:\n ans=tempans\n break\n else:\n if tempans>ans:\n ans=tempans\nprint(ans)', '\n# A - Rainy Season\n\nS=input()\n\nans=0\ncount=0\n\nif S[0]=="R":\n count=1\n\nfor i in range (1,len(S)):\n if S[i]=="R":\n if count>0:\n pass\n else:\n count=1\n if S[i-1]=="R":\n count+=1\n else:\n if count>ans:\n ans=count\n count=0\nelse:\n if count>ans:\n ans=count\n\nprint(ans)']
['Runtime Error', 'Accepted']
['s650030378', 's832335159']
[8832.0, 9088.0]
[24.0, 27.0]
[366, 408]
p02582
u677535300
2,000
1,048,576
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.
["s = input()\n\nans = 0\nfor i in range(0, 3):\n\tif s[i] == 'R':\n ans += 1\n \nif ans == 2 and s[1] == 'S':\n \tans -= 1\n \nprint(ans)", "s = input()\n \nans = 0\nfor i in range(0, 3):\n\tif s[i] == 'R':\n \tans += 1\n \nif ans == 2 and s[1] == 'S':\n \tans -= 1\n \nprint(ans)", "s = input()\n \nans = 0\nfor i in range(0, 3):\n\tif s[i] == 'R':\n\t\t\tans += 1\n \nif ans == 2 and s[1] == 'S':\n \tans -= 1\n \nprint(ans)"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s002681285', 's316967090', 's023912382']
[8956.0, 9024.0, 9084.0]
[22.0, 21.0, 26.0]
[138, 138, 136]
p02582
u678128840
2,000
1,048,576
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.
['import itertools\n\ndef chkTrg(a,b,c):\n if (a + b > c and b + c > a and c + a > b) and (a != b and b != c and c != a):\n return True\n else:\n return False\n\nN = int(input())\nbars = [int(i) for i in input().split(" ")]\n\ncnt = 0\n\nfor bar in itertools.combinations(bars, 3):\n if chkTrg(bar[0],bar[1],bar[2]):\n cnt += 1\n\nprint(cnt)', 'S = list(input())\ncnt = 0\nmaxCnt = 0\n\nfor i in range(3):\n if S[i] == "R":\n cnt += 1\n else:\n cnt = 0\n if maxCnt < cnt:\n maxCnt = cnt\n\nprint(maxCnt)\n']
['Runtime Error', 'Accepted']
['s211349764', 's840316729']
[9136.0, 9092.0]
[31.0, 28.0]
[352, 177]
p02582
u679089074
2,000
1,048,576
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.
['#A\nimport sys\ns = input()\n\nnum = s.count("R")\n\nif num >= 2:\n if s[1] == "R":\n num = 1\n\nprint(num)', '#A\nimport sys\ns = input()\n\nnum = s.count("R")\n\nif num >= 2:\n if s[1] == "S":\n num = 1\n\nprint(num)']
['Wrong Answer', 'Accepted']
['s199335462', 's316876061']
[9028.0, 9020.0]
[31.0, 29.0]
[107, 107]
p02582
u680190333
2,000
1,048,576
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.
["import sys\ninput = sys.stdin.readline\n\nS=list(input().rstrip('\\n'))\nres = 0\nfor i in S:\n if i=='S':\n res = 0\n else:\n res += 1\nprint(res)", "import sys\ninput = sys.stdin.readline\n\nS=list(input().rstrip('\\n'))\nres = 0\nif S[0]=='R':\n res += 1\nif S[1]=='S':\n if res == 0 and S[2]=='S':\n print(0)\n else:\n print(1)\nelse:\n res += 1\n if S[2]=='R':\n res += 1\n print(res)\n else:\n print(res)"]
['Wrong Answer', 'Accepted']
['s408095850', 's225766586']
[9036.0, 9088.0]
[27.0, 29.0]
[144, 261]
p02582
u682847501
2,000
1,048,576
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.
['x, k, d = map(int, input().split())\nif x < 0:\n x *= -1\nif x - k // d >= 0:\n print(x-k*d)\nelse:\n k -= x // d\n x %= d\n if k % 2 == 0:\n print(x)\n else:\n print(abs(x-d))\n', "print(max(input().split('S')))\n", "print(max(map(len, input().split('S'))))\n"]
['Runtime Error', 'Wrong Answer', 'Accepted']
['s059460510', 's981734547', 's493869320']
[9156.0, 8984.0, 9076.0]
[31.0, 27.0, 27.0]
[198, 31, 41]
p02582
u682894596
2,000
1,048,576
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.
['ss = str(input())\na = ss.count("R")\n\nif a == 2 and a[2] == 0:\n a = 1\n\nprint(a) \n', 'ss = str(input())\na = ss.count("R")\n\nif ss = "RSR":\n a = 1\n\nprint(a)', 'ss = str(input())\na = int(ss.count("R"))\n\nif ss == "RSR":\n a = 1\n\nprint(a)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s350270970', 's543569251', 's402852016']
[9004.0, 8924.0, 9024.0]
[23.0, 25.0, 27.0]
[82, 69, 75]
p02582
u686036872
2,000
1,048,576
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.
['S = input()\nif S == "SSS":\n print(0)\nelif S == "RRR":\n print(3)\nelif S == "RSS" or S == "SRS" or S == "SSR" or "RSR":\n print(1)\nelif S == "RRS" or S == "SRR":\n print(2)', 'S = input()\nif S == "SSS":\n print(3)\nelif S == "SRR" or S == "RSR" or S == "SSR":\n print(1)\nelif S == "SSR" or S == "RSS":\n print(2)', 'S = input()\nif S == "SSS":\n print(3)\nelif S == "SRR" or S == "RSR" or S == "RRS":\n print(1)\nelif S == "SSR" or S == "RSS":\n print(2)', 'S = input()\nif S == "SSS":\n print(0)\nelif S == "RRR":\n print(3)\nelif S == "RRS" or S == "SRR":\n print(2)\nelse:\n print(1)']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s366194185', 's881232806', 's890688800', 's809463983']
[9048.0, 9084.0, 9108.0, 9028.0]
[24.0, 28.0, 26.0, 28.0]
[180, 141, 141, 132]
p02582
u687553041
2,000
1,048,576
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.
["import sys\n\nif __name__ == '__main__':\n\tS = sys.stdin.readline().rstrip()\n\tif S == 'SSS':\n\t\tprint('3')\n\telif 'SS' in S:\n\t\tprint('2')\n\telif 'S' in S:\n\t\tprint('1')\n\telse:\n\t\tprint('0')", "import sys\n\nif __name__ == '__main__':\n\tS = sys.stdin.readline().rstrip()\n\tif S == 'RRR':\n\t\tprint('3')\n\telif 'RR' in S:\n\t\tprint('2')\n\telif 'R' in S:\n\t\tprint('1')\n\telse:\n\t\tprint('0')"]
['Wrong Answer', 'Accepted']
['s224626353', 's357782471']
[9096.0, 9092.0]
[32.0, 32.0]
[181, 181]
p02582
u689281702
2,000
1,048,576
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.
["s = input()\ndef s_count(s):\n m = list(s)\n array = [0. for i in range(len(m))]\n count = 0\n for i in range(len(m)):\n if m[i] == 'R':\n array[i] += 1\n if (i > 0 and m[i] == m[i-1]) or i == 0:\n count += 1\n array[i] += count\n else:\n count = 0\n return max(array)\nprint(s_count(s))", "s = input()\ndef s_count(s):\n m = list(s)\n array = [0. for i in range(len(m))]\n count = 0\n for i in range(len(m)):\n if m[i] == 'R':\n array[i] += 1\n if (i > 0 and m[i] == m[i-1]):\n count += 1\n array[i] += count\n else:\n count = 0\n return max(array)\nprint(s_count(s))", "s = input()\ndef s_count(s):\n m = list(s)\n array = [0. for i in range(len(m))]\n count = 0\n for i in range(len(m)):\n if m[i] == 'R':\n array[i] += 1\n if (i > 0 and m[i] == m[i-1]):\n count += 1\n array[i] += count\n else:\n count = 0\n return max(array)\nprint(s_count(s))", "s = input()\ndef s_count(s):\n m = list(s)\n array = [0. for i in range(len(m))]\n count = 0\n for i in range(len(m)):\n if m[i] == 'R':\n array[i] += 1\n if (i > 0 and m[i] == m[i-1]) or i == 0:\n count += 1\n array[i] += count\n else:\n count = 0\n return max(array)\ns_count(s)", "import numpy as np\ns = input()\ndef s_count(s):\n m = list(s)\n array = np.zeros(len(m))\n count = 0\n for i in range(len(m)):\n if m[i] == 'R':\n array[i] += 1\n if (i > 0 and m[i] == m[i-1]) or i == 0:\n count += 1\n array[i] += count\n else:\n count = 0\n return array.max()\ns_count(s)", "s = input()\ndef s_count(s):\n m = list(s)\n array = [0. for i in range(len(m))]\n count = 0\n for i in range(len(m)):\n if m[i] == 'R':\n array[i] += 1\n if (i > 0 and m[i] == m[i-1]):\n count += 1\n array[i] += count\n else:\n count = 0\n return max(array)\nprint(int(s_count(s)))"]
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s045486994', 's228727076', 's353891572', 's662636359', 's814601766', 's110943291']
[9020.0, 9064.0, 8972.0, 9092.0, 27140.0, 9076.0]
[30.0, 28.0, 25.0, 28.0, 121.0, 27.0]
[317, 363, 363, 310, 375, 368]
p02582
u689710606
2,000
1,048,576
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.
['n = int(input())\nl = list(map(int, input().split()))\nt = 0\n\nfor i in range(n):\n for j in range(i + 1, n):\n for k in range(j + 1, n):\n sum = l[i] + l[j] + l[k]\n if sum - max(l[i], l[j], l[k]) > max(l[i], l[j], l[k]):\n if l[i] != l[j] and l[i] != l[k] and l[j] != l[k]:\n t += 1\n\nprint(t)\n', 'n = int(input())\nl = list(map(int, input().split()))\nt = 0\n\nfor i in range(n):\n for j in range(i + 1, n):\n for k in range(j + 1, n):\n sum = l[i] + l[j] + l[k]\n if sum - max(l[i], l[j], l[k]) > max(l[i], l[j], l[k]):\n if l[i] != l[j] and l[i] != l[k] and l[j] != l[k]:\n t += 1\n\nprint(t)\n', 's = input()\nd = 0\n\nif s == "RRR":\n d = 3\nelif s in {"RRS", "SRR"}:\n d = 2\nelif s in {"RSR", "RSS", "SSR", "SRS"}:\n d = 1\nelse:\n d = 0\n\nprint(d)\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s047914088', 's290948563', 's678532347']
[9144.0, 9032.0, 9032.0]
[26.0, 26.0, 26.0]
[352, 352, 156]
p02582
u689723321
2,000
1,048,576
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.
['list(input())\nr= weather. count("R")\nif r==2 and weather[1]=="S":\n print(1)\nelse:\n print(r)', 'a', 'weather=input()\ns=count(R)\nif s=2 and weather[2]=R:\n s=s-1\nprint(s)', 'weather=list(input())\nr= weather. count("R")\nif r==2 and weather[1]=="S":\n print(1)\nelse:\n print(r)\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s261088931', 's295111768', 's623807735', 's986497809']
[8884.0, 9020.0, 8912.0, 9076.0]
[21.0, 24.0, 23.0, 29.0]
[95, 1, 68, 104]
p02582
u695329583
2,000
1,048,576
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.
['x,k,d = map(int,input().split())\n\nif x >= 0 :\n a = abs(x//d)\n if a <= k :\n if (k - a) % 2 == 0 :\n print(abs(x-a*d))\n else :\n print(abs(x-(a+1)*d))\n else :\n print(abs(x-k*d))\nelse :\n if x%d == 0 :\n a = abs(x//d)\n else :\n a = abs(x//d+1)\n if a <= k :\n if (k - a) % 2 == 0 :\n print(abs(x+a*d))\n else :\n print(abs(x+(a+1)*d))\n else :\n print(abs(x+k*d))', "s = input()\nif s == 'RRR' :\n print(3)\nif s == 'SRR' :\n print(2)\nif s == 'RSR' :\n print(1)\nif s == 'RRS' :\n print(2)\nif s == 'SSR' :\n print(1)\nif s == 'RSS' :\n print(1)\nif s == 'SRS' :\n print(1)\nif s == 'SSS' :\n print(0)"]
['Runtime Error', 'Accepted']
['s278517257', 's948457908']
[8920.0, 8864.0]
[21.0, 26.0]
[525, 243]
p02582
u699008198
2,000
1,048,576
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.
['X, K, D = map( int, input().split())\n \nY = X // D\nif K <= Y:\n print( min( abs( X - K * D ) , abs( X + K * D ) ))\nelse:\n if ( K - Y ) % 2 == 0:\n print( min( abs( X - Y * D ) , abs( X + Y * D ) ),\n min( abs( X - ( Y - 2 ) * D ), abs( X - ( Y + 2 ) * D ),\n abs( X + ( Y - 2 ) * D ), abs( X + ( Y + 2 ) * D )) )\n else:\n print( min( abs( X - ( Y - 1 ) * D ), abs( X - ( Y + 1 ) * D ),\n abs( X + ( Y - 1 ) * D ), abs( X + ( Y + 1 ) * D )) )\n', 's = input()\n\nif s.count("R") in [0,1,3]:\n print( s.count("R") )\nelse:\n if s == "RSR":\n print(1)\n else:\n print(2)']
['Runtime Error', 'Accepted']
['s158979690', 's503013606']
[9128.0, 9088.0]
[27.0, 34.0]
[484, 121]
p02582
u699101754
2,000
1,048,576
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.
["x=input()\no=0\nfor i in range(1,len(x)):\n if x[i-1]==x[i] and x[i]=='R':\n o+=1\nprint(o)", "x=input()\no=0\nc=0\nfor i in range(len(x)):\n if x[i]=='S':\n o=max(o,c)\n c=0\n else:\n c+=1\no=max(c,o)\n\nprint(o)"]
['Wrong Answer', 'Accepted']
['s729456209', 's484387912']
[9072.0, 9104.0]
[28.0, 28.0]
[90, 118]
p02582
u701658616
2,000
1,048,576
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.
["S = list(input())\n\ncnt = 0\n\nfor i in range(len(S)):\n if S[i] == 'R':\n\t if cnt == 0:\n \tcnt += 1\n \t elif S[i - 1] == 'R':\n \tcnt += 1\n\nprint(cnt)", "S = list(input())\n\ncnt = 0\n\nfor i in range(len(S)):\n if S[i] == 'R':\n if cnt == 0:\n cnt += 1\n elif S[i - 1] == 'R':\n cnt += 1\n\nprint(cnt)"]
['Runtime Error', 'Accepted']
['s120847685', 's435740621']
[8776.0, 9028.0]
[24.0, 31.0]
[154, 154]
p02582
u703823201
2,000
1,048,576
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.
['S = input()\n\ncnt = 1\nfor i in range(len(S)-1):\n if S[i] == S[i+1] and S[i] == "R":\n cnt += 2\n elif S[i] != S[i+1] and S[i+1] == "R":\n cnt += 1\n else:\n cnt = 0\nprint(cnt)', 'S = input()\n\ncnt = 0\nfor s in S:\n if s == "R":\n cnt += 1\n else:\n cnt = 0\nprint(cnt)', 'S = input()\n\ncnt = 0\nans = []\nfor s in S:\n if s == "R":\n cnt += 1\n else:\n ans.append(cnt)\n cnt = 0\nans.append(cnt)\nprint(max(ans))']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s586432033', 's786357383', 's786046171']
[9108.0, 9004.0, 9096.0]
[31.0, 24.0, 32.0]
[199, 103, 157]
p02582
u704157847
2,000
1,048,576
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.
["S = input()\n\nr = 0\nfor i in range(3):\n if i == 0 and S[0] == 'R':\n r += 1\n elif i < 2:\n if S[i] == S[i+1]:\n r += 1\n\nprint(r)", "S = input()\nr = 0\nfor i in range(3):\n if i == 0 and S[0] == 'S':\n r += 1\n elif i < 1:\n if S[i] == S[i+1]:\n r += 1\n\nprint(r)", 'S = input()\nr = 0\n\nif S == "RRR":\n r = 3\nelif S == "RRS" or S == "SRR":\n r = 2\nelif S == "RSR" or S.count(\'R\') == 1:\n r = 1\nelse:\n r = 0\n\nprint(r)']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s322470816', 's879566980', 's727988606']
[8916.0, 8908.0, 9100.0]
[29.0, 26.0, 31.0]
[138, 136, 150]
p02582
u705418271
2,000
1,048,576
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.
['n = int(input())\nl = list(map(int,input().split()))\n \nl.sort()\nans = 0\n \nfor i in range(n):\n for j in range(i+1,n):\n for k in range(j+1,n):\n if l[i] != l[j] != l[k]:\n if l[i] + l[j] > l[k] :\n ans += 1\n \nprint(ans)', 'n=int(input())\na=list(map(int,input().split()))\na.sort()\nans=0\nfor i in range(n):\n for j in range(i+1,n):\n for k in range(k+1,n):\n if l[i]!=l[j]!=l[k]:\n if l[i]+l[j]>l[k]:\n ans+=1\n\nprint(ans)', 'n=int(input())\nl=list(map(int,input().split()))\nl.sort()\nans=0\nfor i in range(n):\n for j in range(i+1,n):\n for k in range(j+1,n):\n if l[i]!=l[j]!=l[k]:\n if l[j]+l[i]>l[k]:\n ans+=1\n\nprint(ans)', 'n=int(input())\nl=list(map(int,input().split()))\nl.sort()\nans=0\nfor i in range(n):\n for j in range(i+1,n):\n for k in range(j+1,n):\n if l[i]!=l[j]!=l[k]:\n if l[j]+l[i]>l[k]:\n ans+=1\n\nprint(ans)', 'n=int(input())\na=list(map(int,input().split()))\na.sort()\nans=0\nfor i in range(n):\n for j in range(i+1,n):\n for k in range(j+1,n):\n if l[i]!=l[j]!=l[k]:\n if l[j]+l[i]>l[k]:\n ans+=1\n\nprint(ans)', 'ss=str(input())\na=int(ss.count("R"))\n\nif ss=="RSR":\n a=1\n\nprint(a)\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s232444122', 's235235590', 's317917220', 's597882345', 's915846568', 's379682498']
[9100.0, 8816.0, 9192.0, 8956.0, 9004.0, 8904.0]
[20.0, 25.0, 27.0, 26.0, 24.0, 27.0]
[268, 214, 215, 214, 214, 68]
p02582
u707567014
2,000
1,048,576
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.
[' a = int(input())\np = list(map(int,input().split()))\n count = 0\n \nfor i in range(a):\n for s in range(a):\n for t in range(a):\n if p[t]<p[s]<p[i] and p[t]+p[s]>p[i]:\n count+=1\nprint(count)', "num = list(map(str,input()))\nif num[0]== 'R' and num[1] =='S':\n print('1')\nelse:\n print(num.count('R'))\n"]
['Runtime Error', 'Accepted']
['s911779440', 's692837466']
[8964.0, 9016.0]
[23.0, 26.0]
[227, 110]
p02582
u708211626
2,000
1,048,576
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.
['a=input()\nb=0\n\nfor i in a:\n if i==R:\n b+=1\n if b==2:\n print(b)\n import sys\n sys.exit()\n \n if i==S and b>0 :\n b-=1\n \nprint(b)', 'a=input()\nb=0\n\nfor i in a:\n if i==R:\n b+=1\n \n if i==S and b>0:\n b-=1\n \nprint(b)', 'a = input()\n \nif("RRR" in a):\n print("3")\nelif("RR" in a):\n print("2")\nelif("R" in a):\n print("1")\nelse:\n print("0")\n\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s444758190', 's486869140', 's822931866']
[9032.0, 9028.0, 8944.0]
[27.0, 26.0, 27.0]
[156, 93, 122]
p02582
u711677620
2,000
1,048,576
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.
['x = input()\nif x == "SSS":\n print(0)\nelif x == "SSR" or "SRS" or "RSR" or "RSS":\n print(1)\nelif x == "SRR" or "RRS":\n print(2)\nelif x == "RRR":\n print(3)', 'x = input()\nif x == "SSS":\n print(0)\nelif x == "SSR" or "SRS" or "RSR" or "RSS":\n print(1)\nelif x == "SRR" or "RRS":\n print(2)\nelse:\n print(3)', "x = str(input())\nif x == 'SSS':\n print(0)\nelif x == 'SSR':\n print(1)\nelif x == 'SRS':\n print(1)\nelif x == 'RSR':\n print(1)\nelif x == 'RSS':\n print(1)\nelif x == 'SRR':\n print(2)\nelif x == 'RRS':\n print(2)\nelse:\n print(3)"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s530349000', 's625521336', 's147424799']
[9080.0, 8928.0, 9020.0]
[34.0, 25.0, 32.0]
[157, 146, 227]