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 | u196455939 | 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 - Rainy Season\nSi = []\nSi = str(input())\ni = 0\nif Si[0] == 'R': \n i = 1\nif Si[1] == 'R': \n i = 1\nif Si[2] == 'R': \n i = 1\nif Si[0:1] == 'RR': \n i = 2\nif Si[1:2] == 'RR': \n i = 2\nif Si[0:2] == 'RRR': \n i = 3\n\n\nprint(i)", "#A - Rainy Season\nSi = []\nSi = list(str(input()))\ni = 0\nif Si.count('S') == 3:\n i = 0\nelse:\n if Si.count('R') == 3:\n i = 3\n else:\n if Si.count('R') == 1:\n i = 1\n else:\n if Si[1] == 'S':\n = 1\n else:\n i = 2\n\nprint(i)", "#A - Rainy Season\nSi = []\nSi = str(input())\ni = 0\nif Si[0] == 'R': \n i == 1\nif Si[1] == 'R': \n i == 1\nif Si[2] == 'R': \n i == 1\nif Si[0:1] == 'RR': \n i == 2\nif Si[0:1] == 'RR': \n i == 2\nif Si[1:2] == 'RR': \n i == 2\nif Si[0:2] == 'RRR': \n i == 3\n\n\nprint(i)", "#A - Rainy Season\nSi = []\nSi = list(str(input()))\ni = 0\nif Si == ['S','S','S']: i = 0\nif Si == ['R','S','S']: i = 1\nif Si == ['S','R','S']: i = 1\nif Si == ['S','S','R']: i = 1\nif Si == ['R','R','S']: i = 2\nif Si == ['S','R','R']: i = 2\nif Si == ['R','S','R']: i = 1\nif Si == ['R','R','R']: i = 3\n\nprint(i)\n"] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s175091825', 's227064720', 's840981717', 's545961737'] | [9108.0, 8896.0, 9056.0, 9036.0] | [30.0, 27.0, 36.0, 31.0] | [246, 316, 284, 314] |
p02582 | u198336369 | 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 - k*d > 0 and x > 0) or (x + k*d < 0 and x < 0):\n print(abs(x) - k*d )\nelse:\n if x % d == 0:\n if ((x/d) % 2) == (k % 2):\n print(0)\n else:\n print(d)\n else:\n y = abs(x)\n if (y % d < d - (y % d) and ((y - (y % d)) / d) % 2 == k % 2) or (y % d > d - (y % d) and ((y - (y % d)) / d) % 2 != k % 2):\n print(y % d)\n else:\n print(d - (y % d))\n ', "t = input()\nif (abs(len(t))<=3) and (t in 'S' or 'R'):\n if t[0]=='R' and t[1]=='R' and t[2]=='R':\n print(3)\n elif (t[0]=='R' and t[1]=='R' and t[2]!='R') or (t[0]!='R' and t[1]=='R' and t[2]=='R'):\n print(2)\n elif t[0]!='R' and t[1]!='R' and t[2]!='R':\n print(0)\n else:\n print(1)\nelse:\n print('false')"] | ['Runtime Error', 'Accepted'] | ['s825773818', 's349812230'] | [8992.0, 9012.0] | [27.0, 30.0] | [476, 344] |
p02582 | u200629950 | 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()\na = 0\nfor i in range(3):\n if S[i]=="R":\n a+=1\n if S[i]=="S" and a>0:\n break\n print(a)', 'S = input()\n\nc = 0\nmax = 0\n\nfor i in S:\n if i==R:\n c += 1\n else:\n max = max([c, max])\n c = 1\n \nprint(max)', 'def main():\n N, K = list(map(int, input().split()))\n P = list(map(int, input().split()))\n C = list(map(int, input().split()))\n\n max_score = max(C)\n score = C\n P_now = P\n P_ci = P\n for _ in range(K-1):\n score = [score[i]+C[num-1] for i, num in enumerate(P_now)]\n if max_score < max(score):\n max_score = max(score)\n P_ci = P_now\n P_now = [P[i-1] for i in P_now]\n if P_ci == P_now:\n break\n print(max_score)\n\nif __name__ == "__main__":\n main()', 'S = input()\na = 0\nfor i in range(3):\n if S[i]=="R":\n a+=1\n if S[i]=="S" and a>0:\n break\nprint(a)'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s342042378', 's673139200', 's905552494', 's816755302'] | [9008.0, 9036.0, 9144.0, 8836.0] | [25.0, 29.0, 23.0, 31.0] | [114, 119, 530, 106] |
p02582 | u201234972 | 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 collections import Counter\nfrom numba import njit\n\n@njit\ndef solve(S, C):\n if C["R"] == 3:\n print(3)\n elif C["R"] == 2:\n if S[1] == "S":\n print(1)\n else:\n print(2)\n elif C["R"] == 1:\n print(1)\n else:\n print(0)\n\ndef main():\n S = input()\n C = Counter(S)\n solve(S,C)\n \nif __name__ == \'__main__\':\n main()\n', 'from collections import Counter\ndef main():\n S = input()\n C = Counter(S)\n if C["R"] == 3:\n print(3)\n elif C["R"] == 2:\n if S[1] == "S":\n print(1)\n else:\n print(2)\n elif C["R"] == 1:\n print(1)\n else:\n print(0)\n \nif __name__ == \'__main__\':\n main()\n'] | ['Runtime Error', 'Accepted'] | ['s615896331', 's858887579'] | [111388.0, 9400.0] | [970.0, 28.0] | [390, 331] |
p02582 | u203471639 | 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. | ["user = input()\ncount = 0\nfor i in user:\n if i == 'R':\n count += 1\n if count == 2:\n if user[0] == user[2]:\n count = 1\n else:\n count = 2\n else:\n count\n elif i == 'S':\n count = 0\nprint(count)\n \n ", "user = str(input())\ncount = 0\nfor i in user:\n if i == 'R':\n count += 1\n else:\n count\nif count == 3:\n count\nelif count == 2:\n if user[0] == user[2]:\n count = 1\n else:\n count = 2\nelse:\n count = count\nprint(count)\n \n "] | ['Wrong Answer', 'Accepted'] | ['s380436711', 's293322734'] | [9096.0, 8964.0] | [27.0, 32.0] | [303, 278] |
p02582 | u208512038 | 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. | ['w = list(input().split())\n\nif w == ["rsr"]:\n print(1)\n\nelse:\n print(w.count("r"))', 'w = list(input().split())\n\nif w == ["RSR"]:\n print(1)\n\nelse:\n print(w.count("R"))', 'w = input()\n\nif w == "RSR":\n print(1)\n\nelse:\n print(w.count("R"))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s515185002', 's798867140', 's502355138'] | [9080.0, 9080.0, 9080.0] | [29.0, 34.0, 27.0] | [87, 87, 71] |
p02582 | u208633734 | 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\nfor i in range(1,4):\n p = "R"*i\n if p in s:\n ans = i\nprint(i+1)', 's = map(input().split())\nans = 0\n\nfor i in range(3):\n p = "R"*i\n if p in s:\n ans = i\nprint(ans)', 's = map(input().split())\nans=0\n\nfor i in range(3):\n n = i*s\n if n in s:\n print(i)', 's = input()\nans = 0\n\nfor i in range(1,4):\n p = "R"*i\n if p in s:\n ans = i\nprint(ans)'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s033877971', 's200505820', 's923276598', 's160306365'] | [9032.0, 9076.0, 9012.0, 9104.0] | [29.0, 26.0, 32.0, 27.0] | [89, 100, 86, 89] |
p02582 | u213314609 | 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()\nA = split(S)\ncount = 0\nfor i in range(len(S)):\n if(S[i] == 'R'):\n count += 1\nprint(count)", "S = raw_input()\nprint(max(map(len, S.split('S'))))", "S = input()\nprint(max(map(len, S.split('S'))))"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s055282761', 's240802418', 's315842500'] | [8884.0, 9016.0, 8960.0] | [23.0, 25.0, 26.0] | [105, 50, 46] |
p02582 | u217551556 | 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())\nX = 0\nif S[1] == "R":\n if S[0] == S[1] or S[1] == S[2]:\n if S[0] == "R" and S[2] == "R":\n X = 2\n else:\n X = 1\nprint(X)', 'S = list(input())\nX = 0\nif S[1] == "R":\n if S[0] == S[1] or S[1] == S[2]:\n if S[0] == "R" and S[2] == "R":\n X = 3\n else:\n X = 2\n else:\n X=1\nelif S[0] == "R" or S[2] =="R":\n X = 1\nprint(X)'] | ['Wrong Answer', 'Accepted'] | ['s828106680', 's132132166'] | [9016.0, 9004.0] | [28.0, 27.0] | [175, 239] |
p02582 | u218841943 | 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=len(s)\nli=[]\nc=0\nfor i in range(n):\n\tif(s[i]=='R'):\n\t\tc=c+1\n else:\n\t\tli.append(c)\n\t\tc=0\nli.append(c)\nprint(max(li))", "s=input()\nn=len(s)\nc=0\nli=[]\nfor i in range(n):\n if(s[i]=='R'):\n c=c+1\n else:\n li.append(c)\n c=0\nli.append(c)\nprint(max(li))"] | ['Runtime Error', 'Accepted'] | ['s818101178', 's863249213'] | [8924.0, 9104.0] | [28.0, 29.0] | [130, 135] |
p02582 | u221264296 | 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 "RRR" in s: ans = 3\nelif "RR" in s: ans = 2\nelse "R" in s: ans = 1\nprint(ans)', 's=input()\nans = 0\nif "RRR" in s: ans = 3\nelif "RR" in s: ans = 2\nelif "R" in s: ans = 1\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s259831027', 's732061734'] | [9012.0, 9092.0] | [28.0, 25.0] | [98, 98] |
p02582 | u222643068 | 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. | ["str = input()\n\nif str in 'RRR':\n print(3)\nelif str in 'RR':\n print(2)\nelif str in 'R':\n print(1)\nelse:\n print(0)", "str = input()\n\nif 'RRR' in str:\n print(3)\nelif 'RR' in str:\n print(2)\nelif 'R' in str:\n print(1)\nelse:\n print(0)\n"] | ['Wrong Answer', 'Accepted'] | ['s876505564', 's365735045'] | [9028.0, 9020.0] | [29.0, 27.0] | [116, 117] |
p02582 | u225388820 | 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. | ['print(sum(input() in "R"*i for i in range(3)))', 's=input();print(sum("R"*i in s for i in range(1,4)))'] | ['Runtime Error', 'Accepted'] | ['s738511205', 's210289770'] | [8940.0, 8876.0] | [28.0, 32.0] | [46, 52] |
p02582 | u228232845 | 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\nfrom collections import Counter\n\n\ndef input(): return sys.stdin.readline().strip()\ndef I(): return int(input())\ndef LI(): return list(map(int, input().split()))\ndef IR(n): return [I() for i in range(n)]\ndef LIR(n): return [LI() for i in range(n)]\ndef SR(n): return [S() for i in range(n)]\ndef S(): return input()\ndef LS(): return input().split()\n\n\nINF = float('inf')\n\n\ns = S()\nans = 0\nif 'R' not in s:\n ans = 0\nelse:\n c = Counter(list(s))\n if c['R'] == 1:\n ans = 1\n else:\n if s[:2] == 'RR' or s[1:] == 'RR':\n ans = 2\n if s == 'RRR':\n ans = 3\n else:\n ans = 1\n\nprint(ans)\n", "import sys\nfrom collections import Counter\n\n\ndef input(): return sys.stdin.readline().strip()\ndef I(): return int(input())\ndef LI(): return list(map(int, input().split()))\ndef IR(n): return [I() for i in range(n)]\ndef LIR(n): return [LI() for i in range(n)]\ndef SR(n): return [S() for i in range(n)]\ndef S(): return input()\ndef LS(): return input().split()\n\n\nINF = float('inf')\n\n\ns = S()\n\nif s == 'RRR':\n ans = 3\nelif s[:2] == 'RR' or s[1:] == 'RR':\n ans = 2\nelse:\n c = Counter(list(s))\n if c['R'] == 1:\n ans = 1\n elif c['S'] == 3:\n ans = 0\n else:\n ans = 1\n\nprint(ans)\n"] | ['Wrong Answer', 'Accepted'] | ['s600344777', 's316825264'] | [9240.0, 9360.0] | [32.0, 31.0] | [654, 608] |
p02582 | u228288852 | 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()\nSc=S.count("R")\nSSc=S.count("RR")\nif Sc==3:\n print(3)\nelif SSc=1:\n print(2)\nelif Sc==0:\n print(0)\nelse:\n print(1)', 'S=input()\nSc=S.count("R")\nSSc=S.count("RR")\nif Sc==3:\n print(3)\nelif SSc==1:\n print(2)\nelif Sc==0:\n print(0)\nelse:\n print(1)'] | ['Runtime Error', 'Accepted'] | ['s371296095', 's425100485'] | [8640.0, 8856.0] | [25.0, 26.0] | [127, 128] |
p02582 | u228303592 | 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[0]=='R':\n if s[1]=='R':\n if s[2]=='R':\n print(3)\n else:\n print(2)\n else:\n print(1)\nelif s[0]=='S':\n if s[1]=='R':\n if s[2]=='R':\n print(2)\n else:\n print(1)\n elif:\n if s[2]=='R':\n print(1)\n else:\n print(0)", "s = input()\nif s[0]=='R':\n if s[1]=='R':\n if s[2]=='R':\n print(3)\n else:\n print(2)\n else:\n print(1)\nelif s[0]=='S':\n if s[1]=='R':\n if s[2]=='R':\n print(2)\n else:\n print(1)\n else:\n if s[2]=='R':\n print(1)\n else:\n print(0)"] | ['Runtime Error', 'Accepted'] | ['s733341667', 's557532574'] | [8844.0, 8988.0] | [23.0, 25.0] | [276, 276] |
p02582 | u230364791 | 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 = intput()\nif s == "RRR":\n print(3)\n\nelif s == "SRR" or s == "RSS":\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)', 's = input()\n\nif s == "RRR":\n print(3)\nelif s == "SRR" or s == "RRS":\n print(2)\nelif s == "SSS":\n print(0)\nelse:\n print(1)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s785331645', 's884786854', 's512828704'] | [8976.0, 9016.0, 8996.0] | [23.0, 28.0, 30.0] | [125, 124, 125] |
p02582 | u235210692 | 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()\n\nrenzoku=0\nmae="S"\nfor i in a:\n if i=="R":\n if mae=="R":\n renzoku+=1\n else:\n mae="R"\nprint(renzoku)\n ', 's=input()\n \nif s in ["RRR"]:\n print(3)\nelif s in ["RRS","SRR"]:\n print(2)\nelif s in ["RSS","SRS","SSR","RSR"]:\n print(1)\nelse:\n print(0)'] | ['Wrong Answer', 'Accepted'] | ['s541735991', 's704457572'] | [8980.0, 9056.0] | [29.0, 26.0] | [131, 140] |
p02582 | u235508145 | 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()\nc=0\nfor i in range(3):\n if s[i] == 'R':\n c+=1\n else:\n c=0\nprint(c)", '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'] | ['Wrong Answer', 'Accepted'] | ['s919322790', 's670811419'] | [9072.0, 9020.0] | [34.0, 23.0] | [84, 115] |
p02582 | u238504302 | 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. | ['D, T, S = map(int,input().split())\nif S * T >= D: print("Yes")\nelse: print("No")', 'S = input()\ncount = 0\nans = 0\nfor i in range(3):\n if S[i] == "R":\n count += 1\n ans = max(ans, count)\n else:\n ans = max(ans, count)\n count = 0\n\n\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s830839696', 's471472814'] | [9100.0, 9040.0] | [23.0, 27.0] | [80, 168] |
p02582 | u243742036 | 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 count_rainy(weather): \n return len([r for r in weather if r == 'R'])\n\nweather = input()\nif len(weather) == 3:\n for w in weather:\n if w == 'S' or w == 'R':\n print(count_rainy(weather))", "def count_rainy(weather):\n return len([r for r in weather if r == 'R'])", "def count_rainy(weather): \n return len([r for r in weather if r == 'R'])\n\nweather = 'SSR'\nprint(count_rainy(weather))", "def count_rainy(weather):\n return len([r for r in weather if r == 'R'])\n\nweather = 'SSR'\ncount_rainy(weather)", "def count_rainy(weather): \n if weather == 'RSR':\n return 1\n return len([r for r in weather if r == 'R'])\n\nweather = input()\nprint(count_rainy(weather))"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s109325526', 's523474216', 's524523078', 's775332216', 's480403926'] | [9084.0, 9020.0, 9076.0, 9088.0, 8996.0] | [27.0, 24.0, 28.0, 25.0, 24.0] | [211, 74, 120, 112, 164] |
p02582 | u244434589 | 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. | ["Q =input()\nif Q.count(R)==3:\n print(3)\nelif Q.count(R)==0:\n print(0)\nelif Q.count(R)==1:\n print(1)\nelif Q.count(R)==2:\n if Q.[2] =='S'\n print(1)\n else :\n print(2)", 'S =input()\nprint(S.count(R))', 'x,k,d = map(int,input().split())\ny = abs(x)//d\nif y >= k:\n ans = abs(abs(x)-d*k)\n\nelse:\n if (k-y)% 2 == 0:\n ans = abs(abs(x)-d*y)\n else:\n ans = min(abs(abs(x)-d*y+d),abs(abs(x)-d*y-d))\nprint(ans)', "Q =input()\nif Q.count('R')==3:\n print(3)\nelif Q.count('R')==0:\n print(0)\nelif Q.count('R')==1:\n print(1)\nelif Q.count('R')==2:\n if Q[1] =='S':\n print(1)\n else :\n print(2)"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s211992816', 's422998927', 's726589047', 's063167225'] | [8960.0, 8952.0, 8968.0, 9112.0] | [27.0, 25.0, 27.0, 25.0] | [187, 28, 246, 199] |
p02582 | u244841398 | 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. | ['D = list(input().strip().split())\nans = 0\nans_list = []\nif D.count("R") >= 1:\n for i in range(3):\n if D[i] == \'R\':\n ans += 1\n ans_list.append(ans)\n elif D[i] == \'S\':\n ss = 0\n ans_list.append(ss)\n print(max(ans_list))\nelif D.count("R") < 1:\n print(0)\n', 'D = list(input().strip().split())\nans = 0\nans_list = []\nif D.count("R") >= 1:\n for i in range(3):\n if D[i] == \'R\':\n ans += 1\n ans_list.append(ans)\n elif D[i] == \'S\':\n ans_list.append(ans)\n continue\n print(max(ans_list))\nelif D.count("R") < 1:\n print(0)\n', 'D = list(input().strip().split())\nans = 0\nans_list = []\nif D.count("R") >= 1:\n for i in range(3):\n if D[i] == \'R\':\n ans += 1\n ans_list.append(ans)\n elif D[i] == \'S\':\n ss = 0\n ans_list.append(ss)\n print(max(ans_list))\nelif D.count("R") < 1:\n print(0)\n', 'D = list(input().strip().split())\n\nans_list = []\nif D.count("R") >= 1:\n for i in range(3):\n ans = 0\n if D[i] == \'R\':\n ans += 1\n ans_list.append(ans)\n elif D[i] == \'S\':\n ans_list.append(ans)\n continue\nelif D.count("R") < 1:\n print(0)', 'D = list(input().strip().split())\nans = 0\nans_list = []\nif D.count("R") >= 1:\n for i in range(3):\n if D[i] == \'R\':\n ans += 1\n ans_list.append(ans)\n elif D[i] == \'S\':\n ans_list.append(ans)\n print(max(ans_list))\nelif D.count("R") < 1:\n print(0)\n', 'D = list(input().strip().split())\ncons = 0\nif D.count("R") >= 1:\n for i in range(3):\n if D[i] != \'R\':\n cons = cons\n continue\n elif D[i] == \'R\':\n cons += 1\n if D[i] == D[i + 1]:\n cons += 1\n else:\n cons = cons\n if i < 1:\n if D[i + 1] == D[i + 2]:\n cons += 1\n else:\n print(cons)\n break\nelif D.count("R") < 1:\n print(0)', 'D = input()\nans = 0\nans_list = []\nif D.count("R") >= 1:\n for i in range(3):\n if D[i] == \'R\':\n ans += 1\n ans_list.append(ans)\n if i <= 1:\n if D[i + 1] == \'S\':\n print(max(ans_list))\n break\n elif D[i] == \'R\':\n ans += 1\n ans_list.append(ans)\n elif D[i] == \'S\':\n ss = 0\n ans_list.append(ss)\n print(max(ans_list))\nelif D.count("R") < 1:\n print(0)\n', 'D = input()\nans = 0\nans_list = []\nif D.count("R") >= 1:\n for i in range(3):\n if D[i] == \'R\':\n ans += 1\n ans_list.append(ans)\n if i <= 1:\n if D[i + 1] == \'S\':\n print(max(ans_list))\n break\n elif D[i] == \'S\':\n ss = 0\n ans_list.append(ss)\n print(max(ans_list))\nelif D.count("R") < 1:\n print(0)\n', 'D = list(input().strip().split())\ncons = 0\nif D.count("R") >= 1:\n for i in range(len(D)):\n if D[i] != \'R\':\n cons == cons\n continue\n elif D[i] == \'R\':\n cons += 1\n if D[i] == D[i + 1]:\n cons += 1\n else:\n cons = cons\n if i < 2:\n if D[i + 1] == D[i + 2]:\n cons += 1\n else:\n print(cons)\n break\nelif D.count("R") < 1:\n print(0)\n ', 'D = list(input().strip().split())\nans = 0\nans_list = []\nif D.count("R") >= 1:\n for i in range(3):\n if D[i] == \'R\':\n ans += 1\n ans_list.append(ans)\n if i <= 1:\n if D[i + 1] == \'S\':\n print(max(ans_list))\n break\n elif D[i] == \'S\':\n ss = 0\n ans_list.append(ss)\n print(max(ans_list))\nelif D.count("R") < 1:\n print(0)\n', 'D = list(input().strip().split())\nans = 0\nans_list = []\nif D.count("R") >= 1:\n for i in range(3):\n if D[i] == \'R\':\n ans += 1\n ans_list.append(ans)\n if D[i + 1] == \'S\':\n print(max(ans_list))\n break\n elif D[i] == \'S\':\n ss = 0\n ans_list.append(ss)\n print(max(ans_list))\nelif D.count("R") < 1:\n print(0)\n', 'D = list(input().strip().split())\nans = 0\nans_list = []\nif D.count("R") >= 1:\n for i in range(3):\n if D[i] == \'R\':\n ans += 1\n ans_list.append(ans)\n elif D[i] == \'S\':\n ans_list.append(ans)\n ans_list.sort()\nprint(ans_list[-1])\nelif D.count("R") < 1:\n print(0)\n', 'D = input()\nans = 0\nans_list = []\nif D.count("R") >= 1:\n for i in range(3):\n if D[i] == \'R\':\n ans += 1\n ans_list.append(ans)\n elif D[i] == \'S\':\n ss = 0\n ans_list.append(ss)\n if i > 0:\n ans = 0\n print(max(ans_list))\nelif D.count("R") < 1:\n print(0)\n'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s013981105', 's247915877', 's330154972', 's441588020', 's459075709', 's460594557', 's497812755', 's504936831', 's629792344', 's735219936', 's755660061', 's785483810', 's628836857'] | [9000.0, 9036.0, 9116.0, 8844.0, 9040.0, 8832.0, 8940.0, 9052.0, 9024.0, 9120.0, 9124.0, 8932.0, 9116.0] | [28.0, 31.0, 31.0, 26.0, 29.0, 29.0, 31.0, 30.0, 26.0, 23.0, 30.0, 25.0, 26.0] | [279, 282, 279, 263, 267, 400, 425, 349, 413, 371, 348, 282, 289] |
p02582 | u247517644 | 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()\nWord_list=list(Word)\n\nnumber=0\nrenzoku=0\n\nfor num in range(3):\n if Word_list[num]="R":\n number=number+1\n else:\n if(number>renzoku):\n renzoku=number\n number=0', 'Word=input()\nWord_list=list(Word)\n \nnumber=0\nrenzoku=0\nEnter=0\n \nfor num in range(3):\n if Word_list[num]=="R":\n number=number+1\n if (number>renzoku):\n renzoku=number\n else:\n number=0\n\nprint(renzoku)'] | ['Runtime Error', 'Accepted'] | ['s167339555', 's127597259'] | [8952.0, 8880.0] | [24.0, 29.0] | [186, 212] |
p02582 | u249335194 | 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("S")==0:\n print(0)\nelif s.count("S")==1:\n print(1)\nelif s.count("S")==3:\n print(3)\nelse:\n if s[1]=="S":\n print(2)\n else:\n print(1)', 's=input()\nif s.count("R")==0:\n print(0)\nelif s.count("R")==1:\n print(1)\nelif s.count("R")==3:\n print(3)\nelse:\n if s[1]=="R":\n print(2)\n else:\n print(1)'] | ['Wrong Answer', 'Accepted'] | ['s300405106', 's412855384'] | [9040.0, 8976.0] | [29.0, 32.0] | [180, 180] |
p02582 | u250026974 | 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 heapq\n\nN, K = map(int, input().split(" "))\n \nPs = list(map(int, input().split(" ")))\nCs = list(map(int, input().split(" ")))\n\n\nmax_points = []\nheapq.heapify(max_points)\nfor now_point in range(2, N+1):\n max_point = -float(\'inf\')\n C_point = 0\n max_point = []\n heapq.heapify(max_point)\n for _ in range(K):\n next_point = Ps[now_point-1]\n C_point += Cs[next_point-1]\n \n heapq.heappush(max_point, -C_point)\n now_point = next_point\n \n max_point_ = heapq.heappop(max_point)\n heapq.heappush(max_points, max_point_)\n \nprint(-heapq.heappop(max_points))', 'import heapq\n\nN, K = map(int, input().split(" "))\n \nPs = list(map(int, input().split(" ")))\nCs = list(map(int, input().split(" ")))\n\n\nmax_points = []\nheapq.heapify(max_points)\nfor start_point in range(1, N+1):\n flg = False\n C_point = 0\n max_point = []\n heapq.heapify(max_point)\n now_point = start_point\n for _ in range(K):\n next_point = Ps[now_point-1]\n C_point += Cs[next_point-1]\n \n heapq.heappush(max_point, -C_point)\n# max_point.append(C_point)\n now_point = next_point\n \n if next_point == start_point:\n flg = True\n l = _ + 1\n last_point = C_point\n break\n \n if flg:\n# print("l",l)\n q, r = divmod(K, l)\n# print(q,r)\n now_point = start_point\n C_point = 0\n for _ in range(r):\n next_point = Ps[now_point-1]\n C_point += Cs[next_point-1]\n ins = last_point * q + C_point\n heapq.heappush(max_point, -ins)\n# max_point.append(ins)\n \n now_point = next_point \n# print("2nd", max_point)\n max_point_ = heapq.heappop(max_point)\n heapq.heappush(max_points, max_point_)\n# max_points.append(max(max_point))\n \nprint(-heapq.heappop(max_points))\n#print(max(max_points))', 'import re\n\nS = input()\n\nrrr = S.count("RRR")\nrr = S.count("RR")\nr = S.count("R")\n\nif rrr == 1:\n print(3)\nelif rr == 1:\n print(2)\nelif r == 1 or r == 2:\n print(1)\nelse:\n print(0)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s876071135', 's957363287', 's697163125'] | [9056.0, 9160.0, 9804.0] | [24.0, 29.0, 36.0] | [607, 1316, 189] |
p02582 | u250366438 | 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 __name__ == "__main__":\n S = input()\n rains = 0\n for i, s in enumerate(S):\n if s == \'R\':\n rains += 1\n else:\n rains = 0\n\n print(rains)\n\n', 'if __name__ == "__main__":\n S = input()\n list_s = [s for s in S]\n ans = 0\n if list_s[0] == \'S\' and list_s[1] == \'S\' and list_s[2] == \'S\':\n ans = 0\n elif list_s[0] == \'S\' and list_s[1] == \'S\' and list_s[2] == \'R\':\n ans = 1\n elif list_s[0] == \'S\' and list_s[1] == \'R\' and list_s[2] == \'R\':\n ans = 2\n elif list_s[0] == \'R\' and list_s[1] == \'R\' and list_s[2] == \'R\':\n ans = 3\n elif list_s[0] == \'R\' and list_s[1] == \'S\' and list_s[2] == \'R\':\n ans = 1\n elif list_s[0] == \'R\' and list_s[1] == \'R\' and list_s[2] == \'S\':\n ans = 2\n elif list_s[0] == \'R\' and list_s[1] == \'S\' and list_s[2] == \'S\':\n ans = 1\n elif list_s[0] == \'S\' and list_s[1] == \'R\' and list_s[2] == \'S\':\n ans = 1\n\n print(ans)\n\n\n\n\n'] | ['Wrong Answer', 'Accepted'] | ['s015851850', 's134746808'] | [8920.0, 9136.0] | [28.0, 27.0] | [186, 781] |
p02582 | u250944591 | 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()\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)', "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)"] | ['Runtime Error', 'Accepted'] | ['s970972598', 's507105326'] | [9028.0, 8912.0] | [29.0, 27.0] | [102, 108] |
p02582 | u256901785 | 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\nlst = [0]*len(s)\nfor i in range(1,len(s)):\n if s[i] == s[i-1]:\n lst[i] = lst[i-1] + 1\nprint(max(lst))", "s = input() + '@'\n\nlst = [1]*len(s)\nfor i in range(1,len(s)):\n if s[i] == s[i-1]:\n lst[i] = lst[i-1] + 1\n\nans = 0\nfor i in range(0,len(s)):\n\tif s[i] == 'R':\n\t\tans = max(ans,lst[i])\n\nprint(ans)\n\n"] | ['Wrong Answer', 'Accepted'] | ['s677961368', 's732125704'] | [8932.0, 9016.0] | [30.0, 31.0] | [124, 198] |
p02582 | u259265086 | 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()\nres = 0\n\nif s[0] == s[1]:\n res += 1\nif s[1] == s[2]:\n res += 1\n\nprint(res)\n ', 's = input()\nres = 0\n \nif s[0] == s[1]:\n res += 1\nif s[1] == s[2]:\n res += 1\n \nprint(res)\n ', 's = input()\nres = 1\n \nif s[0] == "R" and s[1] == "R":\n res += 1\nif s[1] == "R" and s[2] == "R":\n res += 1\n \nif "R" in s:\n print(res)\nelse:\n print(0)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s021604908', 's577153783', 's270438744'] | [9020.0, 9024.0, 9100.0] | [27.0, 25.0, 26.0] | [91, 93, 153] |
p02582 | u261036477 | 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 == "SSS":\n print(0)\nelif S == "SSR"or"SRS"or"RSS"or"RSR":\n print(1)\nelif S == "SRR"or"RRS":\n print(2)\nelif S == "RRR":\n print(4)', 'S = input()\nif S == "SSS":\n print("0")\nelif S == "SSR"or"SRS"or"RSS":\n print("1")\nelif S == "SRR"or"RRS":\n print("2")\nelif S == "RRR":\n print("3")', 'S = input()\nif S == "SSS":\n print("0")\nelif S == "SSR"or"SRS"or"RSS"or"RSR":\n print("1")\nelif S == "SRR"or"RRS":\n print("2")\nelif S == "RRR":\n print("3")', 'S = input()\nif S == "SSR"or"SRS"or"RSS"or"SSS":\n print("0")\nelif S == "RSR":\n print("1")\nelif S == "SRR"or"RRS":\n print("2")\nelif S == "RRR":\n print("3")', 'S = input()\nif S == "SSS":\n print("0")\nelif S == "SSR"or"SRS"or"RSS"or"RSR":\n print("1")\nelif S == "SRR"or"RRS":\n print("2")\nelif S == "RRR":\n print("3")', 'S = str(input())\nif S == "SSS":\n print(0)\nelif S == "SSR"or"SRS"or"RSS"or"RSR":\n print(1)\nelif S == "SRR"or"RRS":\n print(2)\nelif S == "RRR":\n print(7)', 'S = str(input())\nif S == "SSS":\n print(0)\nelif S == "SSR"or"SRS"or"RSS"or"RSR":\n print(1)\nelif S == "SRR"or"RRS":\n print(2)\nelif S == "RRR":\n print(3)', 'S = input()\nif S == "SSS":\n print(0)\nelif S == "SSR"or"SRS"or"RSS"or"RSR":\n print(1)\nelif S == "SRR"or"RRS":\n print(2)\nelif S == "RRR":\n print(3)', 'S = input()\nr = S.count("R")\nif r == 0:\n print(0)\nelif r == 1:\n print(1)\nelif r == 3:\n print(3)\nelif r == 2:\n if S == "RSR":\n print(1)\n else:\n print(2)'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s042901553', 's406983734', 's452114132', 's510942863', 's560403056', 's647807035', 's841238548', 's951761452', 's096951534'] | [8972.0, 8960.0, 9032.0, 9092.0, 9056.0, 9092.0, 8996.0, 8964.0, 9048.0] | [28.0, 32.0, 25.0, 30.0, 32.0, 26.0, 27.0, 33.0, 28.0] | [162, 158, 165, 165, 165, 162, 162, 157, 180] |
p02582 | u264281836 | 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. | ["str =list(input())\ncounter =0\nmax=0\nfor s in str:\n if s ='S':\n counter =0\n else \n counter +=1\n if max <counter\n max =counter\nprint(max)", "str =list(input())\ncounter =0\nmax=0\nfor s in str:\n if s =='S':\n counter =0\n else :\n counter +=1\n if max <counter:\n max =counter\nprint(max)"] | ['Runtime Error', 'Accepted'] | ['s490175371', 's137927746'] | [8848.0, 9096.0] | [28.0, 27.0] | [169, 172] |
p02582 | u265118937 | 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. | ['\ns=input()\nflg = 0\ncnt = 0\nif s[1] == "S":\n flg = 1\nfor i in range(3):\n if s[i] == "S":\n cnt += 1\nprint(cnt if flg == 1 else cnt -1)', 's=input()\nflg = 0\ncnt = 0\nif s == "SSS":\n print(0)\n exit()\nif s[1] == "S":\n flg = 1\nfor i in range(3):\n if s[i] == "R":\n cnt += 1\nif cnt >= 2 and flg == 1:\n print(cnt -1)\nelse:\n print(cnt)'] | ['Wrong Answer', 'Accepted'] | ['s842638791', 's026962042'] | [9032.0, 9044.0] | [27.0, 29.0] | [145, 213] |
p02582 | u266014018 | 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\ndef input(): return sys.stdin.readline().rstrip()\ndef ii(): return int(input())\ndef mi(): return map(int, input().split())\ndef li(): return list(mi())\n\n\ndef main():\n s = input()\n cnt = 0\n for i in range(1, 3):\n if s[i] == 'R' and s[i-1] == 'R':\n cnt += 1\n print(cnt)\n\n\nif __name__ == '__main__':\n main()", "import sys\ndef input(): return sys.stdin.readline().rstrip()\ndef ii(): return int(input())\ndef mi(): return map(int, input().split())\ndef li(): return list(mi())\n\n\ndef main():\n s = input()\n cnt = 0\n if 'RRR' in s:\n print(3)\n elif 'RR' in s:\n print(2)\n elif 'R' in s:\n print(1)\n else:\n print(0)\n\n\nif __name__ == '__main__':\n main()"] | ['Wrong Answer', 'Accepted'] | ['s078260956', 's944816928'] | [8904.0, 9136.0] | [27.0, 28.0] | [347, 379] |
p02582 | u267718666 | 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\nm = 0\ncnt = 0\nfor i in range(3):\n if s[i] == 'r':\n cnt += 1\n else:\n m = max(m, cnt)\n cnt = 0\n\nprint(max(m, cnt))", "s = input()\n\nm = 0\ncnt = 0\nfor i in range(3):\n if s[i] == 'R':\n cnt += 1\n else:\n m = max(m, cnt)\n cnt = 0\n\nprint(max(m, cnt))"] | ['Wrong Answer', 'Accepted'] | ['s047845578', 's922729006'] | [9088.0, 8944.0] | [27.0, 27.0] | [152, 152] |
p02582 | u269525089 | 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\tprint("3")\nelif A == SSS\n\tprint("0")\nelif A == RRS\n\tprint("2")\nelif A == SRR\n\tprint("2")\nelse \n\tprint("1")\n', 'print(input().count("S"))', 'S = input()\nif S == RRR\n\tprint("3")\nelif S == SSS\n\tprint("0")\nelif S == RRS\n\tprint("2")\nelif S == SRR\n\tprint("2")\nelse \n\tprint("1")', 'if S == RRR\n\tprint("3")\nelif S == SSS\n\tprint("0")\nelif S == RRS\n\tprint("2")\nelif S == SRR\n\tprint("2")\nelse \n\tprint("1")\n', 's = input().split()\nif s[0] == R and s[1] == R and s[2] == R \n\tprint("3")\nelif s[0] == S and s[1] == S and s[2] == S \n\tprint("0")\nelif s[0] == R and s[1] == R and s[2] == S \n\tprint("2")\nelif s[0] == S and s[1] == R and s[2] == R\n\tprint("2")\nelse \n\tprint("1")\n', 'S = input()\nif S.count("R") == 3:\n\tprint("3")\nelif S.count("R") == 0:\n\tprint("0")\nelif S.count("RR") == 1:\n \tprint("2")\nelse:\n\tprint("1")\n\n'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s101041860', 's291797909', 's388491588', 's696982074', 's791813606', 's734821427'] | [8996.0, 8948.0, 9008.0, 9000.0, 9004.0, 9028.0] | [20.0, 27.0, 26.0, 21.0, 34.0, 34.0] | [132, 25, 131, 120, 259, 140] |
p02582 | u272457181 | 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 = 'RRS' or S = 'SRR':\n print('2')\nelse :\n print('1')\n ", "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'] | ['s156382977', 's006126224'] | [8932.0, 8988.0] | [30.0, 27.0] | [132, 132] |
p02582 | u273339216 | 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 k%2 == 0 and abs(x)==abs(d):\n print(abs(x))\n exit()\n\nfor i in range(k):\n if abs(x - d) <= abs(x + d):\n x = x - d\n else:\n x = x + d\nprint(abs(x))\n\n', 's = input()\niter = 0\nif s[0] =="R"and s[1]=="R" and s[2]=="R":\n print(3)\nelif s[0] =="R"and s[1]=="R":\n print(2)\nelif s[1]=="R" and s[2]=="R":\n print(2)\nelif s[0] =="R"or s[1]=="R" or s[2]=="R":\n print(1)\nelif s[0] =="R"and s[2]=="R":\n print(1)\nelse:\n print(0)'] | ['Runtime Error', 'Accepted'] | ['s017038512', 's322113517'] | [9060.0, 9132.0] | [32.0, 32.0] | [199, 266] |
p02582 | u279439669 | 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. | ['# rainy season\n\ndef rainy(S):\n if \'SSS\' in S:\n return 3\n if \'SS\' in S:\n return 2\n if \'S\' in S:\n return 1\n return 0\n\nif __name__ == "__main__":\n input = list(input().split())\n print(rainy(input[0]))\n', '# rainy season\n\ndef rainy(S):\n if \'RRR\' in S:\n return 3\n if \'RR\' in S:\n return 2\n if \'R\' in S:\n return 1\n return 0\n\nif __name__ == "__main__":\n input = list(input().split())\n print(rainy(input[0]))\n'] | ['Wrong Answer', 'Accepted'] | ['s697334308', 's069958135'] | [8948.0, 9048.0] | [29.0, 27.0] | [213, 213] |
p02582 | u280478211 | 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()\n\nif a == "RRR":\n answer=2\nelif a=="RRS" or a=="SRR":\n answer=1\nelse:\n answer=0\n \nprint(answer)', 'a=input()\n\nif a == "RRR":\n answer=3\nelif a=="RRS" or a=="SRR":\n answer=2\nelif a=="SSS":\n answer=0\nelse:\n answer=1\n \nprint(answer)'] | ['Wrong Answer', 'Accepted'] | ['s961350957', 's302421646'] | [9092.0, 9116.0] | [29.0, 30.0] | [108, 134] |
p02582 | u281861735 | 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 sys import stdin,stdout\nfrom collections import defaultdict\nimport math\n#input=stdin.readline\n#def print(x):stdout.write(str(x)+'\\n')\nfor _ in range(int(input())):\n s=input()\n if s=='RRR':\n print(3)\n elif 'RR' in s:\n print(2)\n elif 'R' in s:\n print(1)\n else:\n print(0)", "from sys import stdin,stdout\nfrom collections import defaultdict\nimport math\n#input=stdin.readline\n#def print(x):stdout.write(str(x)+'\\n')\ns=input()\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'] | ['s481332124', 's267020932'] | [9476.0, 9304.0] | [29.0, 34.0] | [316, 250] |
p02582 | u283539527 | 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. | ['MOD = 1000000007\nfrom collections import defaultdict as dd,Counter,deque\n\ndef si(): return input()\ndef ii(): return int(input())\ndef li(): return list(map(int,input().split()))\ndef mi(): return map(int,input().split())\ndef out(v): print(v)\ndef spout(): print(v,end=" ")\ndef d2b(n): return bin(n).replace("0b","")\ndef twod(n,m,num):return [[num for x in range(m)] for y in range(n)]\ndef vow(): return [\'a\',\'e\',\'i\',\'o\',\'u\']\ndef let(): return [chr(i) for i in range(97,123)]\ndef gcd(x, y):\n while y:\n x, y = y, x % y\n return x\ndef ispow2(x):\n return (x and (not(x & (x - 1))))\ndef prime_factors(n):\n i = 2\n factors = []\n while i * i <= n:\n if n % i: i+=1\n else:\n n //= i\n factors.append(i)\n if n > 1: factors.append(n)\n return (list(factors))\n \ns=si()\nfor i in range(3):\n if s[i]=="S":\n c+=1\nif c<2 or c==3: print(c)\nelse:\n if s[1]=="S": print(2)\n else: print(1)', 's=input()\nc=0\nfor i in range(3):\n if s[i]=="R":\n c+=1\nif c<2 or c==3: print(c)\nelse:\n if s[1]=="R": print(2)\n else: print(1)'] | ['Runtime Error', 'Accepted'] | ['s213304484', 's414967271'] | [9212.0, 9068.0] | [31.0, 36.0] | [933, 130] |
p02582 | u285497176 | 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 main():\n s = input()\n c = 0\n if s[0] == s[1] == s[2] == "R":\n print(3)\n return\n if s[0] == s[1] == "R" or s[1] == s[2] == "R":\n print(2)\n return\n if s[0] == s[1] == s[2] == "S":\n print(0)\n return\n\n print(1)\n return\n\nmain()\n\n', 'def main():\n s = input()\n c = 0\n if s[0] == s[1] == s[2] == "R":\n print(3)\n return\n if s[0] == s[1] == "R" or s[1] == s[2] == "R":\n print(2)\n return\n if s[0] == s[1] == s[2] == "S":\n print(0)\n return\n\n print(1)\n return\n\nmain()\n\n'] | ['Runtime Error', 'Accepted'] | ['s186237851', 's036051445'] | [8944.0, 9116.0] | [25.0, 34.0] | [295, 291] |
p02582 | u304058693 | 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 == "SSS":\n print(0)\nelif s == "RSS" or "SRS" or "SSR" or "RSR":\n print(1)\nelif s == "RRS" or "SRR":\n print(2)\nelif s == "RRR":\n print(3)\n', 's = input()\n\n\n #print(0)\n#elif s == "RSS" or "SRS" or "SSR" or "RSR":\n #print(1)\n#elif s == \'RRS\' or \'SRR\':\n #print(2)\n\n #print(3)\n\nif s.count("R") == 0:\n print(0)\nelif s.count("R") == 1 or s == "RSR":\n print(1)\nelif s.count("R") == 2:\n print(2)\nelif s.count("R") == 3:\n print(3)\n'] | ['Wrong Answer', 'Accepted'] | ['s773383526', 's039596996'] | [9024.0, 8964.0] | [32.0, 27.0] | [167, 336] |
p02582 | u305237878 | 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\nif "S" in S:\n if S[1] == "S" and (S[0] != "S" or S[2] != "S"):\n print(1)\n elif S[0] == "S" and S[1] == "S" and S[2] == "S":\n print(0)\n elif S[1] == "R" and (S[0] != "R" or S[2] != "R"):\n print(1)\n else:\n print(2)\nelse:\n print(3)', 'S = list(input())\n\nif "S" in S:\n if S[1] == "S" and (S[0] != "S" or S[2] != "S"):\n print(1)\n elif S[0] == "S" and S[1] == "S" and S[2] == "S":\n print(0)\n elif S[1] == "R" and S[0] != "R" and S[2] != "R":\n print(1)\n else:\n print(2)\nelse:\n print(3)'] | ['Wrong Answer', 'Accepted'] | ['s891124682', 's274024744'] | [9124.0, 9124.0] | [28.0, 27.0] | [290, 289] |
p02582 | u307124824 | 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())\nRD = S.count('R')\nif RD != 2:\n print(RD)\nelse:\n if S[1] == 'R':\n print(RD and 'bbb')\n else:\n print(1)\n", "S = list(input())\nRD = S.count('R')\nif RD != 2:\n print(RD)\nelse:\n if S[1] == 'R':\n print(RD and 'bbb')\n else:\n print(1)\n", "S = list(input())\nRD = S.count('R')\nif RD != 2:\n print(RD)\nelse:\n if S[1] == 'R':\n print(RD)\n else:\n print(1)\n"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s205626962', 's510463689', 's545108358'] | [8972.0, 8968.0, 8936.0] | [28.0, 27.0, 27.0] | [143, 143, 133] |
p02582 | u309120194 | 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 \n\n# RRR RRS SRR RSR RSS SRS SSR SSS\nans = 0\nif S == 'RRR': ans = 3\nelif S == 'SRR' and S == 'RRS': ans = 2\nelif S == 'SSS': ans = 0\nelse: ans = 1\n \nprint(ans)\n\nRSR SSR SRS RSS ", "S = input()\n\nans = 0\nif S ='RRR': ans = 3\nelse:\n if ('RR' in S) ans = 2\n else:\n if('R' in S) ans = 1\n else: ans = 0\n \nprint(ans)", 'N = int(input())\nL = list(map(int, input().split()))\n \nans = 0\nif(N >= 3):\n t = []\n for i in range(N):\n for j in range(i+1, N):\n for k in range(j+1, N):\n if((abs(L[j]-L[k]) < L[i]) & (L[i] < L[j]+L[k])): t.append((L[i], L[j], L[k]))\n ans = len(set(t))\n\nprint(ans)', "S = input()\n \nans = 0\nif S == 'RRR': ans = 3\nelse:\n if ('RR' in S) ans = 2\n else:\n if('R' in S) ans = 1\n else: ans = 0\n\nprint(ans)", 'N = int(input())\nL = list(map(int, input().split()))\n \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] and L[i] != L[k] and L[j] != L[k] and abs(L[j]-L[k]) < L[i] and L[i] < L[j]+L[k]):\n ans +=1\n \nprint(ans)', "S = input()\n \nans = 0\nif S ='RRR': ans = 3\nelse:\n if ('RR' in S) ans = 2\n else:\n if('R' in S) ans = 1\n else: ans = 0\n\nprint(ans)", "S = input()\n \n\n# RRR RRS SRR RSR RSS SRS SSR SSS\nans = 0\nif S == 'RRR': ans = 3\nelif S == 'SRR' and S == 'RRS': ans = 2\nelif S == 'SSS': ans = 0\nelse: ans = 1\n \nprint(ans)", "S = input()\n\n\nans = 0\nif S == 'RRR': ans = 3\nelif S == 'SRR' and S =='RSR' and S == 'RRS': ans = 2\nelif S == 'SSS': ans = 0\nelse: ans = 1\n \nprint(ans)", "S = input()\n \n\n# RRR RRS SRR RSR RSS SRS SSR SSS\nans = 0\nif S == 'RRR': ans = 3\nelif S == 'SRR' or S == 'RRS': ans = 2\nelif S == 'SSS': ans = 0\nelse: ans = 1\n \nprint(ans)"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s225303402', 's290694741', 's359732118', 's595489174', 's631568786', 's695555929', 's862016698', 's969121023', 's408926301'] | [8972.0, 8972.0, 9212.0, 8916.0, 9144.0, 8944.0, 8964.0, 9000.0, 8928.0] | [27.0, 25.0, 24.0, 29.0, 25.0, 24.0, 27.0, 28.0, 27.0] | [248, 139, 281, 138, 280, 136, 230, 209, 229] |
p02582 | u310245677 | 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)\nif('RR' in s):\n print(2)\nif('R' in s):\n print(1)\nelse:\n print(0)", "s=input()\nif s=='RRR':\n print(3)\nelif 'RR' in s:\n print(2)\nelif 'R' in s:\n print(1)\nelse:\n print(0)"] | ['Wrong Answer', 'Accepted'] | ['s972425763', 's029779321'] | [9108.0, 9072.0] | [26.0, 28.0] | [102, 103] |
p02582 | u314089899 | 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())\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 = str(input())\n\nif S == "SSS":\n print(3)\nelif S == "RSS" or S == "SSR":\n print(2)\nelse:\n print(1)', 'S = str(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', 'Wrong Answer', 'Accepted'] | ['s429784592', 's889327478', 's137810919'] | [8856.0, 9088.0, 9092.0] | [22.0, 32.0, 30.0] | [137, 108, 138] |
p02582 | u316152477 | 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 "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', '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)\n'] | ['Wrong Answer', 'Accepted'] | ['s040707820', 's857827783'] | [9016.0, 9016.0] | [28.0, 32.0] | [116, 116] |
p02582 | u318165580 | 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[1]=="R":\n if S[2]=="R" and S[0]=="R":\n print(3)\n else:\n if S[0]=="R":\n print(2)\n if S[2]=="R":\n print(2)\n else:\n print(1)\nelse:\n if S[2]=="R" or S[0]=="R":\n print(1)\n else:\n print(0)', 'S=str(input())\nif S[1]=="R":\n if S[2]=="R" and S[0]=="R":\n print(3)\n else:\n if S[0]=="R":\n print(2)\n elif S[2]=="R":\n print(2)\n else:\n print(1)\nelse:\n if S[2]=="R" or S[0]=="R":\n print(1)\n else:\n print(0)'] | ['Wrong Answer', 'Accepted'] | ['s745609412', 's426368088'] | [9112.0, 9048.0] | [27.0, 31.0] | [239, 241] |
p02582 | u321492259 | 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()\nc = 0\nans = 0\nfor i in range(3):\n if S[i] == 'R':\n c++\n else:\n ans = max(c,ans)\nprint(ans)", "S = input()\nc = 0\nans = 0\nfor i in range(3):\n if S[i] == 'R':\n c+=1\n else:\n ans = max(c,ans)\n c = 0\nans = max(c,ans)\nprint(ans)"] | ['Runtime Error', 'Accepted'] | ['s965314073', 's632951846'] | [8932.0, 9044.0] | [23.0, 28.0] | [110, 138] |
p02582 | u322187839 | 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[1]==s[2]=='S':\n print(3)\nelif s[0]==s[1]=='S' or s[1]==s[2]=='S' or s[0]==s[2]=='S':\n print(2)\nelif s[0]==s[1]==s[2]=='R':\n print(0)\nelse:\n print(1)\n", "s=input()\n\nif s[0]==s[1]==s[2]=='R':\n print(3)\nelif s[0]==s[1]=='R' or s[1]==s[2]=='R':\n print(2)\nelif s[0]==s[1]==s[2]=='S':\n print(0)\nelse:\n print(1)\n"] | ['Wrong Answer', 'Accepted'] | ['s417578223', 's233081582'] | [9108.0, 9104.0] | [33.0, 30.0] | [183, 164] |
p02582 | u324061287 | 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. | ['\ns=input()\ns=s.trim()\nif s=="rrs" || s=="srr":\n print("2")\nelse if s=="rrr":\n print("3")\nelse if s=="sss":\n print(\'0\')\nelse:\n print(\'1\')\n', '\n\ns=input()\ns=s.trim()\nif s=="rrs" or s=="srr":\n print("2")\nelif s=="rrr":\n print("3")\nelif s=="sss":\n print(\'0\')\nelse:\n print(\'1\')\n', 's = str(input())\n\nif s.find(\'rr\') != -1:\n print("2")\nelif s.find(\'r\') !=-1:\n print("1")\nelse :\n print ("0")\n', 's = str(input())\nif s == "rrs" or s == "srr":\n print(\'2\')\nelif s == "rrr":\n print(\'3\')\nelif s == "sss":\n print(\'0\')\nelse:\n print(\'1\')\n', 's = str(input())\ns=s.lower(s)\n\nif s.find(\'rr\') != -1:\n print("2")\nelif s.find(\'r\') !=-1:\n print("1")\nelse :\n print ("0")\n', 's = str(input())\ns=s.lower()\n\nif s=="rrr":\n print(\'3\')\nelif s.find(\'rr\') != -1:\n print("2")\nelif s.find(\'r\') != -1:\n print("1")\nelse:\n print ("0")\n'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s252361482', 's443846489', 's611316832', 's856900454', 's890190685', 's698008957'] | [9000.0, 9096.0, 8980.0, 8996.0, 9084.0, 9032.0] | [25.0, 29.0, 32.0, 31.0, 25.0, 29.0] | [149, 144, 117, 146, 130, 159] |
p02582 | u325492232 | 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 abc175_a():\n s = input()\n cnt = 0\n \n for i in range(len(s)):\n if s[i] == 'R':\n cnt += 1\n elif (i > 0) and (s[i - 1] == 'S') and (s[i] == 'R'):\n cnt = 1\n else:\n cnt = 0\n \n print(cnt)\n\nif __name__ == '__main__':\n abc175_a()", "def abc175_a_1():\n def solve():\n \n if s.count('RRR'):\n return 3\n if s.count('RR'):\n return 2\n if s.count('R'):\n return 1\n return 0\n\n s = input()\n print(solve())\n\nif __name__ == '__main__':\n abc175_a_1()"] | ['Wrong Answer', 'Accepted'] | ['s380638727', 's601143982'] | [9024.0, 9084.0] | [33.0, 29.0] | [300, 390] |
p02582 | u327421986 | 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. | ['st = input()\nif st[0] == st[1] and st[0] == st[2] and st[0] == "R":\n print(3)\nelif (st[0] == st[1] == "R") OR (st[1] == st[2] == "R"):\n print(2)\nelse:\n print(1)', 'st = input()\nif st[0] == st[1] and st[0] == st[2] and st[0] == "R":\n print(3)\nelif (st[0] == st[1] and st[0] == "R") or (st[1] == st[2] and st[1] == "R"):\n print(2)\nelif "R" in st:\n print(1)\nelse:\n print(0)\n'] | ['Runtime Error', 'Accepted'] | ['s965284480', 's351192097'] | [8844.0, 8992.0] | [26.0, 31.0] | [163, 211] |
p02582 | u328510800 | 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 == \'R\':\n print(3)\nelif s[:3] == "RR" or s[1:] == "RR":\n print(2)\nelif \'R\' in s:\n print(1)\nelse:\n print(0)', 's = input()\n\nif s == \'RRR\':\n print(3)\nelif s[:2] == "RR" or s[1:] == "RR":\n print(2)\nelif \'R\' in s:\n print(1)\nelse:\n print(0)'] | ['Wrong Answer', 'Accepted'] | ['s335910182', 's144275699'] | [9100.0, 9040.0] | [29.0, 27.0] | [127, 129] |
p02582 | u329730886 | 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()\nfor si in S:\n renzoku = 0\n if si == 'R':\n renzoku += 1\n else:\n renzoku = 0\nprint(renzoku)", "S = input()\nif S == 'RSR':\n renzoku = 2\nelse:\n for si in S:\n if si == 'R':\n renzoku += 1\n\nprint(renzoku)", "S = input()\nif S == 'RSR':\n renzoku = 1\nelse:\n renzoku = 0\n for si in S:\n if si == 'R':\n renzoku += 1\n\nprint(renzoku)"] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s367442517', 's568634904', 's394501122'] | [9084.0, 9028.0, 9088.0] | [32.0, 28.0, 31.0] | [124, 128, 144] |
p02582 | u335406314 | 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()\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")', "S = input('').split()\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)", "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)"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s001916077', 's551488882', 's658864429'] | [9092.0, 9032.0, 9096.0] | [27.0, 34.0, 28.0] | [134, 126, 118] |
p02582 | u338597441 | 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().split())\na="".join(a)\ncount=0\nfor i in range(3):\n \n if a[i]==\'S\':\n count=1\n else:\n count+=1\nprint(count)', 'a=list(input().split())\na="".join(a)\ncount=0\nfor i in range(3):\n \n if a[i]==\'R\':\n count+=1\n ans=count\n else:\n count=0\n \n \nprint(count)', 'n=input()\nn="".join(n)\nc,ans=0,0\nfor i in range(3):\n if n[i]=="R":\n c+=1\n ans=c\n else:\n c=0\n \nprint(ans)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s488655370', 's595629982', 's721626288'] | [9092.0, 8912.0, 9048.0] | [33.0, 31.0, 31.0] | [142, 177, 138] |
p02582 | u342801789 | 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()\ncount = 0\nif S[0] == 'R':\n if S[1] == 'R':\n if S[2] == 'R':\n \tprint(3)\n \telse:\n \tprint(2)\n else:\n if S[2] == 'R':\n print(1)\nelse:\n if S[1] == 'R':\n if S[2] == 'R':\n print(2)\n else:\n print(1)\n else:\n if S[2] == 'R':\n print(1)\n else:\n print(0)", "S = input()\nif S[0] == 'R':\n if S[1] == 'R':\n if S[2] == 'R':\n print(3)\n else:\n print(2)\n else:\n print(1)\nelse:\n if S[1] == 'R':\n if S[2] == 'R':\n print(2)\n else:\n print(1)\n else:\n if S[2] == 'R':\n print(1)\n else:\n print(0)"] | ['Runtime Error', 'Accepted'] | ['s137521519', 's758260774'] | [8952.0, 9116.0] | [25.0, 35.0] | [309, 358] |
p02582 | u343976048 | 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("晴れならs,雨ならrを入力してください")\nif A == "sss":\n\tprint(0)\nelif A == "rrr":\n print(3) \nelif A == "srr" or A == "rrs":\n print(2)\nelse:\n print(1)', 'A = input("")\nif A == "sss":\n\tprint(0)\nelif A == "rrr":\n print(3) \nelif A == "srr" or A == "rrs":\n print(2)\nelif A == "rss" or A == "srs" or A == "ssr" or A == "rsr":\n print(1)', 'A = input()\nif A =="S":\n\tprint("天気が雨である日が連続していた最大の日数を出力せよ。")\nif A == "sss":\n\tprint(0)\nif A == "rss" or "srs" or "ssr" or "rsr":\n print(1)\nif A == "srr" or "rrs":\n print(2)\nif A == "rrr":\n print(3)', 'A = input()\nif A == "S"\n\tprint("天気が雨である日が連続していた最大の日数を出力せよ。")\nif A = "SSS"\n\tprint(0)\nif A == "RSS" or "SRS" or "SSR" or "RSR":\n print(1)\nif A == "SRR" or "RRS":\n print(2)\nif A == "RRR":\n print(3)', 'A = input("")\nif A == "S"\n\tprint("天気が雨である日が連続していた最大の日数を出力せよ。")\nif A = "SSS"\n\tprint(0)\nif A == "RSS" or "SRS" or "SSR" or "RSR":\n print(1)\nif A == "SRR" or "RRS":\n print(2)\nif A == "RRR":\n print(3)', 'A = input("")\nif A == "sss":\n\tprint(0)\nelif A == "rrr":\n print(3) \nelif A == "srr" or A == "rrs":\n print(2)\nelse:\n print(1)', 'A = input("")\nif A =="S":\n\tprint("天気が雨である日が連続していた最大の日数を出力せよ。")\nelif A == "sss":\n\tprint(0)\nelif A == "rrr":\n print(3) \nelif A == "srr" or A == "rrs":\n print(2)\nelse:\n print(1)', 'A = input()\nif A == "sss":\n\tprint(0)\nelif A == "rrr":\n print(3) \nelif A == "srr" or A == "rrs":\n print(2)\nelse:\n print(1)', 'A = input("晴れならs,雨ならrを入力してください")\nif A =="S":\n\tprint("天気が雨である日が連続していた最大の日数を出力せよ。")\nelif A == "sss":\n\tprint(0)\nelif A == "rrr":\n print(3) \nelif A == "srr" or A == "rrs":\n print(2)\nelse:\n print(1)', 'A = input()\nif A == "SSS":\n\tprint(0)\nelif A == "RRR":\n print(3) \nelif A == "SRR" or A == "RRS":\n print(2)\nelse:\n print(1)'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s018551080', 's149931950', 's198910743', 's232648150', 's620543935', 's670662994', 's804876984', 's938399832', 's994855469', 's626280594'] | [9084.0, 9040.0, 9072.0, 9000.0, 8976.0, 8904.0, 9092.0, 8976.0, 9108.0, 8952.0] | [29.0, 28.0, 34.0, 25.0, 26.0, 29.0, 31.0, 29.0, 29.0, 30.0] | [179, 181, 251, 249, 251, 128, 231, 126, 282, 126] |
p02582 | u344276999 | 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()\nma = 0\ni = 0\nm = 0\nwhile(i != len(S)):\n print(i)\n if S[i] == "R":\n m += 1\n else:\n ma = max(ma,m)\n m = 0\n i += 1\n\nprint(ma)', 'S = input()\nmax = 0\ni = 0\nm = 0\nwhile(i != len(S)):\n if S[i] == "R":\n m += 1\n \n else:\n max = max(max,m)\n m = 0\n break\n i += 1\n\nprint(max)', 's = input()\ncount = 0\nans = 0\n\nfor i in range(len(s)):\n if(s[i] == "R"):\n count += 1\n else:\n ans = max(count, ans)\n count = 0\nans = max(count, ans)\nprint(ans)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s608333636', 's618183218', 's013976637'] | [8972.0, 8920.0, 8956.0] | [25.0, 23.0, 26.0] | [147, 153, 169] |
p02582 | u351480677 | 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)\nif x//d > k:\n print(x-k*d)\nelif (k-x//d)%2 == 0:\n print(x%d)\nelse:\n print(d-x%d)', 's = input()\n#print(s[0])\nif s[0]==s[1]==s[2]=="R":\n print(3)\nelif s[0]=="R" and s[1]=="R":\n print(2)\nelif s[1]=="R" and s[2]=="R":\n print(2)\nelif s[0]=="R":\n print(1)\nelif s[1]=="R":\n print(1)\nelif s[2]=="R":\n print(1)\nelse:\n print(0)'] | ['Runtime Error', 'Accepted'] | ['s921095476', 's134667035'] | [9140.0, 9036.0] | [25.0, 33.0] | [127, 255] |
p02582 | u352676541 | 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())\n\nans = 0\nif S == "SSS":\n\tans = 0\n\tbreak\nelif S == "SSR" or S == "RSS" or S = "RSR":\n\tans = 1\n\tbreak\nelif S == "SRR" or S == "RRS":\n\tans = 2\n\tbreak\nelif S == "RRR":\n\tans = 3\n\tbreak\nprint(ans)', 'S=str(input())\n\nans = 0\nif S == "SSS":\n\tans = 0\nelif S == "SSR" or S == "RSS" or S == "RSR" or S == "SRS":\n\tans = 1\nelif S == "SRR" or S == "RRS":\n\tans = 2\nelif S == "RRR":\n\tans = 3\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s552055535', 's046926468'] | [8924.0, 9032.0] | [20.0, 31.0] | [205, 192] |
p02582 | u354126779 | 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\tprint(3)\nelif s=="RRS" or s=="SRR":\n\tprint(2)\nelif s=="SSR" or s=="SRS" or s=="RSS" or s=="RSR”:\n\tprint(1)\nelse:\n\tprint(0)', 's=input()\nif s=="RRR":\n\tprint(3)\nelif s=="RRS" or s=="SRR":\n\tprint(2)\nelif s=="SSR" or s=="SRS" or s=="RSS" or s=="RSR:\n\tprint(1)\nelse:\n\tprint(0)', 's=input()\nif s=="RRR":\n\tprint(3)\nelif s=="RRS" or s=="SRR":\n\tprint(2)\nelif s=="SSR" or s=="SRS" or s=="RSS" or s=="RSR":\n\tprint(1)\nelse:\n\tprint(0)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s764477719', 's838586790', 's049223323'] | [8892.0, 8868.0, 9040.0] | [31.0, 24.0, 29.0] | [148, 145, 146] |
p02582 | u354804355 | 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 == "RRR":\n print(3)\nelif s == "RRS" or s == "SRR":\n print(2)\nelif s == "SSS":\n print(0)\nelse:\n print(1)\nprint(s)', 's = str(input())\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)'] | ['Wrong Answer', 'Accepted'] | ['s675846441', 's075170472'] | [9024.0, 9096.0] | [34.0, 27.0] | [138, 129] |
p02582 | u356983865 | 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())\nList = []\n\nif abs(X) > K*D:\n print(abs(X) - K*D)\nelif K == 1:\n print(min(abs(X-D),abs(X+D)))\nelif K == 2:\n print(min(abs(X+D+D),abs(X-D-D),abs(X)))\nelif K == 3:\n print(min(abs(X+D+D+D),abs(X+D),abs(X-D),abs(X-D-D-D)))\nelse:\n for i in range(3):\n if abs(X - D) >= abs(X+D):\n List.append(abs(X+D))\n X = X+D\n else:\n List.append(abs(X-D))\n X = X-D\n\n for i in range(K-3):\n if List[i] == List[i+2]:\n if K%2 == i%2:\n print(List[i+1])\n else:\n print(List[i])\n break\n else:\n if abs(X - D) >= abs(X+D):\n List.append(abs(X+D))\n X = X+D\n else:\n List.append(abs(X-D))\n X = X-D\n\n if len(List) == K:\n print(List[K-1])\n else:\n pass', 'X,K,D = map(int,input().split())\nList = []\n\nif K == 1:\n print(min(abs(X-D),abs(X+D)))\nelif K == 2:\n print(min(abs(X+D+D),abs(X-D-D),abs(X)))\nelif K == 3:\n print(min(abs(X+D+D+D),abs(X+D),abs(X-D),abs(X-D-D-D)))\nelse:\n for i in range(3):\n if abs(X - D) >= abs(X+D):\n List.append(abs(X+D))\n X = X+D\n else:\n List.append(abs(X-D))\n X = X-D\n\n for i in range(K-3):\n if List[i] == List[i+2]:\n if K%2 == i%2:\n print(List[i+1])\n else:\n print(List[i])\n break\n else:\n if abs(X - D) >= abs(X+D):\n List.append(abs(X+D))\n X = X+D\n else:\n List.append(abs(X-D))\n X = X-D\n print(List[K-1])\n ', 'X,K,D = map(int,input().split())\nList = []\n\nif K == 1:\n print(min(abs(X-D),abs(X+D)))\nelif K == 2:\n print(min(abs(X+D+D),abs(X-D-D),abs(X)))\nelif K == 3:\n print(min(abs(X+D+D+D),abs(X+D),abs(X-D),abs(X-D-D-D)))\nelse:\n for i in range(3):\n if abs(X - D) >= abs(X+D):\n List.append(abs(X+D))\n X = X+D\n else:\n List.append(abs(X-D))\n X = X-D\n\n for i in range(K-3):\n if List[i] == List[i+2]:\n if K%2 == i%2:\n print(List[i+1])\n else:\n print(List[i])\n break\n else:\n if abs(X - D) >= abs(X+D):\n List.append(abs(X+D))\n X = X+D\n else:\n List.append(abs(X-D))\n X = X-D\n\n if len(List) == K:\n print(List[K-1])\n else:\n pass', 'S = input()\ncount = 0\n\nif S.count("R") == 0:\n count = 0\nelif S.count("R") == 1:\n count= 1\nelif S.count("R") == 2:\n if S == "RSR":\n count = 1\n else:\n count = 2\nelse:\n count = 3\n \nprint(count)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s034864575', 's582801987', 's943896948', 's307580329'] | [9144.0, 9132.0, 9212.0, 9104.0] | [22.0, 28.0, 27.0, 25.0] | [901, 824, 858, 222] |
p02582 | u364555831 | 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\nrow_now = 0\nrow_max = 0\nfor day in S:\n if day == "S":\n row_now += 1\n else:\n row_now = 0\n if row_now > row_max:\n row_max = row_now\n\nprint(row_max)\n', 'S = input()\n\nrow_now = 0\nrow_max = 0\nfor day in S:\n if day == "R":\n row_now += 1\n else:\n row_now = 0\n if row_now > row_max:\n row_max = row_now\n\nprint(row_max)\n'] | ['Wrong Answer', 'Accepted'] | ['s461723912', 's206491517'] | [8800.0, 8868.0] | [26.0, 30.0] | [189, 189] |
p02582 | u366784601 | 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 = input()\nreturn print(temp.count('R'))\n", "weather = input()\nrainyDay = weather.count('R')\nif rainyDay < 2:\n print(rainyDay)\nelse:\n if weather[1] == 'R':\n print(rainyDay)\n else:\n print(1)\n"] | ['Runtime Error', 'Accepted'] | ['s281611936', 's195392855'] | [9092.0, 9080.0] | [27.0, 31.0] | [45, 168] |
p02582 | u369133448 | 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)\nsa=x//d\nans=x\npbk,mbk=0,0\nbk1,bk2,bk3=1,1,1\nmansbk,pansbk=0,0\nif sa>=k:\n ans=x-d*k\nelse:\n ans=x-d*sa\n k=k-sa\n for i in range(k):\n mansbk=abs(ans-d)\n pansbk=abs(ans+d)\n if mansbk!=pansbk:\n ans=min(mansbk,pansbk)\n if bk3!=1:\n bk1=min(mansbk,pansbk)\n bk2=max(mansbk,pansbk)\n ans=ans if (k-i)%2==0 else bk1\n break\n else:\n bk3=max(mansbk,pansbk) \n else:\n ans=0 if (k-i)%2==0 else d\n break\n pbk=max(mansbk,pansbk)\n mbk=min(mansbk,pansbk)\nprint(ans)', 's=input()\nans=0\nbk=0\nfor i in range(3):\n if s[i]=="R":\n bk+=1\n else:\n if ans<bk:\n ans=bk\n bk=0\nif ans<bk:\n ans=bk\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s104479531', 's806334267'] | [9228.0, 8972.0] | [21.0, 28.0] | [564, 141] |
p02582 | u372119488 | 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().strip().split()))\nL_sort = L.sort()\ncount = 0\nfor i in range(N-2):\n\tfor j in range(i+1 , N):\n\t\tfor k in range(j+1 , N):\n \t\tif L_sort(i) + L_sort(j) > L_sort(k):\n \t\tcount += 1\nprint(count)\n', 'N = int(input())\nL = list(map(int,input().strip().split()))\nL_sort = L.sort()\ncount = 0\nfor i in range(N-2):\n\tfor j in range(i+1 , N):\n\t\tfor k in range(j+1 , N):\n \tif L_sort(i) + L_sort(j) > L_sort(k):\n \tcount += 1\nprint(count)', "input_weather = input()\nif input_weather.count('RRR') == 1:\n\tprint(3)\nelif input_weather.count('RR') == 1:\n print(2)\nelif input_weather.count('R') >= 1:\n print(1)\nelse :\n print(0)\n\n"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s526373273', 's928450914', 's381301303'] | [8780.0, 8900.0, 9000.0] | [24.0, 24.0, 29.0] | [248, 245, 190] |
p02582 | u372802746 | 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)\nif D>=X and K%2==0:\n ans=X\nelif D>=X and K%2==1:\n ans=D-X\nelif D<X and K*D<X:\n ans=X-K*D\nelse:\n ans=X%D\n if (X-ans)%2==0:\n ans=D-ans\nprint(ans)', 'S=input()\nfor i in range(0,3):\n if S[0]=="R" and S[1]=="R" and S[2]=="R":\n x=3\n elif S[0]=="R" and S[1]=="R":\n x=2\n elif S[1]=="R" and S[2]=="R":\n x=2\n elif S[0]=="R" or S[1]=="R" or S[2]=="R":\n x=1\n else:\n x=0\nprint(x)'] | ['Runtime Error', 'Accepted'] | ['s932844081', 's979169139'] | [9172.0, 9120.0] | [29.0, 33.0] | [210, 269] |
p02582 | u377989038 | 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 in "R":\n ans = 1\nif s in "RR":\n ans = 2\nif s in "RRR":\n ans = 3\nprint(ans)\n', 's = input()\nans = 0\nif s in "R":\n ans = 1\nif s in "RR":\n ans = 2\nif s in "RRR":\n ans = 3\nprint(ans)', 's = input()\nans = 0\nif "R" in s:\n ans = 1\nif "RR" in s:\n ans = 2\nif "RRR" in s:\n ans = 3\nprint(ans)'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s575008241', 's839720789', 's155879355'] | [8924.0, 9032.0, 8984.0] | [25.0, 30.0, 32.0] | [102, 108, 108] |
p02582 | u378691508 | 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. | ['print("A.py")', 'S=input()\n\nif "RRR" in S:\n\tprint(3)\nelif "RR" in S:\n\tprint(2)\nelif "R" in S:\n\tprint(1)\nelse: \n\tprint(0)'] | ['Wrong Answer', 'Accepted'] | ['s320047657', 's688498255'] | [9068.0, 8916.0] | [28.0, 28.0] | [13, 103] |
p02582 | u383556004 | 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()\no = 0\nfor i in range(2):\n if a[i] == a[i + 1]:\n o += 1\nprint(o)', "a = input()\no = 0\nif 'R' in a[:]:\n o += 1\nfor i in range(2):\n if a[i] == 'R' and a[i+1] == 'R':\n o += 1\nprint(o)"] | ['Wrong Answer', 'Accepted'] | ['s171921906', 's177275574'] | [9020.0, 9020.0] | [31.0, 35.0] | [79, 117] |
p02582 | u384379887 | 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 time import time\ndef timer(func):\n def f(*args, **kwargs):\n before = time()\n rv = func(*args, **kwargs)\n after = time()\n print('temps écoulé', after - before)\n return rv\n return f\n\n@timer\ndef A(S): \n nb = 0\n if S == 'RSR':\n print(2)\n exit\n else:\n for i in S:\n if i == 'R':\n nb = nb+1\n print(nb)\n\n\n@timer\ndef B():\n ...\n\n@timer\ndef C():\n ...\n\n\nS = input()\nA(S)\n", "from time import time\ndef timer(func):\n def f(*args, **kwargs):\n before = time()\n rv = func(*args, **kwargs)\n after = time()\n print('temps écoulé', after - before)\n return rv\n return f\n\n@timer\ndef A(S): \n nb = 0\n if S == 'RSR':\n print(1)\n exit\n else:\n for i in S:\n if i == 'R':\n nb = nb+1\n print(nb)\n\n\n@timer\ndef B():\n ...\n\n@timer\ndef C():\n ...\n\n\nS = input()\nA(S)\n", "from time import time\ndef timer(func):\n def f(*args, **kwargs):\n before = time()\n rv = func(*args, **kwargs)\n after = time()\n print('temps écoulé', after - before)\n return rv\n return f\n\n\ndef A(S): \n nb = 0\n if S == 'RSR':\n print(1)\n exit\n else:\n for i in S:\n if i == 'R':\n nb = nb+1\n print(nb)\n\n\n@timer\ndef B():\n ...\n\n@timer\ndef C():\n ...\n\n\nS = input()\nA(S)\n"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s060503349', 's952920768', 's761437612'] | [8996.0, 9140.0, 9128.0] | [31.0, 29.0, 30.0] | [476, 476, 470] |
p02582 | u389530753 | 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. | ['w=str(input())\nif w==RRR:\n print(3)\nelif w==SRR:\n print(2)\nelif w==RRS:\n print(2)\nelif w==RSR:\n print(1)\nelif w==RSS:\n print(1)\nelif w==SRS:\n print(1)\nelif w==SSR:\n print(1)\nelse :\n print(0)', 'w=input()\nif w=="RRR":\n print(3)\nelif w=="SRR":\n print(2)\nelif w=="RRS":\n print(2)\nelif w=="RSR":\n print(1)\nelif w=="RSS":\n print(1)\nelif w=="SRS":\n print(1)\nelif w=="SSR":\n print(1)\nelse :\n print(0)'] | ['Runtime Error', 'Accepted'] | ['s861318311', 's766694778'] | [9096.0, 8876.0] | [26.0, 32.0] | [214, 223] |
p02582 | u393431864 | 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. | ["ws = input()\n\nrev = 0\nfor ch in ws:\n if ch == 'R':\n rev += 1\n else:\n rev = 0\n\nreturn rev", "ws = input()\n\nrev = 0\nfor ch in ws:\n if ch == 'R':\n rev += 1\n else:\n rev = 0\n\nprint(rev)", "ws = input()\n\nif ws.count('S') == 3:\n print(0)\nelif ws.count('S') == 2:\n print(1)\nelif ws.count('S') == 1:\n if ws.index('S') == 1:\n print(1)\n else:\n print(2)\nelse:\n print(3)\n"] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s745832538', 's859436746', 's905691775'] | [9084.0, 9020.0, 9096.0] | [24.0, 31.0, 33.0] | [108, 108, 203] |
p02582 | u393740911 | 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(i for i in range(4)if S.index("R"*i)))', 'S = input()\n\nif S == "SSS":\n cnt = 0\nelif S == "RRR":\n cnt = 3\nelif "RR" in S:\n cnt = 2\nelse:\n cnt = 1\n \nprint(cnt)'] | ['Runtime Error', 'Accepted'] | ['s433645371', 's168808714'] | [8956.0, 9028.0] | [22.0, 32.0] | [58, 130] |
p02582 | u395672550 | 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. | ["weat= input()\nseaS = 'S'\nseaR = 'R'\na = 0\nb = 0\nc = 0\nimput = 0\nfor alp in wea:\n if a == 0:\n if alp == seaS:\n a = 1\n if alp == seaR:\n a = 2\n if b == 0 and a != 0:\n if alp == seaS:\n b = 1\n if alp == seaR:\n b = 2\n if c == 0 and a != 0 and b != 0:\n if alp == seaS:\n c = 1\n if alp == seaR:\n c = 2\nif a or b or c == 2:\n imput = 1\nif a and b == 2 or b and c == 2:\n imput = 2\nif a and b and c == 3:\n imput = 3\n\nprint(imput)\n", "weat= input()\nseaS = 'S'\nseaR = 'R'\na = 0\nb = 0\nc = 0\nimput = 0\nfor alp in weat:\n if a == 0:\n if alp == seaS:\n a = 1\n if alp == seaR:\n a = 2\n if b == 0 and a != 0:\n if alp == seaS:\n b = 1\n if alp == seaR:\n b = 2\n if c == 0 and a != 0 and b != 0:\n if alp == seaS:\n c = 1\n if alp == seaR:\n c = 2\nif a or b or c == 2:\n imput = 1\nif a and b == 2 or b and c == 2:\n imput = 2\nif a and b and c == 2:\n imput = 3\n\nprint(imput)\n", "weat= input()\nseaS = 'S'\nseaR = 'R'\na = 0\nb = 0\nc = 0\nimput = 0\nfor alp in weat:\n if a == 0:\n if alp == seaS:\n a = 1\n if alp == seaR:\n a = 2\n if b == 0 and a != 0:\n if alp == seaS:\n b = 1\n if alp == seaR:\n b = 2\n if c == 0 and a != 0 and b != 0:\n if alp == seaS:\n c = 1\n if alp == seaR:\n c = 2\nif a == 2 or b == 2 or c == 2:\n imput = 1\nif a == 2 and b == 2 or b == 2 and c == 2:\n imput = 2\nif a == 2 and b == 2 and c == 2:\n imput = 3\n\nprint(imput)", "weat= input()\nimput = 0\nif weat == 'SSS':\n imput = 0\nif weat == 'SSR' or weat == 'RSS' or weat == 'SRS' or weat == 'RSR':\n imput = 1\nif weat == 'SRR' or weat == 'RRS':\n imput = 2\nif weat == 'RRR':\n imput = 3\n\nprint(imput)"] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s115445881', 's486860944', 's707562297', 's353348532'] | [9056.0, 9028.0, 9048.0, 9064.0] | [25.0, 27.0, 27.0, 26.0] | [471, 472, 501, 225] |
p02582 | u401481862 | 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 if (K % 2 == 0):\n a = 0\n else:\n a = D\nelse:\n if X < 0:\n X = -X\n s = int(X/D)\n if K <= s:\n a = X - K * D\n else:\n if (K - s) % 2 == 1:\n a = abs(X - (s + 1) * D)\n else:\n a = abs(X - s * D)\nprint(a)', 'N = int(input())\nL = list(map(int, input().split()))\na = 0\nif N > 2:\n for 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] or L[i] == L[k] or L[j] == L[k]:\n continue\n if L[i] + L[j] > L[k] and L[i] + L[k] > L[j] and L[j] + L[k] > L[i]:\n a = a + 1\nprint(a)', "S = str(input())\na = 0\nw = 0\nfor i in range(len(S)):\n if S[i] == 'R':\n w = w + 1\n else:\n if (w > a):\n a = w\n w = 0\nif (w > a):\n a = w\nprint(a)"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s770595151', 's952217291', 's262011689'] | [9000.0, 9196.0, 9032.0] | [21.0, 32.0, 32.0] | [276, 377, 179] |
p02582 | u402339511 | 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\tprint(0)\nelse if S == SSR\n\tprint(1)\nelse if S == SRR\n\tprint(2)\nelse if S == SRS\n\tprint(1)\nelse if S == RSS\n\tprint(1)\nelse if S == RRS\n\tprint(2)\nelse if S == RRR\n\tprint(3)\nelse if S == RRS\n\tprint(2)", "S = input('天気が雨である日が連続していた最大の日数を出力せよ。')\n[n1,n2,n3] = S.split() \nif n1 == S\n\tif n2 == S\n \t\tif n3 == S\n \t\tprint(3)\n \telse \n \tprint(2)\n\telse \n \tif n3 == S\n \t\tprint(1)\n else\n \tprint(2)\nelse\n\tif n2 == S\n \t\tif n2 == S\n \t\tprint(2)\n \telse\n \tprint(1)\n\telse\n \tif n2 == S\n \t\tprint(2)\n else\n \tprint(3)\n", "S = input('天気が雨である日が連続していた最大の日数を出力せよ。')\nN = True\nwhile N == False:\nif S == 'SSS':\n\tprint(0)\nelif S == 'SSR':\n\tprint(1)\nelif S == 'SRR':\n\tprint(2)\nelif S == 'SRS':\n\tprint(1)\nelif S == 'RSS':\n\tprint(1)\nelif S == 'RRS':\n\tprint(2)\nelif S == 'RRR':\n\tprint(3)\nelif S == 'RSR':\n\tprint(1)\nelse:\n\tN = False\n ", "S = input('天気が雨である日が連続していた最大の日数を出力せよ。')\nif S == 'SSS':\n\tprint(0)\nelse if S == 'SSR':\n\tprint(1)\nelse if S == 'SRR':\n\tprint(2)\nelse if S == 'SRS':\n\tprint(1)\nelse if S == 'RSS':\n\tprint(1)\nelse if S == 'RRS':\n\tprint(2)\nelse if S == 'RRR':\n\tprint(3)\nelse if S == 'RSR':\n\tprint(1)", 's = input(\'天気が雨である日が連続していた最大の日数を出力せよ。\')\n \nif s == "SSS":\n print(0)\nelif s == "RRR":\n print(3)\nelif s == "RRS":\n print(2)\nelif s == "SRR":\n print(2)\nelse:\n print(1)', "S = input('天気が雨である日が連続していた最大の日数を出力せよ。')\nif S == 'SSS'\n\tprint(0)\nelse if S == 'SSR'\n\tprint(1)\nelse if S == 'SRR'\n\tprint(2)\nelse if S == 'SRS'\n\tprint(1)\nelse if S == 'RSS'\n\tprint(1)\nelse if S == 'RRS'\n\tprint(2)\nelse if S == 'RRR'\n\tprint(3)\nelse if S == 'RRS'\n\tprint(2)\n", "S = input('天気が雨である日が連続していた最大の日数を出力せよ。')\nN = True\nwhile N == False:\nif S == 'SSS':\n\tprint(0)\nelse if S == 'SSR':\n\tprint(1)\nelse if S == 'SRR':\n\tprint(2)\nelse if S == 'SRS':\n\tprint(1)\nelse if S == 'RSS':\n\tprint(1)\nelse if S == 'RRS':\n\tprint(2)\nelse if S == 'RRR':\n\tprint(3)\nelse if S == 'RSR':\n\tprint(1)\nelse:\n\tN = False\n ", "S = input('天気が雨である日が連続していた最大の日数を出力せよ。')\nN = True\nwhile N == True:\nN = False\nif S == 'SSS':\n\tprint(0)\nelif S == 'SSR':\n\tprint(1)\nelif S == 'SRR':\n\tprint(2)\nelif S == 'SRS':\n\tprint(1)\nelif S == 'RSS':\n\tprint(1)\nelif S == 'RRS':\n\tprint(2)\nelif S == 'RRR':\n\tprint(3)\nelif S == 'RSR':\n\tprint(1)\nelse:\n\tN = True", "S = input('天気が雨である日が連続していた最大の日数を出力せよ。')\nif S == 'SSS':\n\tprint(0)\nelif S == 'SSR':\n\tprint(1)\nelif S == 'SRR':\n\tprint(2)\nelif S == 'SRS':\n\tprint(1)\nelif S == 'RSS':\n\tprint(1)\nelif S == 'RRS':\n\tprint(2)\nelif S == 'RRR':\n\tprint(3)\nelif S == 'RRS':\n\tprint(2)", "S = input()\nif S == 'RRS':\n print(2)\nelif S == 'SSS'\n print(0)\nelif S = 'SRR'\n\tprint(2)\nelif S = 'RRR'\n print(1)\n \n", "S = input('天気が雨である日が連続していた最大の日数を出力せよ。')\nif S == 'SSS':\n\tprint(0)\nelse if S == 'SSR':\n\tprint(1)\nelse if S == 'SRR':\n\tprint(2)\nelse if S == 'SRS':\n\tprint(1)\nelse if S == 'RSS':\n\tprint(1)\nelse if S == 'RRS':\n\tprint(2)\nelse if S == 'RRR':\n\tprint(3)\nelse if S == 'RRS':\n\tprint(2)", "S = input()\nif S == 'SSS':\n print(0)\nelif S == 'SSR':\n print(1)\nelif S == 'SRR':\n print(2)\nelse if S == 'SRS':\n print(1)\nelse if S == 'RSS':\n print(1)\nelse if S == 'RRS':\n print(2)\nelse if S == 'RRR':\n print(3)\nelse if S == 'RSR':\n print(1)\n\n \n", "S = input()\nif S == 'SSS':\n print(0)\nelif S == 'SSR':\n print(1)\nelif S == 'SRR':\n print(2)\nelif S == 'SRS':\n print(1)\nelif S == 'RSS':\n print(1)\nelif S == 'RRS':\n print(2)\nelif S == 'RRR':\n print(3)\nelif S == 'RSR':\n print(1)\n"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s139301924', 's173068079', 's251082164', 's263973175', 's375171130', 's522604177', 's559302231', 's566623097', 's754361097', 's793076482', 's795742650', 's799625237', 's556348475'] | [8924.0, 8900.0, 8900.0, 8940.0, 8924.0, 9000.0, 8984.0, 8948.0, 8996.0, 8972.0, 8940.0, 8888.0, 8996.0] | [28.0, 26.0, 24.0, 28.0, 30.0, 25.0, 27.0, 29.0, 26.0, 31.0, 26.0, 30.0, 32.0] | [302, 422, 351, 326, 230, 319, 373, 357, 305, 124, 326, 253, 234] |
p02582 | u405534002 | 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 s == "RRR":\n print(3)\nelif s == "RRS" or s == "SRR":\n print(2)\nelif s == "RSR" or s == "RSS" or s == "SSR" or s == "SRS":\n print(1)\nelse:\n print(0)', 's = str(input())\nif s == "RRR":\n print(3)\nelif s == "RRS" or s == "SRR":\n print(2)\nelif s == "RSR" or s == "RSS" or s == "SSR" or s == "SRS":\n print(1)\nelse:\n print(0)'] | ['Runtime Error', 'Accepted'] | ['s053742397', 's518384714'] | [9028.0, 8972.0] | [22.0, 32.0] | [154, 171] |
p02582 | u406138190 | 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\nfor i in s:\n if(i=='R'):\n ans+=1\n else:\n ans=0\nprint(ans)", "s=input()\nans=0\nretur=[]\nfor i in s:\n if(i=='R'):\n ans+=1\n else:\n ans=0\n retur.append(ans)\nprint(max(retur))"] | ['Wrong Answer', 'Accepted'] | ['s113747699', 's228619795'] | [9100.0, 8960.0] | [27.0, 28.0] | [93, 131] |
p02582 | u408677243 | 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 "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()\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'] | ['s989674274', 's278527628'] | [9092.0, 9024.0] | [28.0, 31.0] | [121, 121] |
p02582 | u413165887 | 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[:2] == 'RR' or s[1:] == 'RR':\n print(2)\nelif s.count('R') >= 1:\n print(1)\nelse:\n print(0)", "s = input()\nif s=='RRS' or s=='SRR':\n print(2)\nelif s=='RRR':\n print(3)\nelif s=='SSS':\n print(0)\nelse:\n print(1)"] | ['Runtime Error', 'Accepted'] | ['s343999111', 's454688334'] | [8952.0, 8880.0] | [25.0, 28.0] | [146, 124] |
p02582 | u413278979 | 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().split())\nX = abs(X)\n\nstraight = min(K, X // D)\nK -= straight\nX -= straight * D\n\nif K % 2 == 0:\n print(X)\nelse:\n print(D-X)', 'S = input()\ns_num = len(S)\n\ni=0\nmax_count = 0\ncount = 0\n\nwhile i < s_num:\n if S[i] != "R":\n if max_count < count:\n max_count = count\n count = 0\n elif S[i] == "R":\n count += 1\n\n i+=1\n\nif max_count < count:\n max_count = count\n\nprint(max_count)'] | ['Runtime Error', 'Accepted'] | ['s239469736', 's469851246'] | [9116.0, 9120.0] | [22.0, 26.0] | [163, 289] |
p02582 | u415581265 | 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\ncounts = []\ncount = 1\nif s.find('R') == -1:\n count = 0\nelse:\n for a, b in zip(s, s[1:]):\n if a == b and a == 'R':\n count += 1\n else:\n counts.append((a, count))\n count = 1\n\nprint(str(count))\n", "s = input()\n\ncounts = []\ncount = 1\nif s.find('R') == -1:\n count = 0\nelse:\n for a, b in zip(s, s[1:]):\n if a == b and a == 'R':\n count += 1\n else:\n counts.append((a, count))\n\nprint(str(count))\n"] | ['Wrong Answer', 'Accepted'] | ['s060297591', 's401693395'] | [9080.0, 9100.0] | [34.0, 32.0] | [256, 234] |
p02582 | u419978514 | 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()\nflag=False\nans=0\nhold=0\nfor i in range(3):\n if a[i]=='R' and not flag:\n ans=1\n flag=not flag\n hold=max(hold,ans)\n\n elif a[i]=='R' and flag:\n ans+=1\n hold=max(hold,ans)\n\n else:\n ans=0\n flag=False\n\n\nreturn(hold)\n", "s=input()\nans=0\nflag=False\nfor i in a:\n if i=='R' and not flag:\n ans=1\n hold=ans\n \n if i=='R' and flag:\n ans+=1\n hold=ans\n \n else:\n ans=0\n flag=False\n \n return hold\n ", "a=input()\nflag=False\nans=0\nhold=0\nfor i in range(3):\n if a[i]=='R' and not flag:\n ans=1\n flag=not flag\n hold=max(hold,ans)\n\n elif a[i]=='R' and flag:\n ans+=1\n hold=max(hold,ans)\n\n else:\n ans=0\n flag=False\n\n\nprint(hold)\n\n"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s002002110', 's991612324', 's730325525'] | [8980.0, 9096.0, 9116.0] | [27.0, 25.0, 30.0] | [278, 200, 278] |
p02582 | u425950110 | 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. | ['max = 0\nfor letter in S:\n if letter == "R":\n max += 1\n if letter == "S":\n break \nprint(max)', 'S = input()\n\nl = len(S)\ncount = 0\n\nfor i in range(l):\n if "R" not in S:\n break\n cur_count = 1\n\n for j in range(i+1,l):\n if S[i] == "S":\n break\n if (S[i] != S[j]):\n break\n cur_count += 1\n if cur_count > count:\n count = cur_count\n\nprint(count)'] | ['Runtime Error', 'Accepted'] | ['s026989036', 's883466751'] | [9012.0, 9112.0] | [28.0, 31.0] | [111, 310] |
p02582 | u428199834 | 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 d>=x:\n print(x)\n exit()\nelse:\n if x//d>=k:\n print(x-k*d)\n exit()\n else:\n if (x//d)%2==k%2:\n print(x%d)\n exit()\n else:\n print(d-x%d)\n exit()', "s=input()\nc=0\nfor i in range(3):\n if s[i]=='R':\n c+=1\nif s=='RSR' :\n print(1)\nelse:\n print(c)"] | ['Runtime Error', 'Accepted'] | ['s324471022', 's925282719'] | [9176.0, 8960.0] | [22.0, 28.0] | [209, 99] |
p02582 | u428341537 | 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())\n\nif S.count('R')==0:\n print(0)\nif S.count('R')==1:\n print(1)\nif S.count('R')==2 and not moji.count('RR') ==1:\n print(1)\nif S.count('RR')==1:\n print(2)\nif S.count('RRR')==1:\n print(3)\n ", "S=input()\n\nif S.count('R')==0\n print(0)\nif S.count('R')==1\n print(1)\nif S.count('R')==2 and moji.count('RR')!=1\n print(1)\nif S.count('RR')==1\n print(2)\nif S.count('RRR')==1\n print(3)\n ", "moji=input()\n\nif moji.count('R')==0\n print(0)\nif moji.count('R')==1\n print(1)\nif moji.count('R')==2 and moji.count('RR')!=1\n print(1)\nif moji.count('RR')==1\n print(2)\nif moji.count('RRR')==1\n print(3)\n ", "S=input()\n\nif S.count('R')==0\n print(0)\nif S.count('R')==1\n print(1)\nif S.count('R')==2 and not moji.count('RR') ==1\n print(1)\nif S.count('RR')==1\n print(2)\nif S.count('RRR')==1\n print(3)\n ", "S=str(input())\n\nif S.count('R')==0\n print(0)\nif S.count('R')==1\n print(1)\nif S.count('R')==2 and moji.count('RR')!=1\n print(1)\nif S.count('RR')==1\n print(2)\nif S.count('RRR')==1\n print(3)\n ", "S=str(input())\n\nif S.count('R')==0\n print(0)\nif S.count('R')==1\n print(1)\nif S.count('R')==2 and not moji.count('RR') ==1\n print(1)\nif S.count('RR')==1\n print(2)\nif S.count('RRR')==1\n print(3)\n ", "S=str(input())\n \nif S.count('R')==0:\n print(0)\nif S.count('R')==1 :\n print(1)\nif S.count('R')==2 and not S.count('RR') ==1:\n print(1)\nif S.count('RR')==1 and not S.count('RRR')==1:\n print(2)\nif S.count('RRR')==1:\n print(3)"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s051255165', 's176933842', 's288057687', 's355211306', 's742490740', 's863177710', 's403236354'] | [9116.0, 8912.0, 8952.0, 8920.0, 8916.0, 8920.0, 8980.0] | [28.0, 26.0, 24.0, 28.0, 26.0, 25.0, 26.0] | [205, 190, 208, 195, 195, 200, 227] |
p02582 | u432453907 | 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 not in "R":\n ans=0\nelse:\n if s[1]=="S":\n ans=1\n elif s[0]=="R" and s[2]=="R":\n ans=3\n else:\n ans=2\n\nprint(ans)', 's=str(input())\nans=0\nif s[0]=="R":\n ans=1\n if s[1]=="R":\n ans=2\n if s[2]=="R":\n ans=3\nelse:\n if s[1]=="R":\n ans=1\n if s[2]=="R":\n ans=2\n else:\n if s[2]=="R":\n ans=1\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s311245945', 's738677690'] | [9040.0, 9120.0] | [27.0, 28.0] | [169, 255] |
p02582 | u433697974 | 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 a = 0\nif S = 'SSR':\n a = 1\nif S = 'SRS':\n a = 1\nif S = 'SRR':\n a = 2\nif S = 'RSS':\n a = 1\nif S = 'RSR':\n a = 1\nif S = 'RRS':\n a = 2\nif S = 'RRR':\n a = 3\nprint(a)\n ", "S = input()\nif S == 'SSS':\n a = 0\nif S == 'SSR':\n a = 1\nif S == 'SRS':\n a = 1\nif S == 'SRR':\n a = 2\nif S == 'RSS':\n a = 1\nif S == 'RSR':\n a = 1\nif S == 'RRS':\n a = 2\nif S == 'RRR':\n a = 3\nprint(a)"] | ['Runtime Error', 'Accepted'] | ['s411991521', 's986242547'] | [8940.0, 9108.0] | [25.0, 28.0] | [199, 204] |
p02582 | u440613652 | 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()\narr=s.split("S")\nans=0\nfor i in arr:\n ans=max(ans,len(i))', 's=input().strip()\narr=s.split("S")\nprint(max(arr))', 's=I().strip()\n\tarr=s.split("S")\n\tans=0\n\tfor i in arr:\n\t\tans=max(ans,len(i))\n\tprint(ans)', 's=I().strip()\narr=s.split("S")\nans=0\nfor i in arr:\n ans=max(ans,len(i))\nprint(ans)', 'import sys,math\nfrom collections import deque,defaultdict\nimport operator as op\nfrom functools import reduce\nsys.setrecursionlimit(10**6) \n\nI=sys.stdin.readline\n\n \n\n#\ndef ii():\n\treturn int(I().strip())\ndef li():\n\treturn list(map(int,I().strip().split()))\ndef mi():\n\treturn map(int,I().strip().split())\n\ndef ncr(n, r):\n r = min(r, n-r)\n numer = reduce(op.mul, range(n, n-r, -1), 1)\n denom = reduce(op.mul, range(1, r+1), 1)\n return numer // denom\n\ndef gcd(x, y):\n while y:\n x, y = y, x % y\n return x\n\n\n\n\n\n\t\n\ndef main():\n\ts=I().strip()\n\tarr=s.split("S")\n\tans=0\n\tfor i in arr:\n\t\tans=max(ans,len(i))\n\tprint(ans)\n\n\t\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n\n\n\n\n\n\n\t\t\n\n\n\n\n\n\n\n\t\t\n\t\t\n\t\n\t\t\n\n\t\n\n\n\n\n\n\n\n\t\t\n\n\n\n\n\n\n\n\n\nif __name__ == \'__main__\':\n\tmain()'] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s114055220', 's175209130', 's285343733', 's852701097', 's024012481'] | [9088.0, 9016.0, 8932.0, 9020.0, 9440.0] | [35.0, 30.0, 26.0, 28.0, 27.0] | [76, 50, 87, 85, 769] |
p02582 | u441902623 | 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().split())\n\nif s[0] == S:\n if s[1] == S:\n if s[2] == S:\n print("0")\n else:\n print("1")\n if s[1] == R:\n if s[2] == S:\n print("1")\n else:\n print("2")\nif s[0] == R:\n if s[1] == S:\n if s[2] == S:\n print("1")\n else:\n print("1")\n if s[1] == R:\n if s[2] == S:\n print("2")\n else:\n print("3")', 's = list(input().split())\n\nif s[0] == "S":\n if s[1] == "S":\n if s[2] == "S":\n print("0")\n else:\n print("1")\n if s[1] == "R":\n if s[2] == "S":\n print("1")\n else:\n print("2")\nif s[0] == "R":\n if s[1] == "S":\n if s[2] == "S":\n print("1")\n else:\n print("1")\n if s[1] == "R":\n if s[2] == "S":\n print("2")\n else:\n print("3")\n', 's = input()\n\nif s[0] == "S":\n if s[1] == "S":\n if s[2] == "S":\n print("0")\n else:\n print("1")\n if s[1] == "R":\n if s[2] == "S":\n print("1")\n else:\n print("2")\nif s[0] == "R":\n if s[1] == "S":\n if s[2] == "S":\n print("1")\n else:\n print("1")\n if s[1] == "R":\n if s[2] == "S":\n print("2")\n else:\n print("3")'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s395901890', 's827599961', 's379696560'] | [9136.0, 9068.0, 8968.0] | [24.0, 26.0, 25.0] | [366, 387, 372] |
p02582 | u442599356 | 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. | ["var = 'RRR'\n\ndef func(input):\n return input.count('R')\n\noutput = func(var)\nprint(output)\n", "def a(line):\n\tcnt = 0\n\tfor i in range(len(line)):\n\t\tif cnt < 1 and line[i] == 'R':\n\t\t\tcnt += 1\n\t\t\tcontinue\n\t\tif cnt >= 1 and line[i] == line[i-1] and line[i] == 'R':\n\t\t\tcnt += 1\n\t\t\tcontinue\n\treturn cnt\n \na(input())", "def b(line):\n\tcnt = 0\n\tfor i in range(len(line)):\n\t\tif cnt < 1 and line[i] == 'R':\n\t\t\tcnt += 1\n\t\t\tcontinue\n\t\tif cnt >= 1 and line[i] == line[i-1] and line[i] == 'R':\n\t\t\tcnt += 1\n\t\t\tcontinue\n\treturn cnt\n\nprint(b(input()))"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s736706188', 's773779730', 's863505666'] | [9004.0, 9112.0, 9052.0] | [36.0, 35.0, 35.0] | [90, 215, 220] |
p02582 | u450028885 | 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()\nsunny_count = 0\n\nfor i in range(3):\n if weather[i] == "S":\n sunny_count += 1\n else:\n continue\n \nprint(sunny_count) ', 'n, k = map(int, input().split())\np_list = list(map(int, input().split()))\nc_list = list(map(int, input().split()))\npc_list = []\nmax_score = -10**9\n\nfor m in range(n):\n score = 0\n num = p_list[m] - 1\n for l in range(k):\n score += c_list[num]\n num = p_list[num] - 1\n \n if score > max_score:\n max_score = score\n \nprint(max_score)', 's = [x for x in input()]\ncount = 0\nmax_count = 0\n\nfor i in s:\n if i == "R":\n count += 1\n if max_count < count:\n max_count = count\n else:\n count = 0\n \nprint(max_count)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s329255823', 's577500520', 's705310221'] | [9024.0, 9140.0, 9012.0] | [29.0, 25.0, 26.0] | [146, 374, 211] |
p02582 | u453630968 | 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()\ncount = day.count("R")\nif count == 2:\n if count1 = day.count("RR"):\n\t print(2)\n\telse:\n \tprint(1)\nif count == 1:\n print(1)\nif count == 0:\n print(0)', '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")'] | ['Runtime Error', 'Accepted'] | ['s378464560', 's137034146'] | [8908.0, 8968.0] | [31.0, 29.0] | [175, 124] |
Subsets and Splits