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 |
|---|---|---|---|---|---|---|---|---|---|---|
p02577 | u909224749 | 2,000 | 1,048,576 | An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9. Determine whether N is a multiple of 9. | ["N = str(input())\n\na = []\nfor n in range(N):\n a.append(int(N[n]))\n \nif sum(a) % 9 == 0:\n print('Yes')\nelse:\n print('No')", "N = str(input())\n \na = []\nfor n in range(len(N)):\n a.append(int(N[n]))\n \nif sum(a) % 9 == 0:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s399629968', 's283624786'] | [9152.0, 10684.0] | [25.0, 78.0] | [123, 129] |
p02577 | u913565745 | 2,000 | 1,048,576 | An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9. Determine whether N is a multiple of 9. | ["from sys import stdin\n\n\ntest = list(stdin.readline().lstrip().rstrip())\n\ntotal=0\n\nfor i in test:\n total += total + int(i)\n\n\nif total%9 == 0:\n print('Yes')\nelse:\n print('No')\n", "from sys import stdin\n\n\n\ntest = list(stdin.readline().rstrip())\n \nresult=0\n \nfor i in test:\n result = resu... | ['Wrong Answer', 'Accepted'] | ['s234046194', 's046594989'] | [10308.0, 10508.0] | [945.0, 69.0] | [183, 178] |
p02577 | u914883924 | 2,000 | 1,048,576 | An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9. Determine whether N is a multiple of 9. | ["N=int(input())\nif N//9==0:\n print('Yes')\nelse:\n print('No')", "N=int(input())\nif N%9==0:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s117371580', 's078080692'] | [9168.0, 9292.0] | [215.0, 218.0] | [61, 60] |
p02577 | u917678406 | 2,000 | 1,048,576 | An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9. Determine whether N is a multiple of 9. | ['def digitSum(n):\n s = str(n)\n array = list(map(int, s))\n return sum(array)\n\nN = int(input())\nif digitSum(N) // 9 == 0:\n print("Yes")\nelse:\n print("No")', 'N = int(input())\nif N // 9 == 0:\n print("Yes")\nelse:\n print("No")', 'N = int(input())\nif N % 9 == 0:\n print("Yes")\nelse:\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s970874505', 's973135387', 's427864318'] | [11188.0, 9232.0, 9300.0] | [705.0, 206.0, 205.0] | [166, 71, 70] |
p02577 | u917972976 | 2,000 | 1,048,576 | An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9. Determine whether N is a multiple of 9. | ['a = int(input())\nprint "Yes" if a % 9 == 0 else "No"', 'a=int(input())\nprint("Yes"if a%9==0else"No")'] | ['Runtime Error', 'Accepted'] | ['s076491763', 's606808029'] | [8904.0, 9188.0] | [27.0, 209.0] | [52, 44] |
p02577 | u920391637 | 2,000 | 1,048,576 | An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9. Determine whether N is a multiple of 9. | ["N = input()\n\nans = sum(map(int, N))\n\nif ans % 9 == 0:\n print('YES')\nelse:\n print('NO')\n", 'N = input()\n \nans = sum(map(int, N))\n \nif ans % 9 == 0:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s788955125', 's402192209'] | [9184.0, 9240.0] | [45.0, 48.0] | [89, 94] |
p02577 | u924241064 | 2,000 | 1,048,576 | An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9. Determine whether N is a multiple of 9. | ["N = str(input())\nlists = [int(x) for x in N]\n\nif a % 9 == 0:\n print('Yes')\nelse:\n print('No')", "N = str(input())\nlists = [int(x) for x in N]\na = sum(lists)\n\nif a % 9 == 0:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s839604983', 's248249521'] | [10916.0, 10832.0] | [58.0, 61.0] | [107, 123] |
p02577 | u927506431 | 2,000 | 1,048,576 | An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9. Determine whether N is a multiple of 9. | ['N = line(input().rstrip())\nsum = 0\n\nfor i in range(len(N)):\n sum += int(N[i])\n \nif sum % 9 == 0:\n print("Yes")\nelse:\n print("No")', 'N = list(input().rstrip())\nsum = 0\n \nfor i in range(len(N)):\n sum += int(N[i])\n \nif sum % 9 == 0:\n print("Yes")\nelse:\n print("No")'] | ['Runtime Error', 'Accepted'] | ['s045632717', 's198106706'] | [9008.0, 10524.0] | [31.0, 84.0] | [132, 133] |
p02577 | u940652437 | 2,000 | 1,048,576 | An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9. Determine whether N is a multiple of 9. | ['N=int(input())\nc = 0\nif(N % 2 == 1):\n if( N % 9 == 0 ):\n num_list = list(str(N))\n s = len(num_list)\n for i in range(s):\n a = num_list[i]\n c += int(a) \n if(c % 9 == 0):\n print("Yes")\n else:\n print("No")\n \n else:\n ... | ['Wrong Answer', 'Accepted'] | ['s695166464', 's018688816'] | [10732.0, 10872.0] | [782.0, 741.0] | [370, 247] |
p02577 | u942280986 | 2,000 | 1,048,576 | An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9. Determine whether N is a multiple of 9. | ["N=list(input())\nN_2=list(map(int,N))\nprint(N_2)\n\nprint('YNeos'[sum(N_2)%9!=0::2])", "N=list(input())\nN_2=list(map(int,N))\nprint('YNeos'[sum(N_2)%9!=0::2])"] | ['Wrong Answer', 'Accepted'] | ['s361452702', 's733047361'] | [13268.0, 11980.0] | [62.0, 57.0] | [81, 69] |
p02577 | u945199633 | 2,000 | 1,048,576 | An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9. Determine whether N is a multiple of 9. | ["N = list(input())\n\nsum_N = 0\nfor i in range(len(N)):\n sum_N += int(N[i])\n\nif sum_N%9 == 0:\n print('yes')\nelse:\n print('no')", "N = list(input())\n\nsum_N = 0\nfor i in range(len(N)):\n sum_N += int(N[i])\n\nif sum_N%9 == 0:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s047180045', 's018339153'] | [10492.0, 10560.0] | [83.0, 79.0] | [132, 132] |
p02577 | u945342410 | 2,000 | 1,048,576 | An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9. Determine whether N is a multiple of 9. | ['strList = list(input())\nintList = [int(s) for s in strList]\nif sum(intList)%9 == 0:\n print(Yes)\nelse:\n print(No)', 'strList = input()\nintList = [int(s) for s in strList]\nif sum(intList)%9 == 0:\n print(Yes)\nelse:\n print(No)\n', 'strList = input()\nintList = [int(s) for s in strList]\nsum = sum(intList)\n... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s097779338', 's188252454', 's816059929', 's493335289'] | [12284.0, 10836.0, 10884.0, 12036.0] | [61.0, 55.0, 52.0, 59.0] | [114, 109, 118, 118] |
p02577 | u952968889 | 2,000 | 1,048,576 | An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9. Determine whether N is a multiple of 9. | ["n = list(map(int, input()))\nif stm(n)%9==0:\n print('Yes')\nelse:\n print('No')", 'n = list(map(int, input()))\nif stm(n)%9==0:\n print("Yes")\nelse:\n print("No")\n', "n = list(map(int, input()))\nif sum(n)%9==0:\n print('Yes')\nelse:\n print('No')\n"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s606939434', 's710672991', 's560700053'] | [10716.0, 10528.0, 10476.0] | [49.0, 45.0, 53.0] | [78, 79, 79] |
p02577 | u955653863 | 2,000 | 1,048,576 | An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9. Determine whether N is a multiple of 9. | ['N = int(input())\n\ndef if_test(N):\n if N&9 == 0:\n \tprint("Yes")\n else:\n print("No")', 'N = int(input())\n\ndef if_test(N):\n if N&9 == 0:\n \tprint(Yes)\n else:\n print(No)', 's = int(input())\n\nif s % 9 == 0:\n \tprint("Yes")\nelse:\n \tprint("No")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s041401978', 's812565865', 's290122601'] | [9072.0, 9100.0, 9296.0] | [218.0, 217.0, 220.0] | [88, 84, 67] |
p02577 | u956318161 | 2,000 | 1,048,576 | An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9. Determine whether N is a multiple of 9. | ['N=int(input())\nLs = list(map(int,input().split()))\nscore=0\nfor i in range(0,N-2):\n a = Ls[i]\n for j in range(i+1, N-1):\n b = Ls[j]\n for k in range(j+1, N):\n c = Ls[k]\n if ((a+b>c)&(a+c>b)&(b+c>a)&(a!=b)&(a!=c)&(b!=c)):\n score+=1\n L_list=[i,j,k]\n print(L... | ['Runtime Error', 'Accepted'] | ['s154856593', 's923710875'] | [9296.0, 9216.0] | [201.0, 72.0] | [325, 115] |
p02577 | u957149382 | 2,000 | 1,048,576 | An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9. Determine whether N is a multiple of 9. | ['n=input()\n\n\nn=str(n)\nSum=0\nfor i in range(len(n)):\n Sum=Sum+int(n[i])\n\nif Sum%9==0:\n print("yes")\nelse:\n print("no")\n \n\n ', 'n=input()\n\n\nn=str(n)\nSum=0\nfor i in range(len(n)):\n Sum=Sum+n[i]-"0"\n\nif Sum%9==0:\n print("yes")\nelse:\n print("no")\n \n\n ', 'n=i... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s415694870', 's734585332', 's105408561'] | [9280.0, 9244.0, 9140.0] | [74.0, 29.0, 79.0] | [140, 139, 140] |
p02577 | u959682820 | 2,000 | 1,048,576 | An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9. Determine whether N is a multiple of 9. | ['if int(input()) % 9 == 0 : print("Yes")\nelse print("No")', 'if int(input()) % 9 == 0 : print("Yes")\nelse : print("No")\n'] | ['Runtime Error', 'Accepted'] | ['s192939824', 's398847743'] | [8864.0, 9128.0] | [23.0, 205.0] | [56, 59] |
p02577 | u964182912 | 2,000 | 1,048,576 | An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9. Determine whether N is a multiple of 9. | ['N=int(input())\n\nif(N%9==) print("Yes")\nelse print("No")', 'N=int(input())\n\nif N%9==0:\n print("Yes")\n\nelse:\n print("No")\n '] | ['Runtime Error', 'Accepted'] | ['s768100339', 's692724098'] | [8856.0, 9204.0] | [28.0, 213.0] | [55, 65] |
p02577 | u965397031 | 2,000 | 1,048,576 | An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9. Determine whether N is a multiple of 9. | ['l = list(map(int, input()))\nsum = 0\nfor i in range(len(l)):\n sum += l[i]\n\nprint(sum)', "l = list(map(int, input()))\nsum = 0\nfor i in range(len(l)):\n sum += l[i]\n\nprint('Yes' if sum % 9 == 0 else 'No')"] | ['Wrong Answer', 'Accepted'] | ['s778301589', 's934968826'] | [10536.0, 10568.0] | [70.0, 70.0] | [87, 115] |
p02577 | u969081133 | 2,000 | 1,048,576 | An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9. Determine whether N is a multiple of 9. | ["n=int()\narray=list(map(int,n))\na=sum(array)\nif a%9==0:\n print('Yes')\nelse:\n print('No')", "n=input()\narray=list(map(int,n))\na=sum(array)\nif a%9==0:\n print('Yes')\nelse:\n print('No')"] | ['Runtime Error', 'Accepted'] | ['s566153882', 's218732682'] | [8944.0, 10756.0] | [26.0, 53.0] | [89, 91] |
p02577 | u970267139 | 2,000 | 1,048,576 | An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9. Determine whether N is a multiple of 9. | ["n = int(input())\nn = pow(10, 200000)-1\n\ntotal = 0\nn = str(n)\nfor i in range(len(n)):\n total += int(n[i])\n\nif total % 9 == 0:\n print('Yes')\nelse:\n print('No')\n", "n = int(input())\n\ntotal = 0\nn = str(n)\nfor i in range(len(n)):\n total += int(n[i])\n\nif total % 9 == 0:\n print('Yes')\nels... | ['Wrong Answer', 'Accepted'] | ['s787801959', 's685607235'] | [9236.0, 9212.0] | [785.0, 775.0] | [167, 145] |
p02577 | u970490119 | 2,000 | 1,048,576 | An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9. Determine whether N is a multiple of 9. | ['from math import ceil\nn, x, t = map(int, input().split())\nprint(t*ceil(n/x))', "n = str(input())\nlst = [int(i) for i in n]\nif sum(lst) % 9 ==0:\n print('Yes')\nelse:\n print('No')\n "] | ['Runtime Error', 'Accepted'] | ['s527389830', 's383585373'] | [9156.0, 10756.0] | [211.0, 61.0] | [76, 107] |
p02577 | u971811058 | 2,000 | 1,048,576 | An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9. Determine whether N is a multiple of 9. | ['#include<bits/stdc++.h>\n// Begin Header {{{\nusing namespace std;\nusing ll = long long;\nusing P = pair<ll, ll>;\nusing Graph = vector<vector<ll>>;\n#define rep(i,n) for(ll i=0; i<n; i++)\n#define loop(i, j, n) for(ll i=j; i<n; i++)\n#define all(x) (x).begin(), (x).end()\nconstexpr int INF = 0x3f3f3f3f;\nconst lon... | ['Runtime Error', 'Accepted'] | ['s530476761', 's959726132'] | [9000.0, 9324.0] | [27.0, 203.0] | [524, 60] |
p02577 | u972991614 | 2,000 | 1,048,576 | An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9. Determine whether N is a multiple of 9. | ["n = input()\nlist_n = list(n)\nlist_n = [int(s) for s in list_n]\nsum_list = 0\nfor i in list_n:\n sum_list += list_n[i]\nif sum_list%9 ==0:\n print('Yes')\nelse:\n print('No')", "n = input()\nlist_n = list(n)\nlist_n = [int(s) for s in list_n]\nsum_list = 0\nfor i in range(len(list_n)):\n sum_list += lis... | ['Runtime Error', 'Accepted'] | ['s207466752', 's300649045'] | [12344.0, 12508.0] | [80.0, 80.0] | [176, 188] |
p02577 | u974190618 | 2,000 | 1,048,576 | An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9. Determine whether N is a multiple of 9. | ['N = str(input())\nans = 0\nfor i in N:\n ans += int(i)\nif ans%9 == 0:\n print("yes")\nelse:\n print("no")', 'N = str(input())\nans = 0\nfor i in N:\n ans += int(i)\nif ans%9 == 0:\n print("Yes")\nelse:\n print("No")'] | ['Wrong Answer', 'Accepted'] | ['s915960828', 's564783482'] | [9132.0, 9204.0] | [66.0, 68.0] | [102, 102] |
p02577 | u975771310 | 2,000 | 1,048,576 | An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9. Determine whether N is a multiple of 9. | ['N = int(input())\n\ntemp = 0\nfor x in str(N):\n temp += int(x)\n\nif temp%9==0:\n ans = "yes"\nelse:\n ans = "No"\n\nprint(ans)', 'N = int(input())\n\ntemp = 0\nfor x in str(N):\n temp += int(x)\n\nif temp%9==0:\n ans = "Yes"\nelse:\n ans = "No"\n\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s607056717', 's019591738'] | [9288.0, 9228.0] | [723.0, 771.0] | [126, 126] |
p02577 | u991604406 | 2,000 | 1,048,576 | An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9. Determine whether N is a multiple of 9. | ["n = int(input())\nsum1 = 0\nfor i in range(len(str(n))):\n sum1 += int(str(n)[i])\n print(int(str(n)[i]))\nif sum1 % 9 == 0:\n print('Yes')\nelse:\n print('No')", "n = int(input())\ns = str(n)\narray = list(map(int, s))\nif sum(array) % 9 == 0:\n print('Yes')\nelse:\n print('No')"] | ['Wrong Answer', 'Accepted'] | ['s274400920', 's944639289'] | [9336.0, 11180.0] | [2205.0, 748.0] | [164, 116] |
p02577 | u999799597 | 2,000 | 1,048,576 | An integer N is a multiple of 9 if and only if the sum of the digits in the decimal representation of N is a multiple of 9. Determine whether N is a multiple of 9. | ['n = input()\ntotal = 0\nfor i in range(len(n)):\n total += int(n[i])\nprint(total % 9 == 0)', 'n = input()\ntotal = 0\nfor i in range(len(n)):\n total += int(n[i])\nans = "Yes" if total % 9 == 0 else "No"\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s319345947', 's260196996'] | [9232.0, 9216.0] | [74.0, 75.0] | [90, 119] |
p02579 | u243312682 | 2,000 | 1,048,576 | A maze is composed of a grid of H \times W squares - H vertical, W horizontal. The square at the i-th row from the top and the j-th column from the left - (i,j) \- is a wall if S_{ij} is `#` and a road if S_{ij} is `.`. There is a magician in (C_h,C_w). He can do the following two kinds of moves: * Move A: Walk to... | ["from collections import deque\n\ndef main():\n h, w = map(int, input().split())\n ch, cw = map(int, input().split())\n ch -= 1\n cw -= 1\n dh, dw = map(int, input().split())\n dh -= 1\n dw -= 1\n maze = [input() for i in range(h)]\n visited = [[-1]*w for j in range(h)]\n \n def maze_s... | ['Runtime Error', 'Accepted'] | ['s036334586', 's875913032'] | [18144.0, 23548.0] | [41.0, 1903.0] | [2234, 2192] |
p02579 | u312814337 | 2,000 | 1,048,576 | A maze is composed of a grid of H \times W squares - H vertical, W horizontal. The square at the i-th row from the top and the j-th column from the left - (i,j) \- is a wall if S_{ij} is `#` and a road if S_{ij} is `.`. There is a magician in (C_h,C_w). He can do the following two kinds of moves: * Move A: Walk to... | ['from collections import deque\n\nh, w = map(int, input().split())\nch, cw = map(int, input().split())\ndh, dw = map(int, input().split())\nbase = ["#" *(w+4)]\nbase.append("#" * (w+4))\nfor n in range(h):\n base.append("##" + input() + "##")\nbase.append("#" * (w+4))\nbase.append("#" * (w+4))\nans = [[-1] * (w+4) ... | ['Runtime Error', 'Accepted'] | ['s878240931', 's634245920'] | [18356.0, 23636.0] | [232.0, 1974.0] | [1313, 1568] |
p02579 | u414980766 | 2,000 | 1,048,576 | A maze is composed of a grid of H \times W squares - H vertical, W horizontal. The square at the i-th row from the top and the j-th column from the left - (i,j) \- is a wall if S_{ij} is `#` and a road if S_{ij} is `.`. There is a magician in (C_h,C_w). He can do the following two kinds of moves: * Move A: Walk to... | ["import sys\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\n\nh,w=map(int,readline().split())\nch, cw=map(int,readline().split())\ndh, dw=map(int,readline().split())\nm=list(map(lambda x: list(x.decode()), readlines()))\n\n\nch-=1; cw-=1; dh-=1; dw-=1\n\na... | ['Runtime Error', 'Accepted'] | ['s306276297', 's727803676'] | [18196.0, 29044.0] | [55.0, 1351.0] | [1779, 2068] |
p02579 | u684814987 | 2,000 | 1,048,576 | A maze is composed of a grid of H \times W squares - H vertical, W horizontal. The square at the i-th row from the top and the j-th column from the left - (i,j) \- is a wall if S_{ij} is `#` and a road if S_{ij} is `.`. There is a magician in (C_h,C_w). He can do the following two kinds of moves: * Move A: Walk to... | ['\nfrom collections import deque\n\nh, w = map(int, input().split())\nch, cw = map(int, input().split())\ndh, dw = map(int, input().split())\n\n\n\nbase = ["#" * (w + 4)]\nbase.append("#" * (w + 4))\nfor n in range(h):\n base.append("##" + input() + "##")\nbase.append("#" * (w + 4))\nbase.append("#" * (w + 4))\nans... | ['Wrong Answer', 'Accepted'] | ['s870140121', 's363944839'] | [21220.0, 23492.0] | [2206.0, 1653.0] | [1687, 2043] |
p02579 | u694665829 | 2,000 | 1,048,576 | A maze is composed of a grid of H \times W squares - H vertical, W horizontal. The square at the i-th row from the top and the j-th column from the left - (i,j) \- is a wall if S_{ij} is `#` and a road if S_{ij} is `.`. There is a magician in (C_h,C_w). He can do the following two kinds of moves: * Move A: Walk to... | ["from collections import deque\nh, w = map(int,input().split())\nch, cw = map(int,input().split())\ndh, dw = map(int,input().split())\n\nM = ['##' + input() + '##' for _ in range(h)]\nfor i in range(2):\n M.insert(0,'#'*(w+4))\n M.append('#'*(w+4))\n\nINF = float('inf')\ncost = [[INF for _ in range(w+4)] for _ i... | ['Runtime Error', 'Accepted'] | ['s162490239', 's989369263'] | [19160.0, 24620.0] | [78.0, 1987.0] | [1333, 1593] |
p02579 | u857759499 | 2,000 | 1,048,576 | A maze is composed of a grid of H \times W squares - H vertical, W horizontal. The square at the i-th row from the top and the j-th column from the left - (i,j) \- is a wall if S_{ij} is `#` and a road if S_{ij} is `.`. There is a magician in (C_h,C_w). He can do the following two kinds of moves: * Move A: Walk to... | ['from collections import deque\ndef main():\n h,w = map(int,input().split())\n ch,cw = map(lambda x:int(x)+1,input().split())\n dh,dw = map(lambda x:int(x)+1,input().split())\n s = [["#"]*(w+4) for _ in range(2)]+[["#"]*2+list(input())+["#"]*2 for _ in range(h)]+[["#"]*(w+4) for _ in range(2)]\n m1 = ((-1,0),(0,-... | ['Runtime Error', 'Accepted'] | ['s267585596', 's576267510'] | [17148.0, 22380.0] | [53.0, 1715.0] | [938, 938] |
p02579 | u887833602 | 2,000 | 1,048,576 | A maze is composed of a grid of H \times W squares - H vertical, W horizontal. The square at the i-th row from the top and the j-th column from the left - (i,j) \- is a wall if S_{ij} is `#` and a road if S_{ij} is `.`. There is a magician in (C_h,C_w). He can do the following two kinds of moves: * Move A: Walk to... | ["from collections import deque\n\n\nH, W = map(int, input().split())\nCh, Cw = map(lambda x: int(x) - 1, input().split())\nDh, Dw = map(lambda x: int(x) - 1, input().split())\nmaze = [input() for _ in range(H)]\n\nINF = 10 ** 12\npath = [[INF] * W for _ in range(H)] \n\n\nwalk = [(0, 1), (0, -1), (-1, 0), (1, 0)]\nwa... | ['Time Limit Exceeded', 'Wrong Answer', 'Accepted'] | ['s404639433', 's677812199', 's332265513'] | [23264.0, 17144.0, 24524.0] | [2206.0, 498.0, 1899.0] | [1219, 3465, 1790] |
p02579 | u972591645 | 2,000 | 1,048,576 | A maze is composed of a grid of H \times W squares - H vertical, W horizontal. The square at the i-th row from the top and the j-th column from the left - (i,j) \- is a wall if S_{ij} is `#` and a road if S_{ij} is `.`. There is a magician in (C_h,C_w). He can do the following two kinds of moves: * Move A: Walk to... | ["from collections import deque\n\n\nH, W = map(int, input().split())\nCh, Cw = map(lambda x: int(x) - 1, input().split())\nDh, Dw = map(lambda x: int(x) - 1, input().split())\nmaze = [input() for _ in range(H)]\n\nINF = 10 ** 12\npath = [[INF] * W for _ in range(H)] \n\n\nwalk = [(0, 1), (0, -1), (-1, 0), (1, 0)]\nwa... | ['Time Limit Exceeded', 'Accepted'] | ['s358252499', 's281623185'] | [23404.0, 23476.0] | [2206.0, 1607.0] | [1219, 1277] |
p02582 | u000037600 | 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())\ncnt=0\nfor i in a:\n if i=="R":\n cnt+=1\n else:\n cnt=0\nprint(cnt)', 'a=list(input())\ncnt=0\nans=0\nfor i in a:\n if i=="R":\n cnt+=1\n else:\n ans=max(cnt,ans)\n cnt=0\nprint(cnt)', 'a=list(input())\ncnt=0\nans=0\nfor i in a:\n if i=="R":\n cnt+=1\n else:\n ans=max(cnt,... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s440939715', 's717923650', 's623501165'] | [8976.0, 8956.0, 9036.0] | [28.0, 34.0, 34.0] | [86, 113, 130] |
p02582 | u001769145 | 2,000 | 1,048,576 | We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day. Find the maximum number of consecutive rainy days in this period. | ['S = input()\n\nans = 0\ntmp = 0\nfor i in range(3):\n if S[i] == "R":\n tmp += 1\n ans = max(ans, tmp)\n else:\n ans = max(ans, tmp)\n ans = 0\n\nprint(ans)\n', 'S = input()\n\nans = 0\nfor i in range(3):\n if S[i] == "R":\n ans += 1\n else:\n ans = 0\n\nprint(ans... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s362150810', 's872987440', 's943725259'] | [8880.0, 9076.0, 9040.0] | [29.0, 30.0, 24.0] | [179, 115, 184] |
p02582 | u006738234 | 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())\ns = list(s)\n\ncnt = 0\n\nfor i in range(3):\n if(s[i] == "S"):\n cnt += 1\n\nif(s[0] == "S" and s[1] == "R" and s[2] == "S"):\n cnt = 1\n\n\nprint(cnt)', 's = str(input())\ns = list(s)\n\ncnt = 0\n\nfor i in range(3):\n if(s[i] == "R"):\n cnt += 1\n\nif(s[0] == "R" and s[1] =... | ['Wrong Answer', 'Accepted'] | ['s774577500', 's380489088'] | [9108.0, 9044.0] | [32.0, 31.0] | [170, 170] |
p02582 | u006782785 | 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. | ['ans = 0\n\nif (a==s,b==s,c==s):\n print(ans)\n\nelif (a==r,b==s,c==s):\n ans = 1 + ans\n print(ans)\n\nelif (a==r,b==r,c==s):\n ans = 2 + ans\n print(ans)\n\nelse:\n ans = 1 + ans\n print(ans)', 'S = input()\n\na=RSS\nb=RRS\nc=RRR\nd=SSS\n\nif a in S:\n print(1)\n\nelif b in S:\n print(2)\n ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s045880641', 's574716570', 's162033704'] | [9100.0, 9024.0, 9028.0] | [29.0, 20.0, 28.0] | [198, 167, 150] |
p02582 | u007346335 | 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\nfor i in range(3):\n if s[i] == 'R':\n count++\nif count <= 1 || count == 3:\n print(count)\nelif s[1] != 'S':\n print(count-1)\nelse:\n print(count)\n ", "s = input()\ncount = 0\nfor i in range(3):\n if s[i] == 'R':\n count+=1\nif count <= 1 or count == 3:\n print(count)\nelif s[... | ['Runtime Error', 'Accepted'] | ['s850634633', 's665143240'] | [8936.0, 8992.0] | [24.0, 27.0] | [173, 174] |
p02582 | u008586830 | 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\nflag=True\nif s[0]=='R' and s[1]=='R' and s[2]=='R':\n print(3)\nelif (s[0]=='R' and s[1]=='R') or (s[0]=='R' and s[2]=='R') \nor(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)\nelse:\n print(0)", "s=input()\ncount=0\nflag=True\nfor char in s... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s659784914', 's767875982', 's530365386'] | [8832.0, 9056.0, 9000.0] | [23.0, 30.0, 27.0] | [259, 118, 129] |
p02582 | u021849254 | 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=="SSS":\n print(0)\nelif a="RRR":\n print(3)\nelif a="RRS" or a="SRR":\n print(2)\nelse:\n print(1)\n', 'a=input()\nif a==SSS:\n print(0)\nelif a=RRR:\n print(3)\nelif a=RRS or a=SRR:\n print(2)\nelse:\n print(1)', 'a=input()\nif a=="SSS":\n print(0)\nelif a=="RRR":\n print(3)\nelif a=="RRS"... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s154991231', 's612892952', 's005353201'] | [8940.0, 8580.0, 9032.0] | [27.0, 27.0, 30.0] | [112, 103, 114] |
p02582 | u021877437 | 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().rstrip())\nnum = 0\nfor c in S:\n\tif c == 'R':\n\t\tnum += 1\n\telse:\n\t\tnum = 0\n\nprint(num)\n\n", "S = input().rstrip()\nnum = 0\nmnum = 0\nfor c in S:\n if c == 'R':\n num += 1\n else:\n num = 0\n\n if mnum < num:\n mnum = num\n\nprint(mnum)\n"] | ['Wrong Answer', 'Accepted'] | ['s056090155', 's536770087'] | [9088.0, 9096.0] | [27.0, 28.0] | [102, 162] |
p02582 | u021916304 | 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 ii():return int(input())\ndef iim():return map(int,input().split())\ndef iil():return list(map(int,input().split()))\n\ns = input()\ncnt = 0\nans = 0\nfor i in s:\n if i=='R':\n cnt += 1\n else:\n ans = max(ans,cnt)\n cnt = 0\nprint(cnt)", "def ii():return int(input())\ndef iim():return... | ['Wrong Answer', 'Accepted'] | ['s777252477', 's795266757'] | [8932.0, 9048.0] | [28.0, 25.0] | [255, 264] |
p02582 | u026155812 | 2,000 | 1,048,576 | We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day. Find the maximum number of consecutive rainy days in this period. | ["s = input()\nans = 0\nif s == 'SSS':\n print(3)\nelif s == 'SSR' or s == 'RSS':\n print(2)\nelif s == 'SRR' or s == 'RSR' or s == 'RRS' or s == 'SRS':\n print(1)\nelse:\n print(0)", "s = input()\nans = 0\nif s == 'SSS':\n print(3)\nelif s == 'SSR' or s == 'RSS':\n print(2)\nelif s == 'SRR' or s == '... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s892290263', 's956985164', 's748892760'] | [8772.0, 8856.0, 8952.0] | [30.0, 24.0, 28.0] | [182, 179, 182] |
p02582 | u026381867 | 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()\nlist1 = a.split("S")\nprint(list)\nif len(list1) == 1:\n print(3)\nelif len(list1) == 2:\n if a == "RSR":\n print(1)\n else:\n print(2)\nelif len(list1) == 3:\n print(1)\nelse:\n print(0)', 'a = input()\nlist1 = a.split("S")\n\nif len(list1) == 1:\n print(3)\nelif len(list1) == 2:\n if a == ... | ['Wrong Answer', 'Accepted'] | ['s998095377', 's949019282'] | [9044.0, 8944.0] | [28.0, 30.0] | [198, 187] |
p02582 | u035445296 | 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()\ns.replace('R', '').replace('RR', '').replace('RRR', '')\nprint(3-len(s))", "s = input()\nans = 0\nfor i in range(1, 4):\n if 'R'*i in s:\n ans = len('R'*i)\nprint(ans)"] | ['Wrong Answer', 'Accepted'] | ['s002042190', 's121824098'] | [9032.0, 9092.0] | [27.0, 26.0] | [83, 90] |
p02582 | u039304781 | 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()\ns = list(S)\n\ncount = 0\n\nfor i in range(len(s)):\n if s[i] == 'R':\n count = 1\n try:\n if s[i+1] == 'R':\n count += 1\n \n except IndexError:\n break\n\nprint(count)\n", "S = input()\ns = list(S)\n\ncount = 0\nl = [0]\n\nfor i in ran... | ['Wrong Answer', 'Accepted'] | ['s429715959', 's165976346'] | [9032.0, 9044.0] | [36.0, 36.0] | [236, 357] |
p02582 | u042414886 | 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()\nresult = 0\nfor i in range(3):\n if S[i] == 'R':\n result = result + 1\n else:\n result = 0\n\nprint(result)\n", "S = input()\nScnt = S.count('S')\nresult = 0\nresult2 = 0\n\nfor i in range(3):\n if S[i] == 'R':\n result = result + 1\n else:\n if result2 < result:\... | ['Wrong Answer', 'Accepted'] | ['s522275372', 's210547566'] | [9084.0, 9100.0] | [36.0, 32.0] | [134, 276] |
p02582 | u048169875 | 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. | ["res, prev, count = 0, '', 0\nfor s in S:\n if s == 'R':\n count += 1\n else:\n res = max(res, count)\n count = 0\nres = max(res, count)\nreturn res", "S = input()\nres, prev, count = 0, '', 0\nfor s in S:\n if s == 'R':\n count += 1\n else:\n res = max(res, count)\n count = 0\nprint(max(res, cou... | ['Runtime Error', 'Accepted'] | ['s695684736', 's211572212'] | [8936.0, 9112.0] | [23.0, 32.0] | [150, 152] |
p02582 | u054825571 | 2,000 | 1,048,576 | We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day. Find the maximum number of consecutive rainy days in this period. | ["S=input()\nans=0\ntmp=0\nfor s in S:\n if s=='S':\n tmp+=1\n else:\n ans=max(ans,tmp)\n tmp=0\nprint(max(ans,tmp))", "S=input()\nans=0\ntmp=0\nfor s in S:\n if s='S':\n tmp+=1\n else:\n ans=max(ans,tmp)\n tmp=0\nprint(max(ans,tmp))", "S=input()\nans=0\ntmp=0\nfor s in S:\n if s=='R':\n tmp+=... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s412007578', 's419114649', 's071809433'] | [9084.0, 9008.0, 9108.0] | [29.0, 24.0, 28.0] | [116, 115, 116] |
p02582 | u055127677 | 2,000 | 1,048,576 | We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day. Find the maximum number of consecutive rainy days in this period. | ["X,K,D=list(map(int,input().split()))\n\ndef sgn(x):\n if x>0:\n return 1\n elif x<0:\n return -1\n return 0\n\ndef solve():\n if X>0:\n x_greedy=X-K*D\n else:\n x_greedy=X+K*D\n\n if sgn(X)==sgn(x_greedy):\n return print(x_greedy)\n\n else:\n x_r=X%D\n ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s319664927', 's373840376', 's958147358'] | [9188.0, 9032.0, 8992.0] | [21.0, 22.0, 27.0] | [496, 505, 159] |
p02582 | u057441537 | 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[0]\ncnt = 0\nfor i in range(3):\n if S[i] == 'R':\n \n # \n if i == 0 or S[i - 1] == 'R':\n\t cnt += 1\n else:\n cnt = 1\nprint(cnt)", "S = input()\ncnt = 0\nfor i in range(3):\n if S[i] == 'R':\n \n if i == 0 or S[i - 1] == 'R':\n cnt += 1\n else:\n ... | ['Runtime Error', 'Accepted'] | ['s915783043', 's167586028'] | [9008.0, 9092.0] | [23.0, 28.0] | [225, 247] |
p02582 | u060012100 | 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 == 'RSR':\n print(1)\nelse:\n for i in S:\n if i == 'R':\n cout+=1\n print(count)", "S = input()\ncount = 0\nif S == 'RSR':\n print(1)\nelse:\n for i in S:\n if i == 'R':\n count+=1\n print(count)"] | ['Runtime Error', 'Accepted'] | ['s020775780', 's725383525'] | [8964.0, 9020.0] | [25.0, 29.0] | [113, 114] |
p02582 | u061835391 | 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()\ni=0\nc=0\nif s[i]=='R':\n c=1\n if s[i+1]=='R':\n c=2\n if s[i+2]=='R':\n c=3\nif s[i]=='S':\n c=0\n if s[i+1]=='R':\n c=1\n \tif s[i+2]=='R':\n c=2\nprint(c)\n ", "s=input()\nif 'RRR' in s:\n c=3\nelif 'RR' in s:\n c=2\nelif 'R' in s:\n c=1\nelse:\n c=0\nprint(c)"] | ['Runtime Error', 'Accepted'] | ['s194507212', 's210431931'] | [8968.0, 8964.0] | [24.0, 32.0] | [185, 94] |
p02582 | u065578867 | 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\n\nn = int(input())\nl = list(map(int, input().split()))\n\nl_counter = Counter(l)\nl_set = sorted(list(l_counter.keys()))\n\nlength = len(l_set)\nans = 0\nif n < 3:\n print(0)\nelse:\n for i in range(length - 2):\n for j in range(i + 1, length - 1):\n for k in ... | ['Runtime Error', 'Accepted'] | ['s258059935', 's565636447'] | [9460.0, 9036.0] | [31.0, 31.0] | [483, 199] |
p02582 | u066675967 | 2,000 | 1,048,576 | We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day. Find the maximum number of consecutive rainy days in this period. | ["s = input()\ndef solve(s):\n if not s:\n return 0\n d = 0\n res = 0\n for i in s:\n if i == 'R':\n d += 1\n else:\n res = max(res, d)\n d = 0\n return res\nsolve(s)", "s = input()\ndef solve(s):\n c = s.count('R')\n if c in [0, 1, 3]:\n return c\n elif s.count('RR') == 1:\... | ['Wrong Answer', 'Accepted'] | ['s261532695', 's432449052'] | [9032.0, 9028.0] | [27.0, 29.0] | [180, 176] |
p02582 | u068291196 | 2,000 | 1,048,576 | We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day. Find the maximum number of consecutive rainy days in this period. | ["S = input('>>>')\nnum = 0\nnum_rev = [0,0,0]\nfor i in range(3):\n if S[i] == 'R':\n num += 1\n elif S[i] == 'S':\n num_rev[i] = num\n num = 0\n \n\nprint(max(num,num_rev[0],num_rev[1],num_rev[2]))", "S = input('>>>')\nnum = 0\nnum_rev = 0\nfor i in range(3):\n if S[i] == 'R':\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s323477517', 's349140037', 's726270334'] | [9044.0, 9032.0, 9040.0] | [29.0, 34.0, 31.0] | [220, 186, 218] |
p02582 | u068322747 | 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. | ["z=[]\na=input()\nfor i in a:\n z.append(i)\nprint(z)\nz.count('R')", "z=[]\na=input()\nfor i in a:\n z.append(i)\n\nif (z[0]=='R') and (z[1]=='R') and (z[2]=='S'):\n print(2)\nelif (z[1]=='R') and (z[2]=='R') and (z[0]=='S'):\n print(2)\nelif (z[0]=='S') and (z[1]=='S') and (z[2]=='S'):\n p... | ['Wrong Answer', 'Accepted'] | ['s648852800', 's705416136'] | [9024.0, 9088.0] | [28.0, 29.0] | [64, 329] |
p02582 | u068944955 | 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\nm = 0\nif s in S:\n if s == "R":\n c+=1\n m = max(c, m)\n else:\n m = max(c, m)\n c = 0\nprint(m)\n \n ', 'S = input()\nc = 0\nm = 0\nfor s in S:\n m = max(c, m)\n if s == "R":\n c += 1\n m = max(c, m)\n else:\n c = 0\nprint(m)'] | ['Runtime Error', 'Accepted'] | ['s601189299', 's231774179'] | [9024.0, 9024.0] | [25.0, 33.0] | [131, 140] |
p02582 | u075317232 | 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 RainySeason():\n \n str1 = str(input())\n\n print(str1[:2], str1[1:])\n\n if str1 == 'RRR':\n print(3)\n \n elif str1 == 'SSS':\n print(0)\n \n elif str1[:2] == 'RR' or str1[1:] == 'RR':\n print(2)\n \n else:\n print(1)\n\nif __name__ == '__main__'... | ['Wrong Answer', 'Accepted'] | ['s527577651', 's714053412'] | [9100.0, 9040.0] | [33.0, 34.0] | [321, 290] |
p02582 | u080419397 | 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()\nraincount=0\nfor i in range(3):\n if weather[i]=="R":\n raincount=raincount+1\n else:\n raincount=0\n\nprint(raincount)', 'weather = input()\nraincount=0\ncont=0\nfor i in range(3):\n if weather[i]=="R" and cont==0:\n raincount=raincount+1\n elif weather[... | ['Wrong Answer', 'Accepted'] | ['s991216962', 's293699449'] | [9088.0, 9016.0] | [34.0, 30.0] | [157, 265] |
p02582 | u081060730 | 2,000 | 1,048,576 | We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day. Find the maximum number of consecutive rainy days in this period. | ['n,k=map(int,input().split(" "))\nP=list(map(int,input().split(" ")))\nC=list(map(int,input().split(" ")))\ncount=[]\ndef f (i):\n q=deepcopy(i)\n count1=[]\n count2=0\n for j in range(k):\n count2+=C[i]\n count1.append(count2)\n if i==q and count1<0:\n break\n i=P[i]... | ['Runtime Error', 'Accepted'] | ['s306127167', 's011832933'] | [9180.0, 9020.0] | [25.0, 32.0] | [390, 80] |
p02582 | u081714930 | 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 "RRR" in S:\n print(3)\nelse "RR" in S:\n print(2)\nelse "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)\n'] | ['Runtime Error', 'Accepted'] | ['s383282773', 's879476981'] | [8864.0, 9032.0] | [20.0, 28.0] | [108, 109] |
p02582 | u086450146 | 2,000 | 1,048,576 | We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day. Find the maximum number of consecutive rainy days in this period. | ['X,K,D = map(int,input().split())\nX = abs(X)\n\nif X > K*D:\n ans = X - K*D\n\nelse:\n while X >= 0 :\n X = X - D\n K -= 1\n if K % 2 == 0:\n ans = abs(X)\n if K % 2 != 0:\n ans = X+D\n\nprint(ans)', 'X,K,D = map(int,input().split())\nX = abs(X)\n\nif X > K*D:\n ans = X - K*... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s713869730', 's960955522', 's491639378'] | [9164.0, 9084.0, 9024.0] | [21.0, 30.0, 31.0] | [250, 241, 81] |
p02582 | u091207675 | 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. | ['i = input()\n\n\nif i == "SSS":\n print(0)\nelif i == "RRR":\n print(3)\nelif i == "RSR" or "SSR" or "RSS" or "SRS":\n print(1)\nelif i = "RRS" or "SRR":\n print(2)\n', 'i = input()\n\n\nif i == "SSS":\n print(0)\nelif i == "RRR":\n print(3)\nelif i == "RSR" or i == "SSR" or i=="RSS" or i=="SRS":\n ... | ['Runtime Error', 'Accepted'] | ['s331086828', 's379358760'] | [8980.0, 8980.0] | [27.0, 27.0] | [167, 182] |
p02582 | u094102716 | 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 "RRR" in a:\n print(3)\nelif "RR" in a:\n print(2)\nelif "R" in a:\n print(1)\nelse:a\n print(0)\n', 'a = input()\nif "RRR" in a:\n print(3)\nelif "RR" in a:\n print(2)\nelif "R" in a:\n print(1)\nelse:\n print(0)\n'] | ['Runtime Error', 'Accepted'] | ['s097486780', 's742750341'] | [9012.0, 9016.0] | [25.0, 24.0] | [109, 108] |
p02582 | u096146539 | 2,000 | 1,048,576 | We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day. Find the maximum number of consecutive rainy days in this period. | ['n=int(input())\nl=list(map(int,input().split()))\ncount=0\nfor i in range (n-2):\n for j in range (i+1,n-1):\n if l[i]==l[j]:\n continue\n l[i]+l[j]\n for k in range (j+1,n):\n if l[k]==l[i] or l[k]==l[l]:\n continue\n if l[k]<l[i]+l[j] and l[i]<... | ['Runtime Error', 'Accepted'] | ['s597961728', 's655899456'] | [9204.0, 9068.0] | [25.0, 31.0] | [381, 378] |
p02582 | u097852911 | 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 = str(input())\nprint(str)\nif str == "RRR":\n print(3)\nelif str == "RRS" or str=="SRR":\n print(2)\nelif str == "SSS":\n print(0)\nelse:\n print(1)\n\n\n', 'str = str(input())\nprint(str)\nif str == "RRR":\n print(3)\nelif str == "RRS" or str=="SRR":\n print(2)\nelif str == "SSS":\n print(0)\nelse:\n pr... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s184184170', 's819025534', 's579722412'] | [9040.0, 8992.0, 8912.0] | [25.0, 26.0, 25.0] | [151, 151, 140] |
p02582 | u102655885 | 2,000 | 1,048,576 | We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day. Find the maximum number of consecutive rainy days in this period. | ['x, k, d = list(map(lambda x: int(x), input().split()))\n\nmin_pos = x % d\nmin_neg = min_pos - d\n\nnum_to_min_pos = x // d\nif k <= num_to_min_pos:\n print(x - d * k)\n \nelse:\n if (k - num_to_min_pos) % 2 == 0:\n print(min_pos)\n else:\n print(abs(min_neg))\n', "import re\ns = input()\nar... | ['Runtime Error', 'Accepted'] | ['s587683142', 's077381356'] | [9088.0, 9820.0] | [25.0, 45.0] | [274, 84] |
p02582 | u105608888 | 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. | ["mozi = input()\nif mozi == 'SSS':\n print(3)\nif mozi == 'SSR':\n print(2)\nif mozi == 'RSS':\n print(2)\nif mozi == 'SRR':\n print(1)\nif mozi == 'RSR':\n print(1)\nif mozi == 'RRS':\n print(1)\nelse:\n print(0)", "mozi = input()\nif mozi == 'RRR':\n print(3)\nelif mozi == 'RRS':\n print(2... | ['Wrong Answer', 'Accepted'] | ['s421443346', 's287584204'] | [9108.0, 9048.0] | [28.0, 35.0] | [219, 262] |
p02582 | u105659451 | 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=="RRS":\n print(3)\nelif S=="RSS":\n print(1)\nelif S=="SSS":\n print(0)\nelif S=="RSR":\n print(1)\nelif S=="SRR":\n print(2)\nelif S=="SSR":\n print(1)\nelif S=="SRS":\n print(1)', 'S = input()\nif S=="RRR":\n print(3)\nelif S=="RRS":\n prin... | ['Wrong Answer', 'Accepted'] | ['s570480538', 's074009517'] | [8912.0, 9116.0] | [30.0, 32.0] | [233, 233] |
p02582 | u106816675 | 2,000 | 1,048,576 | We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day. Find the maximum number of consecutive rainy days in this period. | ['S = input()\ncnt = 0\n\n\nfor i in S:\n if i == "R":\n cnt += 1\n else:\n cnt = 0\n\n\nprint(cnt)\n', 'S = input()\n\nif S == "SSS":\n print(0)\n exit()\nelif S == "RSS" or S == "SRS" or S == "SSR" or S == "RSR":\n print(1)\n exit()\nelif S == "RRS" or S == "SRR":\n print(2)\n ex... | ['Wrong Answer', 'Accepted'] | ['s219615411', 's421468056'] | [9100.0, 9032.0] | [33.0, 30.0] | [107, 220] |
p02582 | u112247039 | 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)\nm= min(k,x//d)\nx -= m*d\nk -= m\nif k%2:\n x = abs(x-d)\nprint(x)', 'x,k,d = map(int, input().split())\nx = abs(x)\nm = min(k,x//d)\nx -= m*d\nk -= m\nif k%2: x = abs(x-d)\nprint(x)', "s = input()\nfor i in ['RRR','RR','R']:\n if i in s:\n print(len(i));break\... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s009037418', 's825708921', 's305619075'] | [9120.0, 9168.0, 8916.0] | [27.0, 23.0, 28.0] | [106, 106, 100] |
p02582 | u117078923 | 2,000 | 1,048,576 | We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day. Find the maximum number of consecutive rainy days in this period. | ['s = input()\n\nif s=="RRR":\n print(3)\nelif s=="RRS" or s=="SRR":\n print(2)\nelif s=="SSR" or s=="SRS" or s=="RSS" or s="RSR":\n print(1)\nelse:\n print(0)', 's = input()\n\nif s=="RRR":\n print(3)\nelif s=="RRS" or s=="SRR":\n print(2)\nelif s=="SSR" or s=="SRS" or s=="RSS" or s=="RSR":\n print(1)\nelse:\n ... | ['Runtime Error', 'Accepted'] | ['s978997483', 's026686272'] | [9012.0, 9032.0] | [30.0, 31.0] | [152, 153] |
p02582 | u122428774 | 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("R"):\n if s.count("RR"):\n if s.count("RRR"):\n print(3)\n else:\n print(2)\n else:\n print(1)\nprint(0)\n', 's = input()\nif s.count("R"):\n if s.count("RR"):\n if s.count("RRR"):\n print(3)\n else:\n pri... | ['Wrong Answer', 'Accepted'] | ['s480463093', 's217391824'] | [9088.0, 9088.0] | [36.0, 32.0] | [170, 180] |
p02582 | u123745130 | 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="RR":\n print(2)\nelif s="R":\n print(1)\nelse: print(0)\n', 's=input()\nif s=="RRR":\n print(3)\nelif s=="RR":\n print(2)\nelif s=="R":\n print(1)\nelse: print(0)\n', 's=input()\nif "RRR" in s:\n print(3)\nelif "RR" in s:\n print(2)\nelif "R" in s:\n... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s039197287', 's332824214', 's769998084'] | [8796.0, 9092.0, 9080.0] | [26.0, 30.0, 30.0] | [102, 104, 110] |
p02582 | u128697000 | 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. | ['code = input()\n\nif code == SSS:\n print(0)\nelif code == SSR or SRS or RSS or RSR:\n print(1)\nelif code == SRR or RRS:\n print(2)\nelse:\n print(3)', 'word = input()\nif word == "SSS":\n print(0)\nelif word == "RSS" or "SRS" or "SSR" or "RSR":\n print(1)\nelif word == "RRR":\n print(3)\nelse:... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s279067568', 's522221545', 's572789021', 's650883857', 's962967826', 's301855505'] | [9096.0, 8888.0, 9084.0, 9084.0, 9032.0, 9112.0] | [25.0, 29.0, 30.0, 27.0, 24.0, 29.0] | [153, 158, 168, 182, 153, 239] |
p02582 | u129749062 | 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\nX, K, D = map(int,input().split())\ncnt = 0\na = X\nb = 0\ntmp = 0\nif X >= K*D:\n print(X - K*D)\n sys.exit()\nif K % 2 == 0:\n tmp = int(X/D)\n if tmp% 2 == 0:\n a = X - D*tmp\n else:\n a = X - D*tmp + D\n b = a - D*2\nelse:\n tmp = int(X/D)\n if tmp% 2 == 1:\n a = X - D*tmp\n else:\n ... | ['Runtime Error', 'Accepted'] | ['s928165310', 's377425441'] | [9132.0, 9024.0] | [27.0, 31.0] | [358, 107] |
p02582 | u135331079 | 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 s in S:\n if s == 'R':\n ans += 1\n else:\n ans = 0\n\nprint(ans)", "S = input()\nans = 0\n\nif S == 'RSR':\n ans = 1\nelse:\n ans = S.count('R')\n\nprint(ans)\n"] | ['Wrong Answer', 'Accepted'] | ['s211304930', 's227198380'] | [8952.0, 9088.0] | [28.0, 32.0] | [104, 89] |
p02582 | u135389999 | 2,000 | 1,048,576 | We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day. Find the maximum number of consecutive rainy days in this period. | ['s = input()\nrain = 0\nans = 0\nfor i in s:\n if i == "R":\n rain += 1\n ans = max(ans, rain)\n else:\n rain = 0\nprint(rain)', 's = input()\nrain = 0\nans = 0\nfor i in s:\n if i == "R":\n rain += 1\n ans = max(ans, rain)\n else:\n rain = 0\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s522946712', 's607817305'] | [9068.0, 9036.0] | [31.0, 29.0] | [127, 126] |
p02582 | u149475724 | 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 = input()\n if n == "RRR":\n print("3")\n elif n[:2] == "RR" or n[1:] == "RR":\n print("2")\n elif n=="SSS":\n print("0")\n else:\n print("1")', 'n = input()\nif n == "RRR":\n print("3")\nelif n[:2] == "RR" or n[1:] == "RR":\n print("2")\nelif n=="SSS":\n print("0")\... | ['Runtime Error', 'Accepted'] | ['s751707533', 's991884031'] | [8844.0, 9028.0] | [28.0, 28.0] | [176, 144] |
p02582 | u153955689 | 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\nfor i in range(1, 4):\n c = "R" * i\n if c in s:\n ans = c\n \nprint(ans)\n \n', 's = list(input())\n\nfor i in range(1, 4):\n c = "R" * i\n if c in s:\n ans = c\n \nprint(ans)\n ', "S = list(input())\n\nif 'RRR' in s:\n i = 3\nelif 'RR' in s:\n i = 2\nelif 'R' in s:\n i = 1\nelse:... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s192506743', 's366529855', 's438704519', 's620128322', 's294215433'] | [8880.0, 9080.0, 9028.0, 9048.0, 8936.0] | [24.0, 27.0, 23.0, 27.0, 30.0] | [93, 98, 111, 107, 106] |
p02582 | u159144188 | 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 "RR" in S:\n print(2)\nelif "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)'] | ['Runtime Error', 'Accepted'] | ['s807349449', 's985521405'] | [8884.0, 9020.0] | [25.0, 36.0] | [106, 107] |
p02582 | u161857931 | 2,000 | 1,048,576 | We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day. Find the maximum number of consecutive rainy days in this period. | ['S = input()\n\nif S.count("RRR") == 1 :\n print("3")\nelif S.count("RRR") == 1 :\n print("2")\nelse :\n if S.count("R") >= 1 :\n print("1")\n else :\n print("0")', 'S = input()\n\nif S.count("RRR") == 1 :\n print("3")\nelif S.count("RR") == 1 :\n print("2")\nelse :\n if S.count("R")... | ['Wrong Answer', 'Accepted'] | ['s535087558', 's709673080'] | [9096.0, 9064.0] | [26.0, 31.0] | [177, 176] |
p02582 | u162612857 | 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\n\nR, C, k = list(map(int, input().split()))\nitems = [list(map(int, input().split())) for _ in range(k)]\n\ndp = [[[0 for _ in range(4)] for _ in range(C+1+1)] for _ in range(R+1+1)] \n\nitem_values = [[0 for _ in range(C+1+1)] for _ in range(R+1+1)]\n\nfor item in items:\n item_values[item[0]][item[1]] = ite... | ['Runtime Error', 'Accepted'] | ['s484689492', 's308753981'] | [9344.0, 9080.0] | [27.0, 32.0] | [1300, 117] |
p02582 | u163393400 | 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\nfor i in s:\n if i =='S':\n count+=1\nprint(count)\n ", "s=input()\ncount=0\nm=0\nfor i in range(len(s)):\n if s[i]=='R':\n count+=1\n else:\n if count > m :\n m=count\n count=0\nif count>m:\n m=count\nprint(m)\n "] | ['Wrong Answer', 'Accepted'] | ['s912222900', 's187685001'] | [9080.0, 8920.0] | [30.0, 28.0] | [84, 189] |
p02582 | u163501259 | 2,000 | 1,048,576 | We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day. Find the maximum number of consecutive rainy days in this period. | ["import sys\ninput = sys.stdin.readline\ndef main():\n S = input().rstrip()\n CNT = 0\n ans = 0\n for c in S:\n if c == 'R':\n CNT += 1\n else:\n ans = max(ans,CNT)\n CNT = 0\n print(ans)\n\n\nif __name__ == '__main__':\n main)", "import sys\ninput = sys... | ['Runtime Error', 'Accepted'] | ['s769099264', 's874100339'] | [9036.0, 9048.0] | [24.0, 31.0] | [275, 300] |
p02582 | u163543660 | 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\nlist = list(s)\ncnt=0\nif list(0) == 'R' and list(1) == 'R' and list(2)=='R':\n print(3)\nelif list(0)=='R' and list(1) == 'R'and list(2)!='R':\n print(2)\nelif list(0)=='R' and list(1) != 'R'and list(2)!='R':\n print(1)\nelif list(0)=='R' and list(1) != 'R'and list(2)=='R':\n print(1)\nelif ... | ['Runtime Error', 'Accepted'] | ['s822488436', 's566194559'] | [9108.0, 9176.0] | [27.0, 28.0] | [523, 523] |
p02582 | u166057331 | 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(str)\n\nif a[0]=='R' and a[1]=='R' and a[2]=='R':\n res = 3\nelif a[0]=='R' and a[1]=='R':\n res = 2\nelif a[1]=='R' and a[2]=='R':\n res = 2 \nelif a[0]=='R':\n res = 1\nelif a[1]=='R':\n res = 1\nelif a[2]=='R':\n res = 1 \nelse:\n res = 0\n \nprint(res)", "a = input()\n\nif a[0]=='R' and a[1... | ['Wrong Answer', 'Accepted'] | ['s660952818', 's137405247'] | [9068.0, 9044.0] | [29.0, 31.0] | [262, 273] |
p02582 | u170410075 | 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\ntmp=0\nfor i in range(3):\n if s[i]=='s':\n tmp+=1\n if c<tmp:\n c=tmp\n else:\n tmp=0\nprint(c)", "s=input()\nc=0\ntmp=0\nfor i in range(3):\n if s[i]='s':\n tmp+=1\n if c<tmp:\n c=tmp\n else:\n tmp=0\nprint(c)", "s=input()\n... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s102918654', 's286245183', 's934893760', 's649188398'] | [8984.0, 8952.0, 9008.0, 9040.0] | [28.0, 21.0, 23.0, 27.0] | [140, 139, 139, 140] |
p02582 | u174404613 | 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)\nif ("RR" in s):\n print(2)\nif ("R" in s):\n print(3)\nprint(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)\n'] | ['Wrong Answer', 'Accepted'] | ['s294882096', 's793898876'] | [9092.0, 8928.0] | [34.0, 32.0] | [99, 112] |
p02582 | u180776099 | 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. | ['cnt = 0\nt = list(input())\nfor i in range(len(t)):\n print(len(t))\n if i == 1:\n if t[i] == "R":\n cnt += 1\n if i != 1:\n if t[i] == "R" and t[i-1] == "R":\n cnt += 1\n if t[i] == "R" and t[i-1] == "S":\n cnt = 1\n else:\n cnt = 0\npr... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s088677936', 's169267322', 's362798030', 's464023155', 's503600065', 's994150332', 's639814596'] | [8876.0, 8976.0, 8928.0, 8952.0, 8996.0, 8996.0, 8960.0] | [26.0, 25.0, 28.0, 25.0, 28.0, 27.0, 35.0] | [312, 288, 98, 107, 314, 121, 102] |
p02582 | u185042816 | 2,000 | 1,048,576 | We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day. Find the maximum number of consecutive rainy days in this period. | ["N, K = map(int, input().split())\nP = list(map(int, input().split()))\nC = list(map(int, input().split()))\n \nans = -float('inf')\nfor s in range(N):\n S = [] \n i = P[s] - 1\n S.append(C[i])\n while i != s:\n i = P[i] - 1\n S.append(S[-1] + C[i])\n \n if K <= len(S):\n score = ma... | ['Runtime Error', 'Accepted'] | ['s203167620', 's810343870'] | [9100.0, 9060.0] | [30.0, 25.0] | [634, 248] |
p02582 | u185354171 | 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)\nelse if s=="RRS" or s== "SRR":\n print(2)\nelse if s== "RRR":\n print(3)\nelse:\n print(1)', 's=input()\nif s=="SSS":\n print(0)\nelse if s=="RRS" or s= "SRR":\n print(2)\nelse if s= "RRR":\n print(3)\nelse:\n print(1)', 's=input()\nif s=="SSS":\n print(0)\nelif s=="RRS" o... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s178936389', 's361200438', 's382253827'] | [8948.0, 8924.0, 8992.0] | [32.0, 25.0, 27.0] | [122, 120, 116] |
p02582 | u190167135 | 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()\nS='RRR'\nif S=='SSS':\n print(0)\nif S=='RSS' or S=='SRS' or S=='SSR' or S=='RSR':\n print(1)\nif S=='RRS' or S=='SRR':\n print(2)\nif S=='RRR':\n print(3)", "if S=='SSS':\n print(0)\nif S=='RSS' or S=='SRS' or S=='SSR' or S=='RSR':\n print(1)\nif S=='RRS' or S=='SRR':\n print(2)\nif S=='RRR':\n pr... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s458992262', 's650591395', 's568860549'] | [9096.0, 9088.0, 8852.0] | [29.0, 27.0, 33.0] | [161, 143, 153] |
p02582 | u190385778 | 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. | ['for r in S:\n if rrr in S:\n return(3)\n elif rr in S:\n return(2)\n elif: r in S:\n return(1)\n else:\n return(0)\n \n ', "s= input()\n\nif 'RRR' in s:\n print(3)\n \n\nelif 'RR' in s:\n print(2)\n \nelif 'R' in s:\n print(1)\nelse:\n print(0)"] | ['Runtime Error', 'Accepted'] | ['s515013738', 's991132182'] | [8856.0, 8996.0] | [23.0, 25.0] | [136, 126] |
p02582 | u191386074 | 2,000 | 1,048,576 | We have weather records at AtCoder Town for some consecutive three days. A string of length 3, S, represents the records - if the i-th character is `S`, it means it was sunny on the i-th day; if that character is `R`, it means it was rainy on that day. Find the maximum number of consecutive rainy days in this period. | ['x, k, d = map(int, input().split(" "))\n\ndef y(l): return abs(x + l * d - (k - l) * d)\n\nlf = max(0, (k - x / d) / 2)\nl = int(lf)\nif lf - l > 0 and l + 1 <= k:\n print(min(y(l), y(l + 1)))\nelse:\n print(y(l))\n', 'print({\n "SSS": 0,\n "SSR": 1,\n "SRS": 1,\n "SRR": 2,\n "RSS": 1,\n "RSR"... | ['Runtime Error', 'Accepted'] | ['s849435743', 's956644723'] | [9180.0, 9076.0] | [21.0, 28.0] | [211, 132] |
p02582 | u192627933 | 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 = 0\nS = Input()\nfor i in range(0,len(S)):\n if i==0:\n if S[i]=="R":\n n += 1\n if i==1:\n if S[i]=="R":\n n += 1\n else:\n n = 0\n if i==2:\n if S[i]=="R":\n n += 1\n else:\n continue\nprint(n)', 'def judge(S):\n ... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s603996083', 's922754410', 's370660324'] | [9104.0, 9108.0, 9060.0] | [29.0, 28.0, 26.0] | [281, 369, 314] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.