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
p03307
u599925824
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())\nprint(N if N/N or N/2 else int(N)*2)', 'N = int(input())\nprint(N if N%2==0 and N/N else int(N)*2)']
['Wrong Answer', 'Accepted']
['s486799591', 's360075311']
[2940.0, 3064.0]
[17.0, 17.0]
[53, 57]
p03307
u601082779
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());print(a+(a%2>0))', 'a=int(input());print(a+(a%2>0)*a)']
['Wrong Answer', 'Accepted']
['s457860610', 's546168075']
[2940.0, 2940.0]
[17.0, 17.0]
[31, 33]
p03307
u602677143
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 = 0\nwhile True:\n if n*i % 2 == 0:\n print(n*i)\n break\n i += 1', 'n = int(input())\ni = 1\nwhile True:\n if n*i % 2 == 0:\n print(n*i)\n break\n i += 1']
['Wrong Answer', 'Accepted']
['s162597007', 's156739425']
[2940.0, 2940.0]
[17.0, 17.0]
[87, 99]
p03307
u614459338
2,000
1,048,576
You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.
['import numpy as np\nfrom statistics import median\nN = int(input())\nA = list(map(lambda x:int(x),input().split(" ")))\nnpA = np.array(A)\nB = npA-(1+np.arange(len(npA)))\nopt_b = median(B)\nprint(int(np.sum(np.abs(B-opt_b))))', 'N = int(input())\nif N%2 == 0:\n ans = N\nelse:\n ans = N*2\nprint(ans)']
['Runtime Error', 'Accepted']
['s495446962', 's061741725']
[13640.0, 2940.0]
[160.0, 18.0]
[219, 72]
p03307
u619379081
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()))\nsadlist = []\nfor h in range(n):\n a[h] = a[h] - (h + 1)\nfor i in a:\n sad = 0\n for j in range(n):\n sad = sad + abs(a[j] - i)\n sadlist.append(sad)\nprint(min(sadlist))', 'n = int(input())\nif n % 2 == 0:\n print(n)\nelse:\n print(n * 2)']
['Runtime Error', 'Accepted']
['s668579337', 's761228972']
[3060.0, 2940.0]
[17.0, 17.0]
[235, 67]
p03307
u619501404
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\nfor i in range(n, 1e9+1):\n if i % n == 0 && i % 2 == 0:\n print(i)\n break', 'n = int(input())\nwhile True:\n if i % 2 == 0 and i % n == 0:\n \tprint(i)\n break\n i += 1\n', 'n = int(input())\nif n % 2 == 0:\n print(n)\nelse:\n print(n * 2)\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s223579710', 's709206852', 's537123502']
[2940.0, 2940.0, 3316.0]
[18.0, 17.0, 20.0]
[107, 104, 68]
p03307
u623052494
2,000
1,048,576
You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.
['import numpy as np\nN=int(input())\ndef gcd(N,2):\n c=int(np.floor(N%2))\n return N-2*c\nif gcd(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']
['s563844429', 's279142481']
[2940.0, 3064.0]
[17.0, 17.0]
[131, 59]
p03307
u623349537
2,000
1,048,576
You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.
['if N % 2 == 0:\n print(N)\nelse:\n print(N)', 'N = int(input())\nif N % 2 == 0:\n print(N)\nelse:\n print(N)', 'N = int(input())\nif N % 2 == 0:\n print(N)\nelse:\n print(2 *N)']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s193856392', 's562981458', 's600849633']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[46, 63, 66]
p03307
u633105820
2,000
1,048,576
You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.
["def run(n):\n if n % 2 == 0:\n return n\n else:\n return n * 2\n\n\ndef read_line():\n n = map(int, input().split())\n return n\n\n\ndef main():\n n = read_line()\n print(run(n))\n\n\nif __name__ == '__main__':\n main()\n", "def run(n):\n if n % 2 == 0:\n return n\n else:\n return n * 2\n\n\ndef read_line():\n n = int(input())\n return n\n\n\ndef main():\n n = read_line()\n print(run(n))\n\n\nif __name__ == '__main__':\n main()"]
['Runtime Error', 'Accepted']
['s833645391', 's912135970']
[2940.0, 2940.0]
[17.0, 20.0]
[237, 223]
p03307
u648868410
2,000
1,048,576
You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.
['\n\n\n\n\n\n\nfrom itertools import accumulate\n\nN=int(input())\nA=list(map(int,input().split()))\nSumA=list(accumulate(A))\n\ntmpP=tmpQ=tmpR=tmpS=0\nP=Q=R=S=0\nans=10e9\nl = 0\nr = 2\n\n\nfor mid in range(1,N-2):\n\n\t\n\n\t\n\t\n\twhile l < mid and abs((SumA[mid] - SumA[l+1])-SumA[l+1]) < abs((SumA[mid] - SumA[l])-SumA[l]):\n\t\tl += 1\n\n\t\n\t\n\twhile r < N-1 and abs((SumA[N-1]-SumA[r+1])-(SumA[r+1]-SumA[mid])) < abs((SumA[N-1] - SumA[r])-(SumA[r] - SumA[mid])):\n\t\tr += 1\n\n\t#print("{},{}".format(mid,l))\n\n\tP=SumA[l]\n\tQ=SumA[mid]-SumA[l]\n\tR=SumA[r]-SumA[mid]\n\tS=SumA[N-1]-SumA[r]\n\n\t#print(P,Q,R,S)\n\tdiff=max(P,Q,R,S)-min(P,Q,R,S)\n\tdiff=abs(diff)\n\tans = min(ans,diff)\n\nprint(ans)\n', '\n\nN=int(input())\n\nN_MAX = int(10e9)\n\nstart = N\ninterval = N\n\nans = 0\n\nfor x in range(N,N_MAX,N):\n\t# print(x)\n\tif x % N == 0 and x % 2 == 0:\n\t\tans = x\n\t\tbreak\n\nprint(ans)\n']
['Runtime Error', 'Accepted']
['s666606437', 's069821938']
[3064.0, 2940.0]
[17.0, 17.0]
[1439, 225]
p03307
u651663683
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==1)n*=2\nprint(n)', 'n=int(input())\nif(n%2==1):\n n*=2\nprint(n)']
['Runtime Error', 'Accepted']
['s756582986', 's163998110']
[2940.0, 2940.0]
[17.0, 17.0]
[38, 42]
p03307
u663014688
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()))\n\nprint(max(A)-min(A))\n\n', 'N = int(input())\n\nif N % 2 == 0:\n print(N)\nelse :\n print(N * 2)']
['Runtime Error', 'Accepted']
['s301026533', 's977741586']
[2940.0, 2940.0]
[17.0, 17.0]
[76, 69]
p03307
u669573977
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/python3\n\nn = int(input())\na = [int(_) for _ in input().split()]\n\np = a[0]\nq = a[1]\nr = a[2]\ns = 0\nfor i in range(3, n):\n s += a[i]\n\nd1 = 0\nd3 = 2\nwhile s - r > a[d3]:\n d3 += 1\n r += a[d3]\n s -= a[d3]\n\nans = float('inf')\nfor d2 in range(1, n - 1):\n ans = min(ans, max(p, q, r, s) - min(p, q, r, s))\n q += a[d2 + 1]\n while q - p > a[d1]:\n if d1 + 1 == d2 + 1:\n break\n d1 += 1\n p += a[d1]\n q -= a[d1]\n r -= a[d2 + 1]\n if d2 + 1 == d3:\n d3 += 1\n r += a[d3]\n s -= a[d3]\n while s - r > a[d3]:\n if d3 == n - 1:\n break\n d3 += 1\n r += a[d3]\n s -= a[d3]\n\nprint(ans)\n", '#!/Library/Frameworks/Python.framework/Versions/3.5/bin/python3\n\nn = int(input())\n\nif n % 2 == 1:\n print(n * 2)\nelse:\n print(n)\n']
['Runtime Error', 'Accepted']
['s758691970', 's869755773']
[3192.0, 2940.0]
[18.0, 17.0]
[697, 134]
p03307
u670180528
2,000
1,048,576
You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.
['n,*l=map(int,open(0).read().split())\na=sum(l[i]-i-1for i in range(n))//n\nf=lambda x:sum(abs(l[i]-i-1-x)for i in range(n))\nprint(min(f(a-1),f(a),f(a+1)))', 'n=int(input());print(n*(n%2+1))']
['Runtime Error', 'Accepted']
['s601340055', 's530070741']
[3060.0, 2940.0]
[20.0, 17.0]
[152, 31]
p03307
u678594774
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()\na = input().split(' ')\nresult = 0\nfor i in range(len(a)):\n\tfor j in range(i+1, len(a)):\n\t\tdiff = abs(a[i]-a[j])\n\t\tif diff > result:\n\t\t\tresult = diff\nprint(result)", 'n = int(input())\na = list(map(int, input().split()))\n\nfor i in range(n):\n a[i] -= i + 1\n\na.sort()\n\nif n%2 == 0:\n result = (a[n//2] + a[(n+1)//2]) / 2\nelse:\n result = a[n//2]\n \nprint(result)', 'N = int(input())\nif N % 2 == 0:\n\tprint(N)\nelse:\n\tprint(N*2)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s013735659', 's126571740', 's213701262']
[3060.0, 3060.0, 2940.0]
[17.0, 18.0, 17.0]
[174, 201, 59]
p03307
u684743124
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())\nprint(n if n%2==0 else 2n)', 'n=int(input())\nprint(n if n%2==0 else 2*n)']
['Runtime Error', 'Accepted']
['s160690317', 's139231372']
[8804.0, 9000.0]
[21.0, 31.0]
[41, 42]
p03307
u685263709
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%2 == 0:\n ans = N\nelse:\n ans = 2 * N\n \n \nprint(N)', 'N = int(input())\nA = list(map(int, input().split()))\nA = [A[i]-(i+1) for i in range(N)]\n\nans = float("inf")\nfor b in range(min(A), max(A)+1):\n loss = sum([abs(A[i] - b) for i in range(N)])\n ans = min(ans, loss)\n\n\nprint(ans)\n', 'N = int(input())\n\nif N % 2 == 0:\n ans = N\nelse:\n ans = 2 * N\n\n\nprint(ans)']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s575532051', 's733241541', 's840990035']
[2940.0, 3060.0, 2940.0]
[17.0, 17.0, 17.0]
[83, 230, 79]
p03307
u690442716
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())\nans = 0\nif a % 2 == 0:\n ans = a\nelif a[i] == "-":\n ans = a * 2\n\nprint(ans)\n\n', 'a = int(input())\nans = 0\nif a % 2 == 0:\n ans = a\nelse:\n ans = a * 2\n\nprint(ans)\n\n']
['Runtime Error', 'Accepted']
['s086321430', 's190563980']
[2940.0, 2940.0]
[17.0, 17.0]
[99, 87]
p03307
u698416089
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())\nprint(n+(n*n%2 == 0))', 'n = int(input())\nprint(2*n-((n%2 == 0)*n))']
['Wrong Answer', 'Accepted']
['s966597559', 's477854869']
[2940.0, 2940.0]
[17.0, 17.0]
[38, 42]
p03307
u699944218
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()\nA = list(map(int, input().split()))\nprint(int(max(A)) - int(min(A)))', 'N = input()\n\nif N % 2 == 0:\n print(int(N))\nelse:\n print(int(2*N))', 'n = input()\nA = list(map(int, input().split()))\nprint(int(max(A))-int(min(A)))', 'N = input()\nA = list(map(int, input().split()))\nprint(int(max(A)) - int(min(A)))', 'N = int(input())\n \nif N % 2 == 0:\n print(int(N))\nelse:\n print(int(2*N))']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s040258939', 's316648731', 's439844582', 's620788331', 's900246335']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 17.0]
[80, 67, 78, 80, 73]
p03307
u702786238
2,000
1,048,576
You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.
['x = int(input)\n\nif x%2 == 0:\n print(x)\nelse:\n print(x*2)', 'x = int(input())\n \nif x%2 == 0:\n print(x)\nelse:\n print(x*2)']
['Runtime Error', 'Accepted']
['s869468169', 's433463741']
[2940.0, 2940.0]
[17.0, 17.0]
[58, 61]
p03307
u713087221
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()))\n\ndef sunuke(b):\n ret = 0\n sub = 1\n for a in A:\n ret += abs(a - (b+ sub))\n sub += 1\n return ret\n\n\nB = []\n\nsub = 1\nfor a in A:\n b = a - sub\n B.append(b)\n sub += 1\n\nB.sort()\nb1 = N // 2\nif N < 3:\n print(sunuke(B[b1]))\n exit()\n\nb2 = b1 + 1\nb1_s = sunuke(B[b1])\nb2_s = sunuke(B[b2])\nif b1_s < b2_s:\n print(b1_s)\nelse:\n print(b2_s)\n', 'N = int(input())\n\nif N % 2 == 0:\n print(N)\nelse:\n print(N * 2)\n']
['Runtime Error', 'Accepted']
['s662721822', 's139361377']
[3064.0, 2940.0]
[17.0, 17.0]
[426, 69]
p03307
u713627549
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 = 1:\n print(N*2)\nelse:\n print(N)', 'N = int(input())\nif N % 2 == 1:\n print(N*2)\nelse:\n print(N)']
['Runtime Error', 'Accepted']
['s500796406', 's560063902']
[2940.0, 2940.0]
[17.0, 17.0]
[64, 65]
p03307
u721316601
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())\nb = 2\nx = a * b\n\nif a < b:\n tmp = a\n a = b\n b = tmp\n\nr = a % b\nwhile r != 0:\n a = b\n b = r\n r = a % b\n\nprint(x/b)\n', 'a = int(input())\nb = 2\nx = a * b\n\nif a < b:\n tmp = a\n a = b\n b = tmp\n\nr = a % b\nwhile r != 0:\n a = b\n b = r\n r = a % b\n\nprint(int(x/b))\n']
['Wrong Answer', 'Accepted']
['s553125163', 's407116663']
[3060.0, 3060.0]
[17.0, 18.0]
[149, 154]
p03307
u724563664
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())\nnums = list(map(int,input().split()))\n\nnums = [num - i for i,num in enumerate(nums,1)]\nnums.sort()\n\nsums = [None for i in range(n)]\nsums[0] = nums[0]\nallv = sum(nums)\nminv = nums[0] * (1 - n) - 2 * sums[0] + allv\nfor i in range(n-1):\n sums[i+1] = sums[i] + nums[i+1]\n for b in range(nums[i], nums[i+1]+1):\n p = b * (2*(i+1) - n) -2 * sums[i] + allv\n minv = min(minv,p)\n\nprint(minv)\n', '#coding:utf-8\na = int(input())\n\ndef gcd(a, b):\n\n\twhile b:\n\n\t\ta, b = b, a % b\n\n\treturn a\n\ng = gcd(a,2)\nl = a * 2 // g\nprint(l)\n']
['Runtime Error', 'Accepted']
['s037815690', 's996642306']
[3064.0, 2940.0]
[18.0, 17.0]
[433, 126]
p03307
u726615467
2,000
1,048,576
You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.
['# encoding: utf-8\nimport math\nN = int(input())\nA = list(map(int, input().split()))\n\ndef binsearch(seq, l, r, tar):\n # print("##", l, r, LmR[l:r + 1], tar)\n m = l + (r - l) // 2\n if l >= r: return l\n elif seq[m] < tar: return binsearch(seq, m + 1, r, tar)\n else: return binsearch(seq, l, m, tar)\n\nAsum = [0]\ntmp = 0\nfor Ai in A:\n tmp += Ai\n Asum.append(tmp)\n\nLmR = []\nfor SAi in Asum[:-1]:\n LmR.append(-Asum[-1] + 2 * SAi)\n\nans = max(A) - min(A)\nfor b2 in range(2, N - 1):\n # b1\n \n tar = -(Asum[N] - Asum[b2])\n b1 = binsearch(LmR, 1, b2 - 1, tar)\n if tar - LmR[b1 - 1] < LmR[b1] - tar: b1 = max((1, b1 - 1))\n \n if math.fabs((Asum[b2] - Asum[b1]) - (Asum[b1])) >= ans: continue\n # b3\n \n tar = Asum[b2]\n b3 = binsearch(LmR, b2 + 1, N - 1, tar)\n if tar - LmR[b3 - 1] < LmR[b3] - tar: b3 = max((b2 + 1, b3 - 1))\n parts = (Asum[b1], Asum[b2] - Asum[b1], Asum[b3] - Asum[b2], Asum[-1] - Asum[b3])\n # print("#", A[:b1], A[b1:b2], A[b2:b3], A[b3:], parts)\n if max(parts) - min(parts) < ans: ans = max(parts) - min(parts)\n \nprint(ans)', '# encoding: utf-8\nN = int(input())\nif N % 2: print(2 * N)\nelse: print(N)']
['Runtime Error', 'Accepted']
['s122325338', 's255051504']
[3184.0, 2940.0]
[18.0, 17.0]
[1141, 72]
p03307
u729133443
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());print(n+n*n%2)', 'n=int(input())\nprint(n+n%2*n)']
['Wrong Answer', 'Accepted']
['s541491916', 's371365034']
[2940.0, 9148.0]
[17.0, 27.0]
[29, 29]
p03307
u738898077
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())\nprint(n) if n%2 else print(n*2)', 'n = int(input())\nprint(n*2) if n%2 else print(n)']
['Wrong Answer', 'Accepted']
['s461821198', 's435464967']
[3064.0, 2940.0]
[18.0, 17.0]
[48, 48]
p03307
u739360929
2,000
1,048,576
You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.
['def solve():\n n = int(input())\n i = n\n while True:\n if i % 2 == 0 and i % n == 0:\n print(i)\n exit()\n\n\nif __name__ == "__main__":\n solve()\n', 'def solve():\n n = int(input())\n i = n\n while True:\n if i % 2 == 0:\n print(i)\n exit()\n i += n\n\n\n\nif __name__ == "__main__":\n solve()\n']
['Time Limit Exceeded', 'Accepted']
['s513177352', 's325587811']
[9088.0, 9148.0]
[2205.0, 24.0]
[179, 180]
p03307
u746300610
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()\nb=a/2', 'a=input()\nb=int(a/2)', 'a=input()\n#if int(a/2)*2==a:\n # print(a)\n#else:\n #print(a*2)\nprint(a)', 'a=input()\nif a=0:\n print(a)\nelse:\n print(a*2)\n', 'N=input()\nn=int(N/2)\nif N==n*2:\n print(N)\nelse:\n print(N*2)', 'a=input()\nif int(a/2)*2==a:\n print(a)\nelse:\n print(a*2)', 'a=input()\nif a==0:\n print(a)\nelse:\n print(a*2)\n', 'a=int(input())\nb=a/2\nif b*2==a:\n print(a)\nelse:\n print(a*2)', 'a=input()\nif int(a/2)*2==a:\n print(a)\nelse:\n print(a*2)\n', 'int(3/2)', 'a=input()\nif int(a/2)*2==a:\n print(a)\n#else:\n #print(a*2)\n', 'a=int(input())\nb=a/2', 'a=int(input())\nb=int(a/2)\nif b*2==a:\n print(a)\nelse:\n print(a*2)']
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s156026908', 's200395176', 's209767850', 's383363693', 's578456570', 's616807395', 's830295521', 's889303516', 's916481130', 's941307991', 's958120967', 's985666944', 's964314288']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 18.0, 17.0, 17.0]
[15, 20, 70, 48, 61, 57, 49, 61, 58, 8, 60, 20, 66]
p03307
u748135969
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 % 2 == 0:\n print(N)\nelse:\n print(2N)', 'N = int(input())\n \nif N % 2 == 0:\n print(N)\nelse:\n print(2 * N)']
['Runtime Error', 'Accepted']
['s841157418', 's355257322']
[2940.0, 2940.0]
[17.0, 17.0]
[61, 65]
p03307
u749491107
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']
['s234798567', 's990345235']
[9084.0, 9164.0]
[25.0, 27.0]
[57, 59]
p03307
u752700460
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\nfor i in range(2, 10**9, 2):\n if i % n == 0:\n print(i)\n', 'n = int(input())\na = list(map(int, input().split()))\n\na_d = []\nfor i in range(1, n+1):\n a_d.append(a[i-1]-i)\n\nd = (list(np.absolute(a_d)))\nd.sort()\nm = d[int(n/2)]\n\nprint(abs(sum(d-m)))\n', 'import numpy as np\n\nn = int(input())\na = list(map(int, input().split()))\n\na_d = []\nfor i in range(1, n+1):\n a_d.append(a[i-1]-i)\n\nd = (list(np.absolute(a_d)))\nd.sort()\nm = d[int(n/2)]\n\nprint(abs(sum(d-m)))', 'n = int(input())\n\nif n % 2 == 0:\n print(n)\nelse:\n print(n*2)\n']
['Time Limit Exceeded', 'Runtime Error', 'Runtime Error', 'Accepted']
['s619763439', 's773177473', 's938064315', 's810508746']
[24672.0, 3060.0, 12484.0, 2940.0]
[2104.0, 17.0, 149.0, 17.0]
[83, 189, 208, 67]
p03307
u754511616
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']
['s745166739', 's236532614']
[8992.0, 9072.0]
[23.0, 54.0]
[54, 55]
p03307
u757030836
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 = [int(i) for i in input().split()]\n\ni=0\n\nmax = 0\nmin = 0\nfor i in range(n):\n if a[i] >= max:\n max = a[i]\n elif a[i] <= min:\n min = a[i]\n else\n continue\n \nprint (max - min)\n \n', 'n = int(input())\n\n\nif n % 2:\n print(n*2)\nelse:\n print(n)']
['Runtime Error', 'Accepted']
['s537074520', 's768012739']
[2940.0, 2940.0]
[18.0, 17.0]
[211, 58]
p03307
u759412327
2,000
1,048,576
You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.
['if int(input())%2==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']
['s023245399', 's687942568']
[2940.0, 9084.0]
[17.0, 32.0]
[51, 58]
p03307
u762420987
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(1,10**9,2):\n if i%2==0 and i%N==0:\n print(i)\n break\n#AC\n', 'N = int(input())\nif N%2==0:\n print(N)\nelse:\n print(N*2)\n']
['Time Limit Exceeded', 'Accepted']
['s226987290', 's164081896']
[2940.0, 2940.0]
[2104.0, 18.0]
[105, 62]
p03307
u762540523
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();print(n if n%2==0 else n*2)', 'n=int(input());print(n if n%2==0 else n*2)']
['Runtime Error', 'Accepted']
['s725409385', 's105138666']
[2940.0, 2940.0]
[18.0, 17.0]
[37, 42]
p03307
u765590009
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())\n\nif a%n == 2 :\n print(a)\nelse :\n print(a*2)', 'a = int(input())\n\nif a%2 == 0 :\n print(a)\nelse :\n print(a*2)']
['Runtime Error', 'Accepted']
['s082996771', 's644786258']
[2940.0, 2940.0]
[17.0, 17.0]
[66, 66]
p03307
u766684188
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()))\nprint(max(A)-min(A))', 'n=int(input())\nif n%2:\n ans=2*n\nelse:\n ans=n\nprint(ans)']
['Runtime Error', 'Accepted']
['s948802181', 's774582834']
[2940.0, 2940.0]
[19.0, 17.0]
[68, 57]
p03307
u771406607
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)\nelif:\n print(n * 2)', 'n = int(input())\nif n % 2 == 0:\n print(n)\nelse:\n print(n * 2)']
['Runtime Error', 'Accepted']
['s309022590', 's533219189']
[2940.0, 2940.0]
[17.0, 17.0]
[63, 63]
p03307
u776338097
2,000
1,048,576
You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.
['def main():\n\tN = int(input())\n\tseq = list(map(int, input().split()))\n\tmaks = 0\n\tfor i in range(0, N):\n\t\tfor j in range(i, N):\n\t\t\tmaks = max(abs(seq[j] - seq[i]), maks)\n\tprint(maks)\n\treturn 0\nmain()', 'def main():\n\tN = int(input())\n\tA = list(map(int, input().split()))\n\ts = sum(A)\n\tdef ano_helper(BCDE):\n\t\tBCDE = BCDE + [s - sum(BCDE)]\n\t\tBCDE.sort()\n\t\treturn abs(BCDE[-1] - BCDE[0])\n\tdef helper(BCDEs, inds):\n\t\tif len(BCDEs[0]) == 4:\n\t\t\treturn BCDEs\n\t\tret_BCDEs = []\n\t\tret_inds = []\n\t\tfor candidate in range(len(BCDEs)):\n\t\t\tBCDE = BCDEs[candidate]\n\t\t\tind = inds[candidate]\n\t\t\tave = sum(A[ind:]) / (5 - len(BCDE))\n\t\t\ttemp = 0\n\t\t\twhile temp + A[ind] < ave:\n\t\t\t\ttemp += A[ind]\n\t\t\t\tind += 1\n\t\t\t\tif ind == N:\n\t\t\t\t\tbreak\n\t\t\tret_BCDEs.append(BCDE + [temp])\n\t\t\tret_inds.append(ind)\n\t\t\tif ind < N:\n\t\t\t\tret_BCDEs.append(BCDE + [temp + A[ind]])\n\t\t\t\tret_inds.append(ind + 1)\n\t\treturn helper(ret_BCDEs, ret_inds)\n\tprint(sorted([ano_helper(i[1:]) for i in helper([[0]], [0])])[0])\n\treturn 0\n\t#BCDE = []\n\t#ind = 0\n\t\n\t#tempBCDE = [[]]\n\t\n\t#\ttemp = 0\n\t\n\t#\twhile temp < (s - su) / (4 - len(BCDE)):\n\t#\t\tte = A[ind]\n\t#\t\ttemp += te\n\t#\t\tret.append(te)\n\t\n\t#\t\tind += 1\n\t#\ttempBCDE.append(ret)\n\t#print(BCDE)\nmain()', 'def main():\n\tN = int(input())\n\tseq = list(map(int, input().split()))\n\tseq = [seq[i] - i - 1 for i in range(N)]\n\tdef helper(b):\n\t\treturn sum([abs(seq[i] - b) for i in range(N)])\n\tave = sum(seq) // N\n\tprint(min(helper(ave), helper(ave + 1)))\n\treturn 0\nmain()', 'def main():\n\tN = int(input())\n\tif N % 2:\n\t\tprint(2 * N)\n\telse:\n\t\tprint(N)\n\treturn 0\nmain()']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s340272460', 's759028783', 's973839567', 's411212798']
[3060.0, 3064.0, 3060.0, 2940.0]
[17.0, 18.0, 17.0, 17.0]
[197, 1040, 256, 90]
p03307
u777394984
2,000
1,048,576
You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.
['i = int(input())\nif i % 2 == 0:\n print(i)\nelse:\n print(i*2)\nprint("{}".format((i * 2) if i%2 ==1 else 0))', 'i = int(input())\nif i % 2 == 0:\n print(i)\nelse:\n print(i*2)']
['Wrong Answer', 'Accepted']
['s807307295', 's222599743']
[2940.0, 2940.0]
[17.0, 18.0]
[107, 61]
p03307
u787383401
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==1:\nprint(2*N)\nelse:\nprint(N)\n\n', 'N=int(input())\nif N%2==1:\n\tprint(2*N)\nelse:\n\tprint(N)\n']
['Runtime Error', 'Accepted']
['s889135191', 's647267247']
[2940.0, 3064.0]
[17.0, 17.0]
[53, 54]
p03307
u790877102
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%2==0:\n print(N)\nelse:\n print(2N)\n', 'n = input()\na = list(map(int, input().split()))\na.sort()\nprint(a[-1] - a[0])\n', 'N = int(input())\n\nif N%2==0:\n print(N)\nelse:\n print(2 * N)\n', 'n = int(input())\nS = list(map(int, input().split()))\nS = sorted(S)\nprint(a[-1] - a[0])\n', 'N = int(input())\n\nif N%2==0:\n print(N)\nelse:\n print(2*N)', 'n = int(input())\nS = list(map(int, input().split()))\na = sorted(S)\nprint(a[-1] - a[0])\n', 'N = int(input())\n\nif N%2==0: \n print(N)\nelse:\n print(2 * N)\n', 'n = int(input())\na = list(map(int,input().split()))\na = sorted(a)\nprint(a[-1]-a[0])', 'N = int(input())\n\nif N%2==0:\n print (N)\nelse:\n print (2 * N)\n', 'n = int(input())\nS = list(map(int,input().split())\n\na=soretd(S)\nprint(max(a)-min(a))', 'N = int(input())\n\nif N%2==0:\n print(N)\n\nelse:\n print(2 * N)\n', 'n = int(input())\nS = list(map(int, input().split()))\nS = sorted(S)\nprint(S[-1] - S[0])\n', 'n = int(input())\nA = list(map(int,input().split()))\nA = sorted(A)\nx = A[-1]-A[0]\nprint(x)\n', 'N = int(input())\n\nif N%2==0:\n print(N)\nelse:\n print(2 * N)\n\n\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s016684676', 's101201371', 's140127158', 's196519414', 's299724565', 's358858135', 's486081850', 's490742212', 's510733433', 's542625984', 's719213790', 's964733649', 's978562540', 's849257169']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0]
[58, 77, 63, 87, 60, 87, 78, 83, 65, 84, 64, 87, 90, 63]
p03307
u791664126
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())\nprint([n,n*2][n%2==0])', 'n=int(input())\nprint([n,n*2][n%2==1])']
['Wrong Answer', 'Accepted']
['s246592821', 's342124386']
[2940.0, 2940.0]
[17.0, 17.0]
[37, 37]
p03307
u797550216
2,000
1,048,576
You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.
['a,b = map(int,input().split())\n\n\nprint(int((b-a)*(b-a+1)/2-b))', 'n = int(input())\n\nm = 10000000000000000\n\nfor i in range(n,m,n):\n\tif i % 2 == 0:\n\t\tprint(i)\n\t\tbreak ']
['Runtime Error', 'Accepted']
['s715989371', 's439211132']
[2940.0, 2940.0]
[18.0, 18.0]
[62, 102]
p03307
u802772880
2,000
1,048,576
You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.
['import numpy as np\nN=int(input())\nA=list(map(int,input().split()))\nB=[A[i]-i-1 for i in range(N)]\nB.sort()\nif N%2==0:\n b=B[N//2]\nelse:\n b=(B[N//2-1]+B[N//2])//2\nprint(int(sum([abs(Bb-b) for Bb in B])))\n', 'N=int(input())\nif N%2==0:\n print(N)\nelse:\n print(2*N)']
['Runtime Error', 'Accepted']
['s211609775', 's633991725']
[12448.0, 2940.0]
[148.0, 17.0]
[208, 59]
p03307
u804085889
2,000
1,048,576
You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.
['def maxElem( lis ):\n L = lis[:]#copy\n S = set(lis)\n S = list(S)\n MaxCount=0\n ret=\'nothing...\'\n\n for elem in S:\n c=0\n while elem in L:\n ind = L.index(elem)\n foo = L.pop(ind)\n c+=1\n if c>MaxCount:\n MaxCount=c\n ret = elem\n return ret\n\nif __name__ == "__main__" :\n n = int(input())\n array = list(map(int, input().split()))\n\n for i in range(0, n):\n array[i] = array[i] - (i + 1)\n elem = int(maxElem(array))\n \n for i in range(0, n):\n array[i] = abs(array[i] - elem)\n\n sum_n = sum(array)\n\n print(sum_n)', 'N = int(input())\nif N % 2 != 0:\n N = N * 2\n\nprint(N) \n']
['Runtime Error', 'Accepted']
['s223873329', 's514237391']
[3064.0, 2940.0]
[17.0, 17.0]
[574, 58]
p03307
u807772568
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 % 2==0\n\tprint(n)\nelse:\n print(n*2)', 'n = int(input())\n\nif n % 2==0:\n print(n)\nelse:\n print(n*2)\n']
['Runtime Error', 'Accepted']
['s858671582', 's154142396']
[2940.0, 2940.0]
[18.0, 18.0]
[58, 61]
p03307
u813102292
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(int(i) for i in input().split())\na.sort(reverse = True)\nprint(a[0]-a[-1])', 'N = int(input())\na = list(int(i) for i in input().split())\na.sort(reverse = True)\nprint(a[0]-a[-1])', 'N = int(input())\nif N%2 == 0:\n print(N)\nelse:\n print(N*2)\n ']
['Runtime Error', 'Runtime Error', 'Accepted']
['s603379306', 's957309124', 's965589590']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[99, 99, 64]
p03307
u813174766
2,000
1,048,576
You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.
['o=input()\na=list(map(int,input().split()))\nprint(max(a)-min(a))\n', 'input()\na=list(map(int,input().split()))\nprint(max(a)-min(a))\n', '_=int(input())\nprint(_<<(_&1))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s093778111', 's203696253', 's744127050']
[2940.0, 2940.0, 2940.0]
[17.0, 20.0, 17.0]
[64, 62, 30]
p03307
u816631826
2,000
1,048,576
You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.
["L = 0\nI = 1\nN = int(input())\nif N < 1 or N > 10:\n print('invalido!')\nif (N >= 1 and N <= 10):\n while L == 0:\n if (I % 2 == 0 and I % N == 0):\n print(I)\n L = 1\n I +=I\n", 'def main():\n a, b = 2, int(input())\n ta, tb = a, b\n if b == 0: return 0\n while a%b != 0:\n a, b = b, a%b\n return int((ta*tb)/b)\nmain()', "n = int(input())\ncontador = 0\nres = 0\nwhile(True):\n contador += 1\n if contador % 2 == 0 and contador % n == 0:\n res = contador\n break;\nprint(res,'\\n')", 'def smaller_divisible_number(num: int) -> int:\n smaller_divisible_number = num\n if num%2 != 0:\n smaller_divisible_number *= 2\n return smaller_divisible_number', 'n=int(input())\nif n%2==1:\n print(n*2)\nelse:\n print(n)\n']
['Wrong Answer', 'Wrong Answer', 'Time Limit Exceeded', 'Wrong Answer', 'Accepted']
['s167552193', 's214941301', 's828951153', 's872349355', 's519510451']
[3060.0, 2940.0, 3064.0, 2940.0, 2940.0]
[2103.0, 17.0, 2104.0, 17.0, 17.0]
[208, 154, 170, 174, 60]
p03307
u822738981
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\nn = int(input())\n\n\n# if i % 2 == 0 and i % n == 0:\n# print(i)\n# break\n\nif n % 2 == 0:\n print(n) \nelse:\n print(2n) ', '# -*- coding: utf-8 -*-\n\nn = int(input())\n\n\n# if i % 2 == 0 and i % n == 0:\n# print(i)\n# break\n\nif n % 2 == 0:\n print(n) \nelse:\n print(2*n)\n']
['Runtime Error', 'Accepted']
['s531478641', 's963616104']
[2940.0, 2940.0]
[17.0, 17.0]
[192, 193]
p03307
u830162518
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(1,2N):\n if i%2==0 and i%N==0:\n print(i)\n break', 'N=int(input())\nfor i in range(1,2*N):\n if i%2==0 and i%N==0:\n print(i)\n break', 'N=int(input())\nif N%2==0:\n print(N)\nelse:\n print(2*N)']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s059821387', 's167261075', 's178613174']
[2940.0, 2940.0, 2940.0]
[18.0, 2104.0, 17.0]
[83, 84, 55]
p03307
u832039789
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()))\nb = [a[i]-(i+1) for i in range(n)]\nb = sorted(b)\nmid = b[n//2]\nsum = 0\nfor i in range(n):\n sum+=abs(a[i]-(mid+(i+1)))\nprint(sum)\n', 'N=input();print(N*(N%2+1))', 'n = int(input())\nif n%2==0:\n print(n)\nelse:\n print(n*2)\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s023118681', 's468390599', 's914737840']
[3060.0, 2940.0, 2940.0]
[19.0, 18.0, 17.0]
[184, 26, 62]
p03307
u838786721
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())\nlist = [int(i) for i in input().split()]\n\nn_max = max(list)\nn_min = min(list)\n\nprint(n_max - n_min)', 'n = int(input())\nmod = n%2\nif mod==0:\n dst = n\nelse:\n dst = n*2\n\nprint(dst)']
['Runtime Error', 'Accepted']
['s169896099', 's433495028']
[2940.0, 3060.0]
[17.0, 18.0]
[116, 81]
p03307
u840988663
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+1)', 'N=int(input())\nif N%2==0:\n print(N)\nelse:\n print(N*2)']
['Wrong Answer', 'Accepted']
['s216895947', 's112770635']
[2940.0, 2940.0]
[17.0, 17.0]
[55, 55]
p03307
u842809396
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())\nlst=input().split()\nlst_i=[int(i) for i in lst]\na=max(lst_i)\nb=min(lst_i)\nprint(abs(a-b))', 'N=int(input())\na=list(map(int,input().split()))\nprint(abs(max(a)-min(a)))', 'N=int(input())\n\nif N%2==0:\n print(N)\nelse:\n print(N*2)\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s015079144', 's666429375', 's425851516']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[104, 73, 57]
p03307
u846226907
2,000
1,048,576
You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.
['a = list(map(int,input().split()))\n\nif int(a[0]) %2 == 0:\n print(a)\nelse:\n print(a*2)\n', 'a = map(int,input().split())\n\nif a%2 == 0:\n print(a)\nelse:\n print(a*2)\n', 'a = list(map(int,input().split()))\nb = int(a[0])\nif b %2 == 0:\n print(b)\nelse:\n print(b*2)']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s481083117', 's584632403', 's286800817']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[92, 77, 96]
p03307
u848647227
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())\ni = 1\nwhile True:\n if i % 2 == 0 and i % a == 0:\n print(i)\n break\n else:\n i += 2\n', 'a = int(input())\nif a % 2 == 0:\n print(a)\nelse:\n print(a * 2)']
['Time Limit Exceeded', 'Accepted']
['s336250906', 's153991967']
[2940.0, 2940.0]
[2104.0, 18.0]
[109, 63]
p03307
u856169020
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()))\n\n# res = 0\n\n# res += A[i] - (i+1)\n# b = res // N\n# print(res, b)\nA_sorted = sorted(A)\nb = A_sorted[int((len(A)-1)/2)]\nb2 = A_sorted[int((len(A)-1)/2 + 1)]\n\nsadness_1 = sum([abs(A[i] - b) for i in range(N)])\nsadness_2 = sum([abs(A[i] - b2) for i in range(N)])\n\nprint(min(sadness_1, sadness_2))', 'N = int(input())\nA = list(map(int, input().split()))\n\nA_sorted = sorted([A[i] - (i+1) for i in range(N)])\nb = A_sorted[int((len(A)-1)/2)]\nb2 = A_sorted[int((len(A)-1)/2 + 1)]\n\nsad_1 = sum([abs(A_sorted[i] - b) for i in range(N)])\nsad_2 = sum([abs(A_sorted[i] - b2) for i in range(N)])\n\nprint(min(sad_1, sad_2))\n', 'N = int(input())\nA = list(map(int, input().split()))\n\n# res = 0\n\n# res += A[i] - (i+1)\n# b = res // N\n# print(res, b)\nA_sorted = sorted([A[i] - (i+1) for i in range(N)])\nb = A_sorted[int((len(A)-1)/2)]\nb2 = A_sorted[int((len(A)-1)/2 + 1)]\n\nprint(A_sorted, b, b2)\nsad_1 = sum([abs(A_sorted[i] - b) for i in range(N)])\nsad_2 = sum([abs(A_sorted[i] - b2) for i in range(N)])\n\nprint(min(sad_1, sad_2))', 'N = int(input())\n\nif N % 2 == 0:\n print(N)\nelse:\n print(2*N)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s116271456', 's671837602', 's704251267', 's528922816']
[3064.0, 3064.0, 3064.0, 2940.0]
[17.0, 18.0, 17.0, 17.0]
[369, 311, 421, 66]
p03307
u863370423
2,000
1,048,576
You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.
['line = input()\nnum = [int(n) for n in line.split()][0]\nprint(num)\nsmaller_divisible_number = num\nif num%2 != 0:\n smaller_divisible_number *= 2\nprint(smaller_divisible_number)', 'numero = int(input("escreva o numero "))\nif (numero % 2) == 0:\n print(numero)\nelse:\n print(numero * 2)', 'x = input()\nx = int(x)\nif x%2 == 1:\n x = 2*x\n print(x)\nelse:\n print(x) ']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s483176505', 's492664038', 's003886631']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[177, 108, 80]
p03307
u864047888
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']
['s618798225', 's041410678']
[2940.0, 3064.0]
[17.0, 17.0]
[52, 53]
p03307
u864900001
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(2*n)', 'a = list(map(int, input().split()))\nprint(max(a)-min(a))', 'import math\nn = int(input())\nprint(n*2/math.gcd(n,2))', 'n = int(input())\nif n % 2==0:\n print(n)\nelse:\n print(2*n)']
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s313927023', 's376917198', 's756522517', 's055324541']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[60, 56, 53, 63]
p03307
u865413330
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())\nresult = n\n\nwhile True:\n if result % n == 0:\n print(result)\n break\n result = result * 2\n', 'n = int(input())\nl = input().split()\nl.sort()\nprint(abs(int(l[0]) - int(l[-1])))', 'n = int(input())\nresult = n\n\nwhile True:\n if (result % n == 0) & (result % 2 == 0):\n print(result)\n break\n result = result * 2\n']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s384797359', 's739160429', 's352069801']
[2940.0, 2940.0, 2940.0]
[18.0, 18.0, 18.0]
[125, 80, 147]
p03307
u869728296
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\nfor i in range(3,109):\n if(N%2==0 and N%i==0 and N!=i):\n print(i)\n break\n \n', 'N=int(input())\n\nif N%2==0:\n print(N)\nelse:\n print(2*N)\n \n']
['Wrong Answer', 'Accepted']
['s374561274', 's349355362']
[2940.0, 2940.0]
[18.0, 17.0]
[115, 70]
p03307
u870198083
2,000
1,048,576
You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.
["import collections\nN=int(input())\nl=list(map(lambda x:int(x),input().split(' ')))\nl=[l[i]-(i+1) for i in range(N)]\ndl=collections.Counter(l)\nans=[0]*(len(dl)//2)\nfor i in range(len(dl)//2):\n k=dl.most_common()[i][0] \n k*=-1\n ans[i]=sum([abs(l[j]+k) for j in range(N)])\nprint(min(ans))", 'd=int(input())\nif d%2==0:\n print(d)\nelse:\n print(2*d)\n \n\n\n ']
['Runtime Error', 'Accepted']
['s203192307', 's754415928']
[3316.0, 2940.0]
[21.0, 17.0]
[293, 71]
p03307
u870998297
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())\ncount = 0\nif N%2 != 0:\n print(int(2*N))\nelse:\n while N%2 == 0:\n N = N/2\n count += 1\n if N==1:\n print(2**count)\n\nif N != 1:\n print(int(2*N))\n', 'N = int(input())\n\nif N%2 == 0:\n print(N)\nelse:\n print(N * 2)']
['Wrong Answer', 'Accepted']
['s600391664', 's521289831']
[2940.0, 2940.0]
[18.0, 17.0]
[198, 62]
p03307
u886902015
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())\nprint(2*N//gcd(2,N))', 'import math\nN=int(input())\nprint(2*N//math.gcd(2,N))']
['Runtime Error', 'Accepted']
['s330538023', 's463997277']
[9116.0, 9080.0]
[24.0, 28.0]
[47, 52]
p03307
u891518152
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())\nprint(int(2*N / math.gcd(2, N)))', 'N = int(input())\nif N%2==0:\n print(N)\nelse:\n print(N*2)']
['Runtime Error', 'Accepted']
['s208174811', 's229787503']
[2940.0, 2940.0]
[17.0, 17.0]
[49, 61]
p03307
u894364256
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%2 == 0:\n print N\nelse:\n print N*2\n', 'N = int(input())\n\nif N%2 == 0:\n print(N)\nelse:\n print(N*2)\n']
['Runtime Error', 'Accepted']
['s767973375', 's615036442']
[2940.0, 2940.0]
[17.0, 19.0]
[63, 65]
p03307
u897302879
2,000
1,048,576
You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.
['import fraction\ndef lcm(x, y):\n return (x * y) // fraction.gcd(x, y)\n\nprint(lcm(int(input()), 2))\n', 'def gcd(a, b):\n while b:\n a, b = b, a % b\n return a\n \ndef lcm(x, y):\n return (x * y) // gcd(x, y)\n\nprint(lcm(int(input()), 2))\n']
['Runtime Error', 'Accepted']
['s203729914', 's240582432']
[2940.0, 3064.0]
[17.0, 17.0]
[101, 144]
p03307
u898421873
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\nvalue = []\nfor part in input().split():\n value.append(int(part))\n\nprint(max(value) - min(value))', 'n = int(input())\n\nif (n % 2) == 0:\n print(n)\nelse:\n print(n * 2)']
['Runtime Error', 'Accepted']
['s380544451', 's201254809']
[2940.0, 2940.0]
[17.0, 17.0]
[115, 66]
p03307
u899645116
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=1):\n n *= 2\nprint(n)', 'n = int(input())\nif(n %2==1):\n n *= 2\nprint(n)\n']
['Runtime Error', 'Accepted']
['s692370458', 's871808552']
[2940.0, 2940.0]
[17.0, 18.0]
[46, 48]
p03307
u903596281
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())\nans=N if N%2==0 else 2*N\nprint(N)', 'N=int(input())\nans=N if N%2==0 else 2*N\nprint(ans)']
['Wrong Answer', 'Accepted']
['s978790832', 's158882818']
[2940.0, 2940.0]
[17.0, 17.0]
[48, 50]
p03307
u909991537
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 = [int(i) for i in input().split()] \n\nprint(max(a) - min(a))', 'n = int(input())\n\nif n % 2 == 0:\n print(n)\nelse:\n print(n * 2)']
['Runtime Error', 'Accepted']
['s556197744', 's262552940']
[2940.0, 2940.0]
[17.0, 17.0]
[79, 64]
p03307
u910756197
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 + 1)', 'n = int(input())\nif n % 2 == 0:\n print(n)\nelse:\n print(n * 2)\n']
['Wrong Answer', 'Accepted']
['s410419350', 's001995706']
[2940.0, 2940.0]
[17.0, 17.0]
[63, 64]
p03307
u924406834
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()))\nb = []\nfor i in range(1,n+1):\n b.append(a[i-1] - i)\nb.sort\nif n % 2 != 0:\n B = b[int((n-1)/2)]\n ans = 0\n for i in range(n):\n ans += abs(a[i]-i-1-B)\n print(ans)\nelse:\n big = b[int((n)/2)]\n smo = b[int(n-2/2)]\n smoB = int((big+smo)/2)\n bigB = smoB + 1\n big = smo = 0\n for i in range(n):\n big += abs(a[i]-i-1-bigB)\n for i in range(n):\n smo += abs(a[i]-i-1-smoB)\n print(min(big,smo))', 'n = int(input())\ndef get_gcd(a, b): \n if a < b:\n a, b = b, a\n if a % b == 0:\n return b\n else:\n return get_gcd(b, a % b)\ndef get_lcm(a, b, gcd): \n lcm = a * b // gcd\n return lcm\nprint(int((2 * n) / get_gcd(2,n)))']
['Runtime Error', 'Accepted']
['s610663171', 's469196297']
[3064.0, 2940.0]
[17.0, 17.0]
[491, 321]
p03307
u924671994
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\nprint(2*n if n%2==0 else n)', 'N = input()\n\nprint(N*2)\n', 'N = int(input())\n\nprint(2*N if N%2==0 else n)', 'n = int(input())\n\nprint(2*n if n%2 else n)']
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s033911942', 's057338912', 's946364000', 's504017144']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[45, 24, 45, 42]
p03307
u933477976
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().rstrip().split(" ")))\n\nsm = 0\nfor i in range(0, n):\n sm = sm + a[i]\n\nmin_dif = sm\n\np = 0\nfor i in range(n-3):\n p = p + a[i]\n if 4*p < sm:\n next\n q = 0\n for j in range(i+1, n-2):\n q = q + a[j]\n if 3*q < sm - p:\n next\n r = 0\n for k in range(j+1, n-1):\n r = r + a[k]\n if 2*r < sm - p - q:\n next\n s = 0\n for l in range(k+1, n):\n s = s + a[l]\n d = max([p, q, r, s])-min([p, q, r, s])\n min_dif = min([d, min_dif])\n\np = 0\nfor i in range(n-3):\n p = p + a[i]\n if 4*p <= sm - 3*min_dif or 4*p >= sm + 3*min_dif:\n next\n q = 0\n for j in range(i+1, n-2):\n q = q + a[j]\n if abs(p-q) >= min_dif or 4*q <= sm - 3*min_dif or 4*q >= sm + 3*min_dif:\n next\n r = 0\n for k in range(j+1, n-1):\n r = r + a[k]\n if abs(p-r) >= min_dif or abs(q-r) >= min_dif or 4*r <= sm - 3*min_dif or 4*r >= sm + 3*min_dif:\n next\n s = 0\n for l in range(k+1, n):\n s = s + a[l]\n d = max([p, q, r, s])-min([p, q, r, s])\n min_dif = min([d, min_dif])\n\nprint(min_dif)\n', 'n = int(input())\na = list(map(int, input().rstrip().split(" ")))\n\nt = list(0 for i in range(n+1))\nfor i in range(1, n+1):\n t[i] = t[i-1] + a[i-1]\n\ndef sum_a(i, j):\n return t[j]-t[i]\n\nmin_dif = sum_a(0, n)\n\nfor i in range(2, n-1):\n j0 = 0\n j1 = i\n u = sum_a(0, i) // 2\n while j1 - j0 > 1:\n j = (j0+j1) // 2\n if 2*sum_a(0, j) <= u: \n j0 = j\n else:\n j1 = j\n if abs(sum_a(0, j0)-sum_a(j0, i)) < abs(sum_a(0, j1) - sum_a(j1, i)): \n p = sum_a(0, j0)\n q = sum_a(j0, i)\n else:\n p = sum_a(0, j1)\n q = sum_a(j1, i)\n\n j0 = i\n j1 = n\n u = sum_a(i, n) // 2\n while j1 - j0 > 1:\n j = (j0+j1) // 2\n if sum_a(i, j) <= u: \n j0 = j\n else:\n j1 = j\n if abs(sum_a(i, j0)-sum_a(j0, n)) < abs(sum_a(i, j1) - sum_a(j1, n)): \n r = sum_a(i, j0)\n s = sum_a(j0, n)\n else:\n r = sum_a(i, j1)\n s = sum_a(j1, n)\n\n min_dif = min(min_dif, max(p, q, r, s)-min(p, q, r, s))\n\nprint(min_dif)\n', 'n = int(input())\nif n % 2 == 0:\n print(n)\nelse:\n print(n*2)\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s091221703', 's248617050', 's571112586']
[3188.0, 3188.0, 2940.0]
[18.0, 18.0, 17.0]
[1275, 1040, 66]
p03307
u935264791
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 python\n# coding: UTF-8\n\n\ndef sad(list, b):\n value = 0\n n = 1\n for a in list:\n value += abs(a - (b+n))\n n += 1\n return value\n\n\ndef main():\n mn = 1000000\n n = (int)(input())\n lst = list(int(i) for i in input().split())\n mx = max(lst)\n for i in range(mx):\n if(sad(lst, i) < mn):\n mn = sad(lst, i)\n print(mn)\n\nif __name__ == '__main__':\n main()", "#! /usr/bin/env python\n# coding: UTF-8\n\ndef gcd(m, n):\n if n == 0:\n return m\n else:\n return gcd(n, m%n)\n\ndef main():\n n = int(input())\n\n print(int(n*2/gcd(n,2)))\n\nif __name__ == '__main__':\n main()"]
['Runtime Error', 'Accepted']
['s370522178', 's634936218']
[3064.0, 2940.0]
[17.0, 17.0]
[421, 226]
p03307
u944015274
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()\nprint(a * 2 if int(a) % 2 == 1 else a)', 'a = int(input())\nprint(a * 2 if a % 2 == 1 else a)\n']
['Wrong Answer', 'Accepted']
['s613821670', 's752959896']
[2940.0, 2940.0]
[17.0, 18.0]
[50, 51]
p03307
u951980350
2,000
1,048,576
You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.
['i = N\nwhile True:\n if i % 2 == 0 and i % N ==0:\n print(i)\n break\n i+=i', 'N = int(input())\ni = N\nwhile True:\n if i % 2 == 0 and i % N ==0:\n print(i)\n break\n i+=i']
['Runtime Error', 'Accepted']
['s285678193', 's671130787']
[2940.0, 2940.0]
[17.0, 17.0]
[90, 107]
p03307
u964635736
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()))\nprint(max(a)-min(a))', 'n=int(input())\na=list(map(int, input().split()))\na.sort()\nprint(a[n-1]-a[0])', 'n=int(input())\na=list(map(int, input().split()))\nprint(max(a)-min(a))', 'a=int(input())\nif (a%2)==0: print(a)\nelse: print(a*2)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s378365033', 's478276334', 's499533023', 's747500134']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 18.0, 18.0]
[69, 76, 69, 53]
p03307
u970738863
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 == 1):\n a = 2N \nelse:\n a = N\nprint(a)\n', 'N = int(input())\nif(N%2 == 1):\n a = 2*N \nelse:\n a = N\nprint(a)\n']
['Runtime Error', 'Accepted']
['s121223293', 's984383302']
[2940.0, 3188.0]
[17.0, 18.0]
[64, 65]
p03307
u972892985
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())\nprint((n*2) if n%2 == o else n)', 'n = int(input())\nprint((n*2) if n%2 == 0 else n)', 'n = int(input())\nprint(n if n%2 == 0 else n*2)']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s719470779', 's879069773', 's803536725']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[48, 48, 46]
p03307
u980492406
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']
['s667219104', 's153798690']
[2940.0, 2940.0]
[17.0, 17.0]
[64, 65]
p03307
u982594421
2,000
1,048,576
You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.
['def gcd(a, b):\n if b > a:\n a, b = b, a\n while b != 0:\n a, b = b, a % b\n return a\n\nn = int(input())\nans = n * 2 // gcd(n, 2)\nprint(ans)\n', 'def gcd(a, b):\n if b > a:\n a, b = b, a\n while b != 0:\n a, b = b, a % b\n return a\n \nn = int(input())\nans = n * 2 // gcd(n, 2)\nprint(ans)']
['Runtime Error', 'Accepted']
['s107643151', 's292050744']
[2940.0, 2940.0]
[17.0, 17.0]
[150, 144]
p03307
u982896977
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 + 1)', 'n = int(input())\nif n % 2 == 0:\n\tprint(n)\nelse:\n\tprint(2 * n)']
['Wrong Answer', 'Accepted']
['s866156344', 's738662454']
[2940.0, 2940.0]
[17.0, 17.0]
[61, 61]
p03307
u986269893
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)', 'n=int(input())\nif n%2==0:\n print(n)\nelse:\n print(2*n)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s559272776', 's596725192', 's380811344']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[53, 54, 55]
p03307
u996749146
2,000
1,048,576
You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.
['\n\n\n\n\nN = int(input())\na = list(map(int, input().strip().split(" ")))\n\nfor i in range(N):\n a[i] = a[i] - (i+1)\n\na.sort()\nif N % 2 != 0:\n mid = (N-1)//2\nelse:\n mid = N // 2 \nb = a[mid]\n\nsadness_left = b * mid - sum(a[:mid])\nsadness = sum(a) - b * N + sadness_left * 2\n\nprint(sadness)\n\n\n', '\n\n\n\n\n# 7\n# 1 1 1 1 2 3 4\n#import sys\n\nN = int(input())\na = list(map(int, input().strip().split(" ")))\n\nfor i in range(N):\n a[i] = a[i] - (i+1)\n\na.sort()\nif N % 2 != 0:\n mid = (N-1)//2\nelse:\n mid = N // 2 -1\nb = a[mid]\n\nsadness_left = b * mid - sum(a[:mid])\nsadness = sum(a) - b * N + sadness_left * 2\n\nprint(sadness)\n', '# A - Multiple of 2 and N\n\n\n# A_Multiple_of_2_and_N.py\n\nN = int(input())\n\nif N == 1:\n print(2)\nelif N%2 == 0:\n print(N)\nelse:\n print(N*2)\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s519294440', 's827526050', 's257736808']
[3060.0, 3060.0, 2940.0]
[17.0, 17.0, 17.0]
[434, 435, 203]
p03307
u999449420
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())\nf1 = False\nf2 = False\na = 1\nwhile True:\n if(a % 2 == 0):\n f1 = True\n if(a % N == 0):\n f2 = True\n if(f1 == True and f2 == True):\n break\n elif(a > N):\n a = N * 2\n else:\n f1 = False\n f2 = False\n a += 1\nprint(a)\n', 'N = int(input())\nans = 0\nif(N % 2 == 0):\n ans = N\nelse:\n ans = N * 2\nprint(ans)\n']
['Time Limit Exceeded', 'Accepted']
['s852343124', 's761489694']
[3060.0, 2940.0]
[2104.0, 17.0]
[285, 86]
p03308
u007640222
2,000
1,048,576
You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A.
['n = int(input())\na = list(map(int,input().split()))\n\nnm = 10 ** 10\nnv = -1\nfor i in range(n):\n if a[i] > nv:\n nv = a[i]\n continue\n \n if a[i] < nm:\n nm = a[i]\n\nprint(nv-nm)', 'n = int(input())\na = list(map(int,input().split()))\n\nnm = a[0]\nnv = a[0]\nfor i in range(n):\n if a[i] > nv:\n nv = a[i]\n continue\n \n if a[i] < nm:\n nm = a[i]\n\nprint(nv-nm)\n ']
['Wrong Answer', 'Accepted']
['s850470608', 's180781569']
[3060.0, 3060.0]
[17.0, 17.0]
[201, 208]
p03308
u011559420
2,000
1,048,576
You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A.
["#!/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(int(N*2))\n \nif __name__ == '__main__':\n\tmain()", "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n \ndef main():\n\tN = int(input())\n\tA = list(map(int, input().split()))\n\tprint(max(A)-min(A))\n\nif __name__ == '__main__':\n\tmain()"]
['Wrong Answer', 'Accepted']
['s860421131', 's152443229']
[2940.0, 2940.0]
[17.0, 17.0]
[172, 173]
p03308
u024782094
2,000
1,048,576
You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A.
['n=int(input())\nl=sorted(map(iny,input().split()))\nm=l.pop(0)\nM=l.pop(n-2)\nprint(M-m)', 'n=int(input())\na=sorted(list(map(int,input().split())))\nprint(a[-1]-a[0])']
['Runtime Error', 'Accepted']
['s534370715', 's968685204']
[2940.0, 2940.0]
[17.0, 17.0]
[84, 73]
p03308
u031391755
2,000
1,048,576
You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A.
['n = int(input())\nn_list = list(map(int,input().split())\nn_list.sort()\nprint(n_list[-1] - n_list[0])', 'n = int(input())\nn_list = list(map(int,input().split()))\nn_list.sort()\nprint(n_list[-1] - n_list[0])']
['Runtime Error', 'Accepted']
['s509180500', 's563975940']
[2940.0, 2940.0]
[17.0, 17.0]
[99, 100]
p03308
u037074041
2,000
1,048,576
You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A.
['N = input()\nl = [int(x) for x in input().rstrip().split()]\n_max = 0\n_min = l[0]\nfor t in l:\n if _max < t:\n _max = t\n if _min > t:\n _min = t \nreturn _max - _min', 'N = input()\nstring_list = input().rstrip().split()\nl = [int(x) for x in string_list]\n_max = 0\n_min = l[0]\nfor t in l:\n if _max < t:\n _max = t\n if _min > t:\n _min = t \nreturn _max - _min', 'N = input()\nstring_list = input().rstrip().split()\n', 'N = input()\nl = [int(input()) for i in range(N)]\n_max = 0\n_min = l[0]\nfor t in l:\n if _max < t:\n _max = t\n if _min > t:\n _min = t \nreturn _max - _min', 'N = input()\nstring_list = input().rstrip().split()\nl = [int(x) for x in string_list]\n_max = 0\n_min = l[0]\nfor t in l:\n if _max < t:\n _max = t\n if _min > t:\n _min = t \nprint(_max - _min)']
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s306508247', 's401498114', 's640576221', 's772312209', 's833902054']
[2940.0, 2940.0, 2940.0, 2940.0, 3060.0]
[17.0, 18.0, 18.0, 18.0, 17.0]
[168, 194, 51, 158, 194]
p03308
u045408189
2,000
1,048,576
You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A.
['n=int(input())\na=map(int,input().split())\nans=0\nwhile i in a:\n while s in a:\n x=abs(s-i)\n if x>ans:\n ans=x\nprint(ans)', 'n = int(input())\na = list(map(int,input().split()))\nprint(max(a)-min(a))']
['Runtime Error', 'Accepted']
['s471995621', 's074434516']
[2940.0, 2940.0]
[17.0, 18.0]
[129, 72]
p03308
u050698451
2,000
1,048,576
You are given an integer sequence A of length N. Find the maximum absolute difference of two elements (with different indices) in A.
['N = int(input())\na = input().split()\nans = 0\nmin = max(a)\nfor i in range(0,N):\n\ta[i] = int(a[i])\nfor i in range(0,N-1):\n\tfor j in range(1,N):\n\t\tif abs(a[i]-a[j]) < min\n\t\t\tmin = abs(a[i]-a[j])\nprint(min)', 'N = int(input())\na = input().split()\n\n\nfor i in range(0,N):\n\ta[i] = int(a[i])\nmi = 0\nfor i in range(0,N-1):\n\tfor j in range(i+1,N):\n\t\tif abs(a[i]-a[j]) > mi:\n\t\t\tmi = abs(a[i]-a[j])\nprint(mi)']
['Runtime Error', 'Accepted']
['s627536235', 's953314208']
[2940.0, 3060.0]
[17.0, 19.0]
[202, 190]