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 |
|---|---|---|---|---|---|---|---|---|---|---|
p03296 | u371467115 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['n=int(input())\na=list(map(int,input().split()))\ncnt=0\nfor i in range(1,len(a)):\n if a[i-1]=a[i]:\n cnt+=1\nprint(cnt)', 'n=int(input())\na=list(map(int,input().split()))\ncnt=0\nfor i in range(1,len(a)):\n if a[i-1]==a[i]:\n cnt+=1\nprint(cnt)', 'n=int(input())\na=list(map(int,input().split()))\ncnt=0\nfo... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s389130270', 's617029524', 's715802467', 's058638770'] | [2940.0, 2940.0, 2940.0, 3316.0] | [18.0, 18.0, 18.0, 19.0] | [119, 120, 121, 201] |
p03296 | u373047809 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['from itertools import*\nprint(sum(len(j)//2 for _, j in groupby(open(0).read().split()[1:])))', 'from itertools import*;input();print(sum(len(list(j))//2for _,j in groupby(input().split())))'] | ['Runtime Error', 'Accepted'] | ['s910126238', 's104408705'] | [3060.0, 3064.0] | [17.0, 18.0] | [92, 93] |
p03296 | u375616706 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['# python template for atcoder1\nimport sys\nsys.setrecursionlimit(10**9)\ninput = sys.stdin.readline\nN = int(input())\nA = list(map(int, input().split()))\n\nprev = -1\nseq = 1\nans = 0\nfor a in A:\n if a == prev:\n seq += 1\n else:\n prev = a\n ans += seq//2\n seq = 1\nprint(ans)\... | ['Wrong Answer', 'Accepted'] | ['s539373381', 's333414777'] | [2940.0, 3060.0] | [18.0, 18.0] | [301, 315] |
p03296 | u408375121 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['n = int(input())\na = list(map(int, input().split()))\nif n == 1:\n print(0)\nelse:\n before = a[0]\n cnt = 0\n ans = 0\n for i in range(1, n):\n if a[i] == before:\n cnt += 1\n else:\n ans += (cnt + 1) // 2\n cnt = 0\n before = a[i]\n print(ans)', 'n = int(input())\na = list(map(int, in... | ['Wrong Answer', 'Accepted'] | ['s714438251', 's511697139'] | [3060.0, 3060.0] | [18.0, 18.0] | [261, 286] |
p03296 | u426108351 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['N = int(input())\na = list(map(int, input().split()))\nnow = 0\nans = 0\nfor i in range(N):\n if a[i] == now:\n count += 1\n else:\n ans += count//2\n count = 1\n now = a[i]\n\nans += count//2\nprint(ans)', "N = int(input())\na = list(map(int, input().split()))\nnow = ''\nans = 0\nfor i in range(N):\n ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s126310627', 's387145554', 's478652496'] | [3060.0, 3060.0, 3060.0] | [17.0, 17.0, 18.0] | [205, 206, 217] |
p03296 | u434208140 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['n=int(input())\na=list(map(int,input().split()))+[0]\nc=a[0]\nt=0\ns=0\nfor i in range(n+1):\n if(c!=a[i]):\n c=a[i]\n s+=t//2\n t=1\n print(i,s)\n else:\n t+=1\nprint(s)\n', 'n=int(input())\na=list(map(int,input().split()))\nc=a[0]\nt=0\ns=0\nfor i in range(n):\n if(c!=a[i]):\n c=a[i]\n s+=t/... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s324544295', 's573933253', 's471850999'] | [3060.0, 3060.0, 3060.0] | [17.0, 18.0, 18.0] | [175, 153, 160] |
p03296 | u447219363 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['import numpy as np\nif __name__ == "__main__":\n T = input().rstrip().split(\' \')\n T = int(T[0])\n for t in range(T):\n line = input().rstrip().split(\' \')\n A = int(line[0])\n B = int(line[1])\n C = int(line[2])\n D = int(line[3])\n A_list = []\n flag = Tr... | ['Runtime Error', 'Accepted'] | ['s763173829', 's218746273'] | [20624.0, 3064.0] | [291.0, 17.0] | [1005, 363] |
p03296 | u485716382 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['N = int(input())\nsrimes = input().split(" ")\n\nresult = 0\nbefore_srime = 0\nflag = False\n\n\nfor i, srime in enumerate(srimes):\n \n \n print("i : {}, srime : {}, before_srime : {}".format(i, srime, before_srime))\n if before_srime == srime:\n print("HIT!!!!!!!!!")\n result += 1\n ... | ['Wrong Answer', 'Accepted'] | ['s493512921', 's436171878'] | [3064.0, 2940.0] | [17.0, 17.0] | [465, 456] |
p03296 | u486990800 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['import sys \nimport numpy as np\n\ninput = sys.stdin.readline\nA = int(input())\na = list(map(int, input().split()))\nsum1 = 0\nfor i in range(1,A):\n if a[i-1] == a[i]:\n sum+=1\n a[i] = 0\n\nprint(sum1)', 'import sys \nimport numpy as np\n\ninput = sys.stdin.readline\nA = int(input())\na = list(m... | ['Runtime Error', 'Accepted'] | ['s955709618', 's872327719'] | [12484.0, 12952.0] | [155.0, 174.0] | [210, 211] |
p03296 | u490553751 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ["#template\nfrom collections import Counter\ndef inputlist(): return [int(j) for j in input().split()]\n#template\nN = int(input())\na = input().split()\nli = []\ns = 1\nfor i in range(1,N):\n if a[i] != a[i-1]:\n li.append(s)\n s = 1\n continue\n if a[i] == a[i-1]:\n s +=1\nif s != '... | ['Wrong Answer', 'Accepted'] | ['s566007185', 's207718227'] | [3316.0, 3064.0] | [20.0, 17.0] | [412, 370] |
p03296 | u503111914 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['import math\nN = int(input())\nA = list(map(int,input().split()))\nresult = 0\nB = 0\nfor i in range(N-1):\n if A[i] == A[i+1]:\n B +=1\n else:\n result += int(B/2)\n B = 0\nif A[-1] == A[-2]:\n B+=1\n result += int(B/2)\nelse:\n result += int(B/2)\nprint(result)', 'N = int(input())\nA = list(map(int, i... | ['Wrong Answer', 'Accepted'] | ['s638484367', 's170988849'] | [3064.0, 9048.0] | [17.0, 27.0] | [261, 142] |
p03296 | u505420467 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['n=int(input())\na=list(map(int,input().split()))\nans=0\ncnt=1\nfor i in range(n):\n if a[i]==a[i+1]:\n cnt+=1\n else:\n ans+=cnt/2\n cnt=1\nprint(cnt)\n', 'n=int(input())\na=list(map(int,input().split()))\nans=0\ncnt=0\nfor i in range(1,n):\n if a[i]==a[i-1]:\n cnt+=1\n a[... | ['Runtime Error', 'Accepted'] | ['s882421136', 's832363841'] | [2940.0, 2940.0] | [17.0, 17.0] | [169, 143] |
p03296 | u513081876 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['import random as rd\na = int(input())\nb = rd.sample(list(range(0, 10001)), k=a)\nprint(b)\nc = print(a//2)', 'import random as rd\na = int(input())\nb = rd.sample(list(range(1, 10001)), k=a)\nprint(b)\nresult = 0\nfor num in range(0, len(b)-1):\n if b[num] == b[num+1]:\n result = result+1\n\nprint(result)'... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s455409592', 's575732044', 's428683624'] | [5608.0, 3828.0, 3060.0] | [227.0, 22.0, 17.0] | [103, 197, 200] |
p03296 | u531768068 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ["T = int(input())\ndef gcd(a,b):\n if b==0: return a\n return gcd(b, a%b)\nfor _ in range(T):\n a,b,c,d =list( map(int, input().split()) )\n a %= b\n d%=b\n d = gcd(d,b)\n if c>= b:\n print('Yes')\n continue\n x = (b-a)//d\n y = a+ x*d\n if y == b: y-=d\n if y>=c:\n print('No')\n else:\n print('Yes')", "T = int(... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s102707801', 's231515666', 's790163230'] | [3064.0, 3064.0, 3060.0] | [17.0, 17.0, 17.0] | [287, 403, 139] |
p03296 | u555962250 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['N = int(input())\na = list(map(int, input().split()))\nans = 0.1\nfor i in range(N-1):\n\tif a[i] == a[i+1]:\n\t\tans = ans + 0.5\n\telse:\n\t\tans = round(ans)+0.1\n\tprint(i,ans)\nprint(round(ans))\n', 'N = int(input())\na = list(map(int, input().split()))\nans = 0.1\nfor i in range(N-1):\n\tif a[i] == a[i+1]:\n\t\... | ['Wrong Answer', 'Accepted'] | ['s255377185', 's436850824'] | [3060.0, 3060.0] | [19.0, 18.0] | [184, 169] |
p03296 | u558782626 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['N = int(input())\npre_a = 0\ncont = 0\nans = 0\n\nfor a in input().split():\n\tif pre_a == a:\n\t\tcont += 1\n\telse:\n\t\tans += cont // 2\n\t\tcont = 1\n\tpre_a = a\n\nprint(ans)', 'N = int(input())\npre_a = 0\ncont = 0\nans = 0\n\nfor a in input().split():\n\tif pre_a == a:\n\t\tcont += 1\n\telse:\n\t\tans += cont... | ['Wrong Answer', 'Accepted'] | ['s366932074', 's840930991'] | [2940.0, 3060.0] | [17.0, 17.0] | [158, 182] |
p03296 | u572144347 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['N = int(input())\nA = list(map( int, input().split()) )\nfrom collections import defaultdict\nd = defaultdict(int)\n\nlst = []\ni = 0\nwhile i <= N-2:\n a = A[i]\n cnt = 1\n for j in range(i+1, N):\n if a == A[j]:\n cnt += 1\n else:\n break\n lst.append(cnt)\n print(i,j)\n i = j\n \n\n\n# print... | ['Wrong Answer', 'Accepted'] | ['s111787915', 's165883181'] | [3316.0, 3316.0] | [20.0, 21.0] | [489, 490] |
p03296 | u578501242 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['a =int(input())\nb =list(map(int,input().split()))\nprint(a)\nprint(b)\nx=0\nfor i in range(a-1):\n\tif b[i]==b[i+1]:\n\t\tb[i+1]=11111\n\t\tx=x+1\nprint(x)', 'a =int(input())\nb =list(map(int,input().split()))\nx=0\nfor i in range(a-1):\n\tif b[i]==b[i+1]:\n\t\tb[i+1]=11111\n\t\tx=x+1\nprint(x)'] | ['Wrong Answer', 'Accepted'] | ['s352105312', 's531420195'] | [2940.0, 2940.0] | [18.0, 17.0] | [142, 124] |
p03296 | u599547273 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['n = int(input())\ns = input()\n\nfor i in range(1, n+1):\n str_i = str(i)\n s = s.replace(str_i+" "+str_i, str_i)\n\nprint(n-len(s))', 'n = int(input())\ns = tuple(map(int, input().split(" ")))\n\ncount = 0\nbefore = None\nfor s_i in s:\n if before == s_i:\n count += 1\n before = None\n else... | ['Wrong Answer', 'Accepted'] | ['s144360314', 's336805656'] | [2940.0, 2940.0] | [17.0, 17.0] | [131, 203] |
p03296 | u616217092 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ["from sys import stdin\n\n\ndef get(l, r):\n for i in range(1, 10001):\n if i != l and i != r:\n return i\n assert False, 'damepo'\n\n\ndef main():\n N = int(stdin.readline().rstrip())\n a = [int(x) for x in stdin.readline().rstrip().split()]\n count = 0\n for i, x in enumerate(a[1:... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s868029752', 's887946415', 's796273346'] | [3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0] | [603, 779, 715] |
p03296 | u628262476 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['n = int(input())\na = list(map(int, input().split()))\nans = 0\nfor i in range(n+1):\n if i==0 or i==n & a[i-1] != a[i]:\n if i!=0:\n ans += cnt // 2\n cnt = 1\n else:\n cnt += 1\nprint(ans)', 'n = int(input())\na = list(map(int, input().split()))\nans = 0\nfor i in range(n+1):\n if i==0 or i==n or a... | ['Runtime Error', 'Accepted'] | ['s083951477', 's297665634'] | [3060.0, 3060.0] | [17.0, 17.0] | [196, 197] |
p03296 | u632369368 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['import random\n\nN = int(input())\nA = list(map(int, input().split()))\n\ncnt = 0\nC = set(range(1, N + 1))\nfor idx in range(1, N - 1):\n\n B = set([A[idx - 1:-1][0], A[idx:][0], (A[idx + 1:] + [-1])[0]])\n D = sorted(list(C - B))\n\n if len(B) != 3:\n cnt += 1\n A[idx] = random.choice(D)\n\np... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s284668154', 's780208607', 's377382434'] | [5608.0, 4208.0, 3696.0] | [48.0, 33.0, 25.0] | [312, 393, 248] |
p03296 | u636311816 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['t = int(input())\nfor i in range(t):\n able = "Yes"\n a,b,c,d = map(int, input().split())\n if a - b < 0:\n able = "No"\n else:\n x = c+(a-c)%b\n if x <= c:\n x+=d\n for i in range(1000):\n x-=b\n if x >= 0:\n if x <= c:\n ... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s011326057', 's135290774', 's233406291', 's543216944', 's659853413', 's722659655', 's863342476', 's955105561', 's988152942', 's615495825'] | [3064.0, 3064.0, 3064.0, 3064.0, 3060.0, 3064.0, 3188.0, 3064.0, 3064.0, 3064.0] | [17.0, 17.0, 19.0, 17.0, 17.0, 17.0, 19.0, 17.0, 17.0, 17.0] | [404, 404, 405, 404, 404, 404, 406, 404, 404, 141] |
p03296 | u638626579 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['N = int(input())\nS = [input() for _ in range(N)]\ns = sum([S[i-1] == S[i] or S[i] == S[i+1] for i in range(1, N, 2)])\nprint(s)', "N = int(input())\nS = input().split(' ')\ns = sum([S[i-1] == S[i] or S[i] == S[i+1] for i in range(1, N-1, 2)])\ns -= sum([S[i-1]== S[i] == S[i+1] for i in range(2, N, 2)])\nprint(s, ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s131776212', 's430283547', 's347205558'] | [2940.0, 3060.0, 2940.0] | [18.0, 18.0, 17.0] | [126, 192, 140] |
p03296 | u659640418 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['n = int(input())\na = map(int, [input() for i in range(n)])\n\nfor i in range (n-1):\n count = 0\n if a[i] == a[i+1]:\n count += 1\n for j in range(n):\n count += 1\n a[i+1] = j\n ans = min(count, ans)\nprint(ans)', 't = int(input())\na, b, c, d = map(int, input().split()... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s224104431', 's598763088', 's395933985'] | [3060.0, 3060.0, 2940.0] | [18.0, 18.0, 17.0] | [248, 157, 154] |
p03296 | u668503853 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['n=int(input())\nli = list(map(int,input().split()))\na=0\nfor i in range(1,n):\n if li[i] == li[i+1]:\n li[i] = 0\n a+=1\nprint(a) ', 'n=int(input())\nli = list(map(int,input().split()))\na=0\nfor i in range(1,n):\n if li[i] == li[i-1]:\n li[i] = 0\n a+=1\nprint(a) \n'] | ['Runtime Error', 'Accepted'] | ['s914818106', 's706833578'] | [2940.0, 2940.0] | [18.0, 18.0] | [133, 134] |
p03296 | u684743124 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['5\n1 1 1 1 1n=int(input())\nl=list(map(int,input().split()))\na=l[0]\nb=0\nc=[]\nfor i in range(1,n):\n if l[i]==a:\n b+=1\n else:\n c.append(b)\n b=0\n a=l[i]\nc.append(b)\nfor i in range(len(c)):\n c[i]=(c[i]+1)//2\nprint(sum(c))', 'n=int(input())\nl=list(map(int,input().split()))\na=l[0]\nb=0\nc=[]\nf... | ['Runtime Error', 'Accepted'] | ['s594748426', 's921672399'] | [9012.0, 9096.0] | [20.0, 28.0] | [228, 217] |
p03296 | u693953100 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['n = int(input())\na = list(map(int,input().split()))\ncnt = 1\nans = 0\nfor i in range(1,n):\n if a[i]==a[i-1]:\n cnt+=1\n else:\n ans+=cnt//2\n cnt=1\nprint(ans)', 'n = int(input())\na = list(map(int,input().split()))\ncnt = 1\nans = 0\nfor i in range(1,n):\n if a[i]==a[i-1]:\n c... | ['Wrong Answer', 'Accepted'] | ['s831218862', 's160715381'] | [3060.0, 3060.0] | [17.0, 17.0] | [179, 191] |
p03296 | u728712434 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['_ = input()\nslime = list(map(int,input().split()))\ntmp = 0\ncon = 1\nli = []\nfor s in slime:\n if tmp == s:\n con += 1\n else:\n if con != 1:\n li.append(con)\n con = 1\n tmp = s\nprint(sum([l//2 for l in li]))', '_ = input()\nslime = list(map(int,input().split()))\ntmp... | ['Wrong Answer', 'Accepted'] | ['s050062332', 's371530681'] | [3316.0, 3064.0] | [20.0, 20.0] | [245, 291] |
p03296 | u731253724 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['\n\n#A > B\n#D % B >= B - C\n\nsize = int(input())\ndata = []\nflag = 0\n\nfor i in range(size):\n ip = input().split()\n data = []\n for j in ip:\n data.append(int(j))\n \n buf = []\n\n \n data[0] = data[0] % data[1]\n if data[0] > data[3]:\n flag = 1\n \n while data[0] no... | ['Runtime Error', 'Accepted'] | ['s780791642', 's879256529'] | [3064.0, 3060.0] | [36.0, 17.0] | [717, 197] |
p03296 | u750651325 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['import sys\nimport math\nimport itertools\nimport bisect\nfrom copy import copy\nfrom collections import deque,Counter\nfrom decimal import Decimal\nimport functools\ndef s(): return input()\ndef k(): return int(input())\ndef S(): return input().split()\ndef I(): return map(int,input().split())\ndef X(): return list(... | ['Runtime Error', 'Accepted'] | ['s759562285', 's550623195'] | [9940.0, 9968.0] | [35.0, 37.0] | [633, 633] |
p03296 | u756988562 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['n = int(input())\na = list(map(int,input().split()))\na.append(10**10)\ncounter = 1\nans = 0\nfor i in range(n):\n if a[i] == a[i+1]:\n counter += 1\n else:\n if counter %2 == 0 and counter != 1 :\n ans += counter/2\n elif counte %2 != 0 and counter != 1:\n ans += int(... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s860795794', 's994836847', 's913344487'] | [3064.0, 3316.0, 3064.0] | [18.0, 22.0, 17.0] | [352, 367, 353] |
p03296 | u772588522 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['n = int(input())\nslime = [int(x) for x in input().split()]\n\npre = slime[0]\nborder = [i for i in range(n-1) if slime[i] != slime[i+1]]\n\n\nif border:\n count = sum([(border[i+1] - border[i]) // 2 for i in range(len(border) - 1)])\nelse:\n count = n // 2\nprint(count) ', 'n = int(input())\nslime = [int(x) for x ... | ['Wrong Answer', 'Accepted'] | ['s397738469', 's047819053'] | [3060.0, 3060.0] | [17.0, 17.0] | [334, 278] |
p03296 | u785578220 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['n = input()\na=list(map(int, input().split()))\nt=a[0]\ns=0\nAns=0\nfor i in range(1,n):\n if t==a[i]:\n s+=1\n else:\n Ans+=s//2\n s=0\n t=a[i]\nprint(Ans)\n \n \n ', 'n = int(input())\na=list(map(int, input().split()))\nt=a[0]\ns=0\nAns=0\nfor i in range(1,n):\n if t==a[i]:\n s+=1\n else:\n A... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s005113268', 's032195881', 's566216144', 's591004227', 's959311300', 's720837236'] | [2940.0, 3060.0, 3064.0, 3064.0, 3060.0, 3060.0] | [19.0, 18.0, 18.0, 18.0, 18.0, 18.0] | [165, 171, 265, 265, 171, 181] |
p03296 | u826263061 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['n = int(input())\na = list(map(int, input().split()))\n\ncnt = 0\npre = 0\nfor i in range(n):\n if prev == a[i]:\n cnt += 1\n prev = 0\n else:\n prev = a[i]\n\nprint(cnt)', 'n = int(input())\na = list(map(int, input().split()))\n\ncnt = 0\nprev = 0\nfor i in range(n):\n if prev == a[i]:\... | ['Runtime Error', 'Accepted'] | ['s923498813', 's942772454'] | [3060.0, 2940.0] | [17.0, 18.0] | [185, 186] |
p03296 | u841021102 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['n = int(input())\narr = list(map(int, input().split()))\nfrom numpy import random\nb = 0\nfor i in range (len(a) - 1) :\n if a[i] == a[i + 1]:\n b += 1\n a[i + 1] = random.randint(10000)\nprint(b)\n', 'from numpy import random\nn = int(input())\na = list(map(int, input().split()))\nb = 0\nfor i in range (len(a... | ['Runtime Error', 'Accepted'] | ['s091046470', 's066413501'] | [27144.0, 27124.0] | [155.0, 114.0] | [196, 194] |
p03296 | u845333844 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['n=int(input())\na=list(map(int,input().split()))\n\ni=1\ncount=0\n\nwhile i<n:\n if a[i]=a[i-1]:\n count+=1\n i+=2\n else:\n i+=1\n\nprint(count)', 'n = int(input())\na = list(map(int,input().split()))\n\ni = 1\ncount = 0\n\nwhile i < n:\n if a[i] = a[i-1]:\n count += 1\n i += 2\n else:\n i ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s352744108', 's898226816', 's387631032'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [143, 165, 144] |
p03296 | u853900545 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['n = int(input())\na = list(map(int,input().split()))\n\nc = 0\ni = 0\nans = 0\nwhile i < n:\n if a[i] == a[i+1]:\n c += 1\n i += 1\n else:\n ans += c//2\n c = 0\n i += 1\nprint((ans+c//2,ans)[c==0])', 'n = int(input())\na = list(map(int,input().split()))\n\nc = 0\ni = 0\nans =... | ['Runtime Error', 'Accepted'] | ['s924347415', 's223690288'] | [3064.0, 3064.0] | [18.0, 18.0] | [225, 235] |
p03296 | u859210968 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['N = int(input())\nL = list(map(int, input().split()))\nd = [(L[i+1]-L[i]) for i in range(len(L)-1)]\nb = False\nc = 0\nans = 0\nfor i in d:\n if i==0:\n b = True\n else :\n b = False\n if b:\n c += 1\n else :\n ans += (-(-c//2))\n c = 0\nprint(ans)', 'N = int(input())\nL... | ['Wrong Answer', 'Accepted'] | ['s197145869', 's060542773'] | [3064.0, 3064.0] | [17.0, 18.0] | [279, 307] |
p03296 | u870998297 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nN = int(input())\nA = [list(map(int, input().split())) for _ in range(N)]\n\ncount = 0\ntmp = 1\nfor i in range(1, N+1):\n if A[i] == A[i - 1]:\n tmp += 1\n else:\n \n count += tmp // 2\n tmp = 1 \n\nprint(count)\n', '#!/usr/bin/env ... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s362661585', 's621360753', 's729658845', 's246460407'] | [3056.0, 3060.0, 3060.0, 3060.0] | [17.0, 17.0, 18.0, 17.0] | [332, 525, 330, 320] |
p03296 | u883048396 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['iN = int(input())\naS = map(int,input().split())\n\niCounter = 0\nfor i in range(1,iN-1):\n if aS[i] == aS[i-1]:\n if aS[i] == aS[i+1]:\n aS[i] += 1\n iCounter += 1\n else:\n iU = max(aS[i],aS[i+1])\n if iU < 10000:\n iU += 1\n else:\n while iU not in aS[i:i+2]:\n ... | ['Runtime Error', 'Accepted'] | ['s985346766', 's526380194'] | [3064.0, 3188.0] | [17.0, 19.0] | [365, 919] |
p03296 | u896741788 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['n=int(input())\nfrom itertools import groupby as gb\nans=0\nfor a,b in gb(list(map(int,input().split()))):\n ans+=b//2\nprint(ans)', 'n=int(input())\nfrom itertools import groupby as gb\nans=0\nfor a,b in gb(list(map(int,input().split()))):\n ans+=len(list(b)) //2\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s427650179', 's468083288'] | [3060.0, 3188.0] | [18.0, 18.0] | [128, 140] |
p03296 | u904804404 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['N = int(input())\nl = list(map(int,input().split(" ")))\nnum_n =[]\ni=1\nfor j in range(N-1):\n if l[j] == l[j+1]:\n i+=1\n else:\n num_n.append(int(i/2))\n i=1\nprint(sum(num_n))', 'N = int(input())\nl = list(map(int,input().split(" ")))\nnum_n =[]\ni=1\nfor j in range(N-1):\n if l[j] =... | ['Wrong Answer', 'Accepted'] | ['s145446468', 's317211219'] | [3060.0, 3064.0] | [17.0, 17.0] | [196, 225] |
p03296 | u955251526 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['n = int(input())\na = list(map(int, input().split()))\na = [0] + a\nfor i in range(n):\n if a[i+1] == a[i]:\n a[i] = -1\nprint(a.count(-1))', 'n = int(input())\na = list(map(int, input().split()))\na = [0] + a\nfor i in range(n):\n if a[i+1] == a[i]:\n a[i+1] = -1\nprint(a.count(-1))'] | ['Wrong Answer', 'Accepted'] | ['s114257329', 's601588580'] | [2940.0, 3060.0] | [17.0, 17.0] | [143, 145] |
p03296 | u957872856 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['import math\nn = int(input())\nA = [int(i) for i in input().split()]\ncnt, ans = 0, 0\nfor i in range(n):\n if A[i] == A[i+1]:\n cnt += 1\n else:\n ans += math.floor((cnt+1)/2)\n cnt = 0\nprint(ans)', 'import math\nn = int(input())\nA = [int(i) for i in input().split()]\ncnt, ans = 0, 0\nfor i in range(n-1... | ['Runtime Error', 'Accepted'] | ['s405881840', 's256666318'] | [3060.0, 3060.0] | [17.0, 18.0] | [199, 253] |
p03296 | u961683878 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ["T = int(input())\na = []\nfor i in range(T):\n a.append(list(map(int, input().split())))\nfor r in a:\n s, b, c, d = r[0], r[1], r[2], r[3]\n mod_list = []\n if (s < b) or (b>d):\n print('No')\n continue\n if (c>b):\n print('Yes')\n continue\n while True:\n s = s%b... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s076598981', 's431133827', 's732200671'] | [3064.0, 3064.0, 4848.0] | [17.0, 17.0, 21.0] | [475, 469, 282] |
p03296 | u966378542 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['N = input()\ndata = input().split()\nbef = -1\ncount = 0\nresult = 0\n\nfor i in range(len(data)):\n\tt = int(data[i])\n\tif bef != t:\n\t\tif count > 1:\n\t\t\tresult += int(count) / 2\n\t\t\tprint(result)\n\t\tcount = 1\n\t\tbef = t\n\telse:\n\t\tcount += 1\n\nif count > 1:\n\tresult += int(count / 2)\nprint(result... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s080223372', 's106056196', 's107798020', 's408720802', 's656732440'] | [3064.0, 3064.0, 2940.0, 2940.0, 3064.0] | [17.0, 41.0, 17.0, 17.0, 18.0] | [282, 265, 216, 221, 265] |
p03296 | u967835038 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['n=int(input())\na=[]\na=map(int,input().split())\nans=0\nflag=0\nchangeflag=[]\nchangeflag.append(0)\nfor i in range(n-1):\n if a[i]==a[i+1]:\n if i==0:\n changeflag.append(1)\n ans+=1\n elif changeflag[i-1]==1:\n changeflag.append(0)\n else:\n ans+=... | ['Runtime Error', 'Accepted'] | ['s282516969', 's593849447'] | [3064.0, 2940.0] | [17.0, 17.0] | [388, 295] |
p03296 | u970809473 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ['n = int(input())\na = list(map(int, input().split()))\ntmp = 1\nres = 0\nfor i in range(1,n):\n if a[i-1] == a[i]:\n tmp += 1\n else:\n res += tmp//2\n tmp = 1\nprint(res)', 'n = int(input())\na = list(map(int, input().split()))\ntmp = 1\nres = 0\nfor i in range(1,n):\n if a[i-1] == a[i]:\n tmp += 1\n ... | ['Wrong Answer', 'Accepted'] | ['s612247364', 's282334861'] | [3060.0, 3060.0] | [18.0, 19.0] | [172, 186] |
p03296 | u977642052 | 2,000 | 1,048,576 | Takahashi lives in another world. There are slimes (creatures) of 10000 colors in this world. Let us call these colors Color 1, 2, ..., 10000. Takahashi has N slimes, and they are standing in a row from left to right. The color of the i-th slime from the left is a_i. If two slimes of the same color are adjacent, they ... | ["def main(n: int, a: list):\n prev = [0, 0]\n ans = 0\n\n for _a in a:\n if _a == prev[0]:\n if prev[1] % 2 == 0:\n ans += 1\n\n prev[1] += 1\n else:\n prev = [_a, 0]\n\n print(ans)\n\n\nif __name__ == '__main__':\n n = int(input())\n a = ... | ['Runtime Error', 'Accepted'] | ['s907330370', 's605849730'] | [3060.0, 3060.0] | [17.0, 17.0] | [342, 342] |
p03298 | u034128150 | 3,000 | 1,048,576 | You are given a string S of length 2N consisting of lowercase English letters. There are 2^{2N} ways to color each character in S red or blue. Among these ways, how many satisfy the following condition? * The string obtained by reading the characters painted red **from left to right** is equal to the string obtaine... | ["from collections import defaultdict\nN = int(input())\nS = input()\ncountp = defaultdict(int)\ncounts = defaultdict(int)\nprefix = S[:N]\nsuffix = S[2*N-1:N-1:-1]\nfor i in range(1 << (N - 1)):\n p1 = ''\n s1 = ''\n p2 = ''\n s2 = ''\n for j in range(N):\n if (1 << j) & i:\n p1 += pre... | ['Wrong Answer', 'Accepted'] | ['s035946366', 's171892065'] | [135304.0, 116664.0] | [1716.0, 1507.0] | [614, 616] |
p03298 | u543000780 | 3,000 | 1,048,576 | You are given a string S of length 2N consisting of lowercase English letters. There are 2^{2N} ways to color each character in S red or blue. Among these ways, how many satisfy the following condition? * The string obtained by reading the characters painted red **from left to right** is equal to the string obtaine... | ['N = int(input())\nS = input()\nS_l = S[:N]\nS_r = S[N:][::-1]\ndict_l = {}\ndict_r = {}\nans = 0\nfor num in range(2**N):\n tmpl_1 = ""\n tmpl_2 = ""\n tmpr_1 = ""\n tmpr_2 = ""\n for n in range(N):\n if (num >> (N-1-n) & 1):\n tmpl_1 += S_l[n]\n tmpr_1 += S_r[n]\n else:\n tmpl_2 += S_l[n]\n... | ['Runtime Error', 'Accepted'] | ['s223836370', 's481288595'] | [9228.0, 71460.0] | [29.0, 2313.0] | [515, 524] |
p03298 | u543954314 | 3,000 | 1,048,576 | You are given a string S of length 2N consisting of lowercase English letters. There are 2^{2N} ways to color each character in S red or blue. Among these ways, how many satisfy the following condition? * The string obtained by reading the characters painted red **from left to right** is equal to the string obtaine... | ['from collections import defaultdict as dd\n\nn = int(input())\n_s = list(map(ord, list(input())))\ns,t = _s[:n], _s[:n-1:-1]\nd = dict()\nmod = 10**9 + 9\n\ndef get(st):\n for bit in range(1<<n):\n u = v = 0\n for j,e in enumerate(s):\n if bit & (1<<j):\n u = (u*100 + e)%mod\n else:\n v... | ['Wrong Answer', 'Accepted'] | ['s434379885', 's822547564'] | [48988.0, 94552.0] | [2800.0, 2987.0] | [425, 426] |
p03298 | u562016607 | 3,000 | 1,048,576 | You are given a string S of length 2N consisting of lowercase English letters. There are 2^{2N} ways to color each character in S red or blue. Among these ways, how many satisfy the following condition? * The string obtained by reading the characters painted red **from left to right** is equal to the string obtaine... | ['import itertools\nN=int(input())\nS=input()\nans=0\nL=dict()\nR=dict()\nfor seq in itertools.product([0,1],repeat=N):\n T0=""\n T1=""\n T2=""\n T3=""\n for i in range(N):\n if seq[i]==0:\n T0+=S[i]\n T2+=S[-i-1]\n else:\n T1+=S[i]\n T3+=S[-i-1]\... | ['Wrong Answer', 'Accepted'] | ['s008459364', 's175774221'] | [93528.0, 127512.0] | [3060.0, 2981.0] | [498, 592] |
p03298 | u692336506 | 3,000 | 1,048,576 | You are given a string S of length 2N consisting of lowercase English letters. There are 2^{2N} ways to color each character in S red or blue. Among these ways, how many satisfy the following condition? * The string obtained by reading the characters painted red **from left to right** is equal to the string obtaine... | ['import collections\n\nn = int(input())\ns = input()\n\ns1 = s[:n]\ns2 = s[-1:-(n + 1):-1]\n\ns_1 = collections.defaultdict(int)\ns_2 = collections.defaultdict(int)\nfor i in range(2 ** n):\n bin_i = bin(i + 2 ** n)\n sequence1 = ""\n sequence1_inverse = ""\n sequence2 = ""\n sequence2_inverse = ""\n ... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s045795808', 's787922459', 's449358351'] | [126028.0, 2940.0, 90056.0] | [2912.0, 17.0, 2975.0] | [728, 776, 775] |
p03298 | u839188633 | 3,000 | 1,048,576 | You are given a string S of length 2N consisting of lowercase English letters. There are 2^{2N} ways to color each character in S red or blue. Among these ways, how many satisfy the following condition? * The string obtained by reading the characters painted red **from left to right** is equal to the string obtaine... | ["n = int(input())\ns = input()\n\nsl = s[:n]\nsr = s[:n-1:-1]\n\nfrom collections import Counter\nl = Counter()\nr = Counter()\n\nfrom itertools import product\nfor m in product([False, True], repeat=n):\n key = [sl[i] for i in range(n) if not m[i]]\n key += ['-']\n key += [sl[i] for i in range(n) if m[i]]\n l[''.... | ['Wrong Answer', 'Accepted'] | ['s738517224', 's266847983'] | [65480.0, 65480.0] | [3158.0, 2963.0] | [522, 508] |
p03307 | u003501233 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['N=int(input())\nif N % 2 = 0:\n print(N)\nelse:\n print(N*2)', 'N=int(input())\nif N // 2 = 0:\n print(N)\nelse:\n print(2*N)', 'N=int(input())\nif N // 2 = 0:\n print(N)\nelse:\n print(N*2)', 'N=int(input())\nif N % 2 == 0:\n print(N)\nelse:\n print(N*2)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s190720696', 's915777080', 's919787522', 's008848035'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0] | [58, 59, 59, 59] |
p03307 | u003928116 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['n=int(input())\nif n%2=0:\n print(n)\nelse:\n print(2*n)', 'n=int(input())\nif n%2==0:\n print(n)\nelse:\n print(2*n)'] | ['Runtime Error', 'Accepted'] | ['s005823623', 's365229939'] | [2940.0, 2940.0] | [17.0, 18.0] | [54, 55] |
p03307 | u006721330 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['n = int(input()) \nrow = map(int, input().split())\nmax = row[0]\nmin = 0\n\nfor i in range(n-1):\n if(row[i] < row[i+1]):\n max = row[i+1]\n\nfor i in range(n-1):\n if(row[i] > row[i+1]):\n min = row[i+1]\n\nprint(max-min)\n \n\n\n', 'if N%2==0:\n print(2)\nelse:\n print(2*N)', 'n = int(... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s173068289', 's253898578', 's785452938', 's820829648', 's911985668', 's959530937', 's871492389'] | [3060.0, 2940.0, 2940.0, 3060.0, 3060.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0, 18.0, 17.0, 17.0, 17.0] | [238, 44, 251, 287, 249, 243, 66] |
p03307 | u011559420 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ["#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\ndef main():\n\tN = input()\n\twhile i % 2 == 0:\n i = N / 2\n\tprint(i*2)\n\nif __name__ == '__main__':\n\tmain()\n\n", "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n \ndef main():\n\tN = int(input())\n\tif N % 2 == 0:\n\t\tprint(int(N))\n\telse:\n\t\tprint(... | ['Runtime Error', 'Accepted'] | ['s986890764', 's889676748'] | [2940.0, 2940.0] | [17.0, 17.0] | [157, 172] |
p03307 | u015315385 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['from statistics import median\n\nn = input()\na = list(map(int, input().split()))\n\nb = [v - (i + 1) for i, v in enumerate(a)]\n\nmedian = int(median(b))\n\nc = sum(abs(v - median) for v in b)\n\nprint(c)\n', 'n = int(input())\n\nif n % 2 == 0:\n print(n)\nelse:\n print(n * 2)'] | ['Runtime Error', 'Accepted'] | ['s927943235', 's714812442'] | [5104.0, 2940.0] | [36.0, 17.0] | [195, 68] |
p03307 | u017415492 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['n=int(input())\nif n%2:\n print(n)\nelse:\n print(n*2)', 'n=int(input())\nif n%2:\n print(n*2)\nelse:\n print(n)'] | ['Wrong Answer', 'Accepted'] | ['s423095915', 's368986920'] | [2940.0, 2940.0] | [17.0, 17.0] | [52, 52] |
p03307 | u018679195 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['# -*-coding=utf-8-*-\nn = int(input))\nif n%2:\n n *= 2\nprint(n)', 'line = input()\nX = [int(n) for n in line.split()]\n\nsmaller_divisible_number = X\nif num%2 != 0:\n smaller_divisible_number *= 2\nprint(smaller_divisible_number)', '#!/usr/bin/env python3\nnumero = int(input("escreva o numero "))\nif (numero... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s303323559', 's405337032', 's431038398', 's654921552', 's616951038'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 18.0, 17.0, 17.0, 17.0] | [64, 160, 128, 177, 62] |
p03307 | u023229441 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['n=int(input())\nA=list(map(int,input().split()))\nq=0\nZ=[]\nfor b in range(max(A)-min(A)):\n q=0\n for j in range(n):\n q+=abs(A[j]-b-min[A]-j-1)\n Z.append(q)\nprint(min(Z))\n', 'n=int(input())\nif n%2==0:\n print(n)\nelse:\n print(n*2)\n'] | ['Runtime Error', 'Accepted'] | ['s365639357', 's340931976'] | [3060.0, 2940.0] | [18.0, 17.0] | [173, 56] |
p03307 | u029169777 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['N=int(input())\n\nif N%==0:\n print(N)\nelse:\n print(2*N)', 'N=int(input())\n\nif N%2==0:\n print(N)\nelse:\n print(2*N)'] | ['Runtime Error', 'Accepted'] | ['s782817499', 's254142352'] | [2940.0, 2940.0] | [17.0, 18.0] | [55, 56] |
p03307 | u031391755 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['n = int(input())\nn_list = list(map(int,input().split()))\nn_list.sort()\nprint(n_list[-1] - n_list[0])', 'n = input()\nif n%2 == 0:\n print(n)\nelse :\n print(n*2)', 'n = int(input())\nif n%2 == 0:\n print(n)\nelse :\n print(n*2)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s477068542', 's653545909', 's762460828'] | [2940.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0] | [100, 55, 60] |
p03307 | u036493199 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['n = input()\n\nif n % 2 == 0:\n print(n)\nelse:\n print(n * 2)', 'n = int(input())\n\nif n % 2 == 0:\n print(n)\nelse:\n print(n * 2)'] | ['Runtime Error', 'Accepted'] | ['s902803565', 's601577092'] | [2940.0, 2940.0] | [17.0, 17.0] | [59, 64] |
p03307 | u050708958 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['n=input()\nif n%2 == 0:\n print(n)\nelse:\n print(n*2)', 'n = int(input())\nif n % 2 == 0:\n print(n)\nelse:\n print(n*2)'] | ['Runtime Error', 'Accepted'] | ['s621351093', 's423509048'] | [2940.0, 2940.0] | [17.0, 17.0] | [50, 61] |
p03307 | u051496905 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['xN =int(input())\nl = N * 2\nif N % 2 == 0:\n print(N)\nelse:\n print(N*2)', 'N =int(input())\nl = N * 2\nif N % 2 == 0:\n print(N)\nelse:\n print(N*2)\n# if 2 * N % 0 and N * N % 0'] | ['Runtime Error', 'Accepted'] | ['s511925809', 's938016893'] | [2940.0, 2940.0] | [17.0, 17.0] | [75, 103] |
p03307 | u057429331 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['N = int(input())\nA = list(map(int, input().split()))\nfor i in range(N):\n A[i] = A[i] - i - 1\nA = sorted(A)\nmedN = N//2\nx = 0\nfor i in range(N):\n x = x + abs(A[i] - A[medN])\nprint(x)', 'N = int(input())\nA = list(map(int, input().split()))\nfor i in range(N):\n A[i] = A[i] - i-1\nsorted(A)\nhalfN = i... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s254961636', 's373073683', 's071289472'] | [3060.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0] | [187, 187, 61] |
p03307 | u060793972 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['n = int(input(9))\nif n % 2 == 0:\n print(n)\nelse:\n print(n*2)', 'n = int(input())\nif n % 2 == 0:\n print(n)\nelse:\n print(n*2)\n'] | ['Wrong Answer', 'Accepted'] | ['s135434527', 's841474399'] | [2940.0, 2940.0] | [17.0, 17.0] | [66, 66] |
p03307 | u061982241 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['N = int(input())\nA = list(map(int,input().split()))\nk = 0\nS = 0\n\nif N%2 == 0:\n k = (N+1)*N//2\nelse:\n k = (N+1)*(N//2)+(N+1)//2\n\nSum_A = sum(A) \nb = (sum_A-k)//N\n\nprint(sum_A-(b*N+k))', 'N = int(input())\nif N%2 == 0:\n print(N)\nelse:\n print(N*2)'] | ['Runtime Error', 'Accepted'] | ['s909745973', 's868457872'] | [3064.0, 2940.0] | [17.0, 17.0] | [191, 63] |
p03307 | u062484507 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['n = int(input())\na = sorted(map(int,input().split()))\nprint(a[n-1]-a[0])', 'n = int(input())\nif n % 2 == 0:\n\tprint(n)\nelse:\n \tprint(n*2)'] | ['Runtime Error', 'Accepted'] | ['s107798387', 's093453493'] | [2940.0, 2940.0] | [17.0, 17.0] | [72, 61] |
p03307 | u064563749 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['N=int(input())\nif N%2=0:\n ans=N\nelse:\n ans=N*2\nprint(ans)', 'N=int(input())\nif N%2==0:\n ans=N\nelse:\n ans=N*2\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s799722533', 's323330534'] | [2940.0, 2940.0] | [17.0, 17.0] | [63, 65] |
p03307 | u071916806 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['n=int(input())\nif n%2==0:\n print(n)\nelse:\n print(2n)', 'n=int(input())\nif n%2==0:\n print(n)\nelse:\n print(2*n)'] | ['Runtime Error', 'Accepted'] | ['s627312161', 's570092482'] | [2940.0, 2940.0] | [17.0, 17.0] | [54, 55] |
p03307 | u074445770 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['N=int(input())\na=list (map(int,input().split()))\nabs_list=[]\nfor b in range(-max(a),max(a)):\n\tc=0\n\tfor i in range(N):\n\t\tc=abs(a[i]-(b+i+1))+c\t\n\tabs_list.append(c)\t\t\nprint(min(abs_list))\t', 'N=int(input())\na=list (map(int,input().split()))\nabs_list=[]\nfor b in range(-max(a),max(a)):\n\tc=0\n\tfor i... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s487608745', 's927262774', 's173135477'] | [3060.0, 3060.0, 2940.0] | [17.0, 18.0, 17.0] | [186, 202, 54] |
p03307 | u079022116 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['n=int(input())\nif n%2==0:print(n)\nelse:print(n//2)', 'n=int(input())\nif n%2==0:print(n)\nelse:print(2*n)'] | ['Wrong Answer', 'Accepted'] | ['s593832888', 's483180043'] | [2940.0, 2940.0] | [17.0, 17.0] | [50, 49] |
p03307 | u094565093 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['a=2\nb=int(input())\nx=a*b\nif a>b:\n tmp=a\n b=a\n a=tmp\nr=b%a\nwhile r!=0:\n a=b\n b=r\n r=a%b\nprint(x/b)', 'n = int(input())\nif n % 2 == 0:\n print(str(n))\nelse:\n print(str(n*2))'] | ['Wrong Answer', 'Accepted'] | ['s286900208', 's214063014'] | [3060.0, 2940.0] | [17.0, 17.0] | [115, 75] |
p03307 | u098988096 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['n = int(input())\nif n&1:\n print(2*n)\nelse\n print(n)\n', 'n = int(input())\nif n&1:\n print(2*n)\nelse:\n print(n)\n'] | ['Runtime Error', 'Accepted'] | ['s982648589', 's962940759'] | [2940.0, 2940.0] | [17.0, 17.0] | [58, 59] |
p03307 | u099566485 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['import copy\ninput()\na=[int(i) for i in input().split()]\nsa=copy.copy(a)\nfor i in range(len(a)):\n sa[i]=sa[i]-(i+1)\nsa.sort()\nmsa=sa[int(len(sa)/2)]\nsb=0\nfor i in range(len(a)):\n sb=sb+abs(a[i]-(msa+i+1))\nprint(sb)', 'import copy\ninput()\na=[int(i) for i in input().split()]\nsa=copy.copy(a)\nfor i in... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s122804426', 's385737206', 's530042035', 's798651030', 's967933959', 's129674799'] | [3444.0, 3444.0, 3444.0, 3444.0, 3064.0, 2940.0] | [23.0, 22.0, 22.0, 22.0, 17.0, 17.0] | [219, 215, 219, 279, 62, 62] |
p03307 | u099918199 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['\n#include <string>\n#include <fstream>\n#include <cmath>\n\nusing namespace std;\n\nint main() {\n \n\n int n;\n cin >> n;\n if (n%2 == 0){\n cout << n << endl;\n }else{\n cout << 2 * n << endl;\n }\n\n\n}\n', 'n = int(input())\nif n%2 == 0:\n\tprint(n)\nelse:\n\tprint(n*2)'] | ['Runtime Error', 'Accepted'] | ['s844809330', 's314536365'] | [3064.0, 9148.0] | [17.0, 30.0] | [239, 57] |
p03307 | u102126195 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['N = int(input())\ni = 2\nwhile True:\n if i / N == 0:\n print(i)\n break\n i += 2', 'N = int(input())\ni = 2\nif N % 2 == 0:\n print(N)\nelse:\n print(N * 2)\n'] | ['Time Limit Exceeded', 'Accepted'] | ['s864805107', 's193504853'] | [2940.0, 2940.0] | [2104.0, 17.0] | [95, 74] |
p03307 | u106297876 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['import statistics\nN = int(input())\nA = list(map(int, input().split()))\n\nfor i in range(N):\n\tA[i] = A[i] - (i+1)\nA.sort()\n\nif N % 2 == 0:\n\tmed1 = A[N // 2 - 1]\n\tmed2 = A[N //2]\n\tans = min(sum([abs(a - med1) for a in A]), sum([abs(a - med2) for a in A]))\n\nelse:\n\tmed = A[N // 2]\n\tans = sum([abs(a - ... | ['Runtime Error', 'Accepted'] | ['s441435289', 's669092272'] | [5404.0, 2940.0] | [41.0, 17.0] | [327, 67] |
p03307 | u109959065 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['\nN = input()\n\ni = N + 1\nwhile True:\n if(i % 2 == 0 and i % N == 0):\n break\n i = i + 1\n\nprint(i)\n', '\nN = int(input())\n\nif(N % 2 == 0):\n print(N)\nelse:\n print(2 * N)\n'] | ['Runtime Error', 'Accepted'] | ['s244616819', 's665137349'] | [8952.0, 9000.0] | [23.0, 26.0] | [109, 71] |
p03307 | u113177927 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['# -*- coding: utf-8 -*-\n\na = int(input())\n\nb = input().split()\nb.sort()\nmin = b[0]\nb.reverse()\nmax = b[0]\nprint(int(max)-int(min))', '# -*- coding: utf-8 -*-\ndef gcd(x, y):\n while x % y:\n x, y = y, x % y\n return y\n\ndef lcm(x, y):\n return (x * y) // gcd(x, y)\n\n\nn = int(input())\nprin... | ['Runtime Error', 'Accepted'] | ['s483002711', 's349615441'] | [2940.0, 2940.0] | [17.0, 17.0] | [188, 193] |
p03307 | u115682115 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['import math\nN = int(input())\n\na = 2 * N / math.gcd(2, N)\n\nprint(a)', 'N = int(input())\nif N%2==0:\n print(N)\nelif N%2!=0:\n print(2*N)'] | ['Runtime Error', 'Accepted'] | ['s270967634', 's975529871'] | [2940.0, 2940.0] | [17.0, 17.0] | [66, 68] |
p03307 | u120431259 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['N = input()\n\nif N % 2 != 0:\n answer = N * 2\n print(answer)\nelse:\n print(N)\n', 'N = int(input())\n\nif N % 2 != 0:\n answer = N * 2\n print(answer)\nelse:\n print(N)\n'] | ['Runtime Error', 'Accepted'] | ['s937616807', 's289812662'] | [2940.0, 2940.0] | [17.0, 17.0] | [84, 89] |
p03307 | u124070765 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['n=int(input())\nfor i in range(2*n):\n if i % 2 == 0 and i % n == 0:\n print(i)\n exit()', 'n=int(input())\nprint(n if n%2==0 else n*2)'] | ['Wrong Answer', 'Accepted'] | ['s664089439', 's892993782'] | [2940.0, 2940.0] | [17.0, 18.0] | [101, 42] |
p03307 | u124498235 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['n = int(input())\nif n%2 == 0:\n\tprint (n):\nelse:\n\tprint (n*2)', 'n = int(input())\nif n%2 == 0:\n\tprint (n)\nelse:\n\tprint (n*2)'] | ['Runtime Error', 'Accepted'] | ['s934117599', 's342050111'] | [2940.0, 2940.0] | [17.0, 17.0] | [60, 59] |
p03307 | u124762318 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['n = input()\nif n % 2 == 0:\n print(n)\nelse:\n print(n*2)\n', 'n = int(input())\nif n % 2 == 0:\n print(n)\nelse:\n print(n*2)\n'] | ['Runtime Error', 'Accepted'] | ['s298640256', 's875105871'] | [2940.0, 2940.0] | [17.0, 17.0] | [61, 66] |
p03307 | u125666426 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['N = int(input())\n\nA = list(map(int, input().split()))\n\nprint(max(A) - min(A))\n', 'N = int(input())\n\nif N % 2 == 0:\n print(N)\nelse:\n print(N * 2)\n'] | ['Runtime Error', 'Accepted'] | ['s608756496', 's138565350'] | [2940.0, 2940.0] | [17.0, 17.0] | [78, 69] |
p03307 | u129978636 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['N = int(input())\n\nt = N //2 \nintger = []\n\nfor n in range(t):\n intg = N / 2\n intger.append(intg)\n N = intg\n \nintgersorted = sorted(intger)\n\nprint(intger[0])', 'N = int(input())\n\nif( N % 2 == 1):\n print( N * 2)\n \nelse:\n print(N)'] | ['Runtime Error', 'Accepted'] | ['s314665695', 's430624555'] | [262424.0, 2940.0] | [2120.0, 17.0] | [159, 70] |
p03307 | u135572611 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['n = int(input())\nif n % 2 == 0:\n print n\nelse:\n print n * 2', 'n = int(input())\nif n % 2 == 0:\n print(n)\nelse:\n print(n * 2)'] | ['Runtime Error', 'Accepted'] | ['s913119385', 's964203478'] | [2940.0, 2940.0] | [17.0, 17.0] | [61, 63] |
p03307 | u136869985 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['a=input()\nif a % 2 == 0:\n print(a)\nelse:\n print(a * 2)', 'a=int(input())\nif a % 2 == 0:\n print(a)\nelse:\n print(a * 2)\n'] | ['Runtime Error', 'Accepted'] | ['s992395857', 's751308173'] | [2940.0, 2940.0] | [17.0, 18.0] | [56, 62] |
p03307 | u137667583 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['N = int(input())\nA = list(map(int,input().split()))\nck = 10000000000\nfor b in range(0,max(A)):\n k = 0\n for i in range(0,N):\n k = k + abs(A[i] - (b+i+1))\n if k < ck:\n ck = k\n elif k >= ck:\n print(ck)\n break\n', 'N = int(input())\nfor i in range(1,N*2):\n if i%N == ... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s305063375', 's975628330', 's276045240'] | [2940.0, 3316.0, 2940.0] | [17.0, 2103.0, 17.0] | [246, 101, 47] |
p03307 | u140251125 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['import math\n# input\nN = input()\n\ndef lcm_base(x, y):\n return (x * y) // math.gcd(x, y)\n\nprint(lcm_base(2, N))', '# input\nN = int(input())\n\nif N % 2 == 0:\n print(N)\nelse:\n print(N * 2)'] | ['Runtime Error', 'Accepted'] | ['s369344050', 's360354097'] | [2940.0, 2940.0] | [17.0, 17.0] | [112, 76] |
p03307 | u161537170 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['size = int(input())\nA = list(map(int,input().split()))\ni = list(range(1,size+1))\n\nremain_list = [A-i for(A,i) in zip(A,i)]\nwhile(True):\n zero_count = len([i for i in remain_list if i ==0])\n minus_count = len([i for i in remain_list if i <0])\n plus_count = len([i for i in remain_list if i > 0])\n\n ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s235690799', 's978117709', 's099507966'] | [3064.0, 3064.0, 2940.0] | [17.0, 18.0, 17.0] | [712, 712, 74] |
p03307 | u161693347 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ["def INT(): return int(input())\n\ndef main():\n N = INPUT()\n \n if N % 2 == 0:\n print(N)\n else:\n print(2*N)\n\nif __name__ == '__main__':\n main()\n", "def INT(): return int(input())\n\ndef main():\n N = INT()\n \n if N % 2 == 0:\n print(N)\n else:\n print(2*... | ['Runtime Error', 'Accepted'] | ['s816874446', 's966077367'] | [2940.0, 2940.0] | [17.0, 17.0] | [169, 167] |
p03307 | u167745716 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['a = int(input())\nitems = input().split(" ")\nnums = []\nfor i in range(a):\n nums.append(int(items[i]))\nmax_num = max(nums)\nmin_num = min(nums)\nprint(max_num - min_num)', 'a = int(input())\n\nif a % 2 == 0:\n print(a)\nelse:\n print(a * 2)'] | ['Runtime Error', 'Accepted'] | ['s821536254', 's886780904'] | [3060.0, 2940.0] | [17.0, 17.0] | [166, 64] |
p03307 | u175590965 | 2,000 | 1,048,576 | You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N. | ['n = input()\nif n % 2 ==0:\n print(n)\nelse:\n print(n*2)', 'n = int(input())\nif n % 2 ==0:\n print(n)\nelse:\n print(n*2)\n'] | ['Runtime Error', 'Accepted'] | ['s511886212', 's040833413'] | [2940.0, 2940.0] | [18.0, 17.0] | [59, 65] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.