node_ids
listlengths
4
1.4k
edge_index
listlengths
1
2.22k
text
listlengths
4
1.4k
source
stringlengths
14
427k
[ 7, 15, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 2, 18, 13, 13, 18, 13, 13, 0, 13, 4, 13, 13, 0, 13, 4, 13, 2, 13, 13, 0, 13, 4, 13, 2, 13, 13, 4...
[ [ 87, 3 ], [ 96, 9 ], [ 93, 21 ], [ 25, 24 ], [ 88, 27 ], [ 105, 29 ], [ 97, 32 ], [ 24, 33 ], [ 97, 35 ], [ 24, 36 ], [ 90, 38 ], [ 97, 41 ], [ 102, 43 ], [ ...
[ "from math import ceil, floor\n\nn = int(input())\nls = list(map(int, input().split()))\nsqsm = 0\nfor i in range(n):\n sqsm += ls[i] * ls[i]\nsm = sum(ls)\nx1 = floor(sm / n)\nx2 = ceil(sm / n)\nprint(min(sqsm + n * x1 * x1 - 2 * sm * x1, sqsm + n * x2 * x2 - 2 * sm * x2))", "from math import ceil, floor", ...
from math import ceil, floor n = int(input()) ls = list(map(int, input().split())) sqsm = 0 for i in range(n): sqsm += ls[i] * ls[i] sm = sum(ls) x1 = floor(sm / n) x2 = ceil(sm / n) print(min(sqsm + n * x1 * x1 - 2 * sm * x1, sqsm + n * x2 * x2 - 2 * sm * x2))
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 13, 0, 13, 4, 13, 13, 0, 13, 2, 17, 17, 28, 13, 4, 13, 13, 2, 13, 17, 0, 13, 17, 28, 13, 13, 0, 13, 2, 13, 13, 0, 13, 2, 13...
[ [ 77, 2 ], [ 86, 8 ], [ 89, 20 ], [ 87, 23 ], [ 74, 25 ], [ 87, 28 ], [ 92, 30 ], [ 36, 35 ], [ 75, 38 ], [ 90, 40 ], [ 83, 43 ], [ 47, 46 ], [ 87, 46 ], [ ...
[ "N = int(input())\nA = list(map(int, input().split()))\n\nmax_A = max(A)\nmin_A = min(A)\n\nans = 10**9\nfor y in range(min_A, max_A+1):\n tmp = 0\n for a in A:\n xsuby = a - y\n tmp += xsuby ** 2\n ans = min(ans, tmp)\n\nprint(ans)", "N = int(input())", "N", "int(input())", "int", ...
N = int(input()) A = list(map(int, input().split())) max_A = max(A) min_A = min(A) ans = 10**9 for y in range(min_A, max_A+1): tmp = 0 for a in A: xsuby = a - y tmp += xsuby ** 2 ans = min(ans, tmp) print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 2, 17, 17, 28, 13, 4, 13, 17, 17, 0, 13, 17, 28, 13, 13, 0, 13, 2, 2, 13, 13, 17, 0, 13, 4, 13, 13, 13, 4, 13, 13, 10, 2, 13, 10, ...
[ [ 62, 2 ], [ 65, 8 ], [ 53, 20 ], [ 26, 25 ], [ 68, 31 ], [ 35, 34 ], [ 66, 34 ], [ 59, 37 ], [ 34, 40 ], [ 25, 41 ], [ 56, 44 ], [ 54, 47 ], [ 57, 47 ], [ ...
[ "n = int(input())\na = list(map(int, input().split()))\n\nans = 10**9\nfor i in range(-100, 101):\n cost = 0\n for j in a:\n cost += (j-i)**2\n ans = min(ans, cost)\nprint(ans)", "n = int(input())", "n", "int(input())", "int", "input()", "input", "a = list(map(int, input().split()))", ...
n = int(input()) a = list(map(int, input().split())) ans = 10**9 for i in range(-100, 101): cost = 0 for j in a: cost += (j-i)**2 ans = min(ans, cost) print(ans)
[ 7, 12, 13, 0, 13, 4, 13, 4, 13, 41, 28, 13, 4, 18, 4, 13, 13, 4, 4, 13, 13, 0, 13, 13, 0, 13, 2, 4, 13, 13, 13, 41, 28, 13, 13, 4, 2, 2, 13, 13, 17, 29, 4, 13, 4, 13, 13, 4, 13, 4, 13, 10, 12, 13 ]
[ [ 5, 4 ], [ 12, 11 ], [ 11, 20 ], [ 23, 22 ], [ 26, 25 ], [ 22, 29 ], [ 4, 30 ], [ 34, 33 ], [ 22, 33 ], [ 33, 38 ], [ 53, 50 ] ]
[ "def c_be_together():\n N = int(input())\n A = [int(i) for i in input().split()]\n a_ave = sum(A) // N\n return min(sum([(a - option)**2 for a in A]) for option in (a_ave, a_ave + 1))\n\nprint(c_be_together())", "def c_be_together():\n N = int(input())\n A = [int(i) for i in input().split()]\n ...
def c_be_together(): N = int(input()) A = [int(i) for i in input().split()] a_ave = sum(A) // N return min(sum([(a - option)**2 for a in A]) for option in (a_ave, a_ave + 1)) print(c_be_together())
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 2, 17, 17, 28, 13, 4, 13, 17, 17, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 2, 2, 18, 13, 13, 13, 17, 0, 13, 4, 13, 13, 13, 4, 13, 13, ...
[ [ 69, 2 ], [ 60, 8 ], [ 72, 20 ], [ 26, 25 ], [ 57, 31 ], [ 35, 34 ], [ 70, 37 ], [ 66, 39 ], [ 61, 43 ], [ 34, 44 ], [ 25, 45 ], [ 63, 48 ], [ 67, 51 ], [ ...
[ "n=int(input())\na=list(map(int,input().split()))\n\nmn=10**18\nfor i in range(-100,101):\n sm=0\n for k in range(n):\n sm+=(a[k]-i)**2\n mn=min(sm,mn)\n\nprint(mn)", "n=int(input())", "n", "int(input())", "int", "input()", "input", "a=list(map(int,input().split()))", "a", "list(ma...
n=int(input()) a=list(map(int,input().split())) mn=10**18 for i in range(-100,101): sm=0 for k in range(n): sm+=(a[k]-i)**2 mn=min(sm,mn) print(mn)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 2, 4, 13, 13, 13, 0, 13, 17, 28, 13, 13, 0, 13, 2, 2, 13, 13, 17, 4, 13, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 1...
[ [ 54, 2 ], [ 45, 8 ], [ 48, 20 ], [ 46, 26 ], [ 55, 27 ], [ 51, 29 ], [ 33, 32 ], [ 46, 32 ], [ 57, 35 ], [ 49, 38 ], [ 32, 39 ], [ 58, 43 ], [ 52, 43 ], [ ...
[ "n = int(input())\nls = list(map(int,input().split()))\nmd = round(sum(ls)/n)\np = 0\nfor i in ls:\n p += (md-i)**2\nprint(p)", "n = int(input())", "n", "int(input())", "int", "input()", "input", "ls = list(map(int,input().split()))", "ls", "list(map(int,input().split()))", "list", "map(int...
n = int(input()) ls = list(map(int,input().split())) md = round(sum(ls)/n) p = 0 for i in ls: p += (md-i)**2 print(p)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 2, 17, 17, 28, 13, 4, 13, 4, 13, 13, 2, 4, 13, 13, 17, 0, 13, 17, 28, 13, 13, 0, 13, 2, 2, 13, 13, 17, 14, 40, 13, 13, 0, 13, 13, ...
[ [ 66, 2 ], [ 63, 8 ], [ 75, 20 ], [ 26, 25 ], [ 64, 30 ], [ 64, 34 ], [ 72, 37 ], [ 41, 40 ], [ 64, 40 ], [ 60, 43 ], [ 40, 46 ], [ 25, 47 ], [ 61, 51 ], [ ...
[ "n = int(input())\na = list(map(int, input().split()))\n\nt = 10**9\nfor i in range(min(a),max(a)+1):\n num = 0\n for h in a:\n num += (h-i)**2\n if num <= t:\n t = num\nprint(t)", "n = int(input())", "n", "int(input())", "int", "input()", "input", "a = list(map(int, input().spl...
n = int(input()) a = list(map(int, input().split())) t = 10**9 for i in range(min(a),max(a)+1): num = 0 for h in a: num += (h-i)**2 if num <= t: t = num print(t)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 2, 4, 13, 13, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 2, 2, 18, 13, 13, 13, 17, 0, 13, 2, 2, 2, 18, 13, 13, 13, 17, 17...
[ [ 67, 2 ], [ 73, 8 ], [ 70, 20 ], [ 74, 24 ], [ 68, 25 ], [ 82, 27 ], [ 82, 30 ], [ 34, 33 ], [ 68, 36 ], [ 64, 38 ], [ 74, 42 ], [ 33, 43 ], [ 71, 44 ], [ ...
[ "n = int(input())\na = list(map(int,input().split()))\nave = sum(a)//n\nb = c = 0\nfor i in range(n):\n b += (a[i]-ave)**2\n c += (a[i] - ave - 1)**2\nprint(min(b,c))", "n = int(input())", "n", "int(input())", "int", "input()", "input", "a = list(map(int,input().split()))", "a", "list(map(in...
n = int(input()) a = list(map(int,input().split())) ave = sum(a)//n b = c = 0 for i in range(n): b += (a[i]-ave)**2 c += (a[i] - ave - 1)**2 print(min(b,c))
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 13, 0, 13, 4, 13, 13, 0, 13, 39, 28, 13, 4, 13, 13, 2, 13, 17, 0, 13, 17, 28, 13, 13, 0, 13, 2, 2, 13, 13, 17, 4, 18, 13, 1...
[ [ 70, 2 ], [ 73, 8 ], [ 76, 20 ], [ 74, 23 ], [ 79, 25 ], [ 74, 28 ], [ 67, 30 ], [ 34, 33 ], [ 77, 36 ], [ 80, 38 ], [ 64, 41 ], [ 45, 44 ], [ 74, 44 ], [ ...
[ "n = int(input())\na = list(map(int, input().split()))\n\nb = min(a)\nc = max(a)\nans = []\nfor i in range(b, c+1):\n res = 0\n for j in a:\n res += (j - i)**2\n ans.append(res)\n\nprint(min(ans))", "n = int(input())", "n", "int(input())", "int", "input()", "input", "a = list(map(int, input().sp...
n = int(input()) a = list(map(int, input().split())) b = min(a) c = max(a) ans = [] for i in range(b, c+1): res = 0 for j in a: res += (j - i)**2 ans.append(res) print(min(ans))
[ 7, 0, 13, 4, 13, 4, 13, 41, 28, 13, 4, 18, 4, 13, 13, 4, 4, 13, 13, 0, 13, 13, 0, 13, 17, 28, 13, 4, 13, 17, 17, 0, 13, 17, 28, 13, 13, 0, 13, 2, 2, 13, 13, 17, 0, 13, 4, 13, 13, 13, 4, 13, 13, 10, 4, 13, ...
[ [ 66, 2 ], [ 10, 9 ], [ 9, 18 ], [ 63, 20 ], [ 57, 23 ], [ 27, 26 ], [ 60, 32 ], [ 36, 35 ], [ 64, 35 ], [ 69, 38 ], [ 35, 41 ], [ 26, 42 ], [ 54, 45 ], [ 5...
[ "n=int(input())\na=[int(i) for i in input().split()]\n\nans=10000000000000000\nfor criterion in range(-100,101):\n result=0\n for i in a:\n result+=(i-criterion)**2\n ans=min(ans,result)\nprint(ans)", "n=int(input())", "n", "int(input())", "int", "input()", "input", "int(i) for i in in...
n=int(input()) a=[int(i) for i in input().split()] ans=10000000000000000 for criterion in range(-100,101): result=0 for i in a: result+=(i-criterion)**2 ans=min(ans,result) print(ans)
[ 7, 15, 13, 15, 13, 4, 18, 13, 13, 17, 15, 15, 13, 15, 13, 0, 13, 2, 2, 17, 17, 17, 0, 13, 2, 17, 17, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 13, 28, 13, 4, 13, 17, 17, 0, 13, ...
[ [ 93, 16 ], [ 99, 23 ], [ 87, 28 ], [ 102, 34 ], [ 90, 46 ], [ 100, 47 ], [ 50, 49 ], [ 96, 55 ], [ 59, 58 ], [ 88, 61 ], [ 84, 63 ], [ 49, 66 ], [ 103, 68 ], [...
[ "import sys\nimport itertools\nsys.setrecursionlimit(1000000000)\nfrom heapq import heapify,heappop,heappush,heappushpop\nimport math\nimport collections\nMOD = 10**9+7\nMAX = 10**18\nn = int(input())\na = list(map(int,input().split()))\nans = MAX\nfor i in range(-100,101):\n cost = 0\n for j in range(n):\n ...
import sys import itertools sys.setrecursionlimit(1000000000) from heapq import heapify,heappop,heappush,heappushpop import math import collections MOD = 10**9+7 MAX = 10**18 n = int(input()) a = list(map(int,input().split())) ans = MAX for i in range(-100,101): cost = 0 for j in range(n): cost += (i-a[...
[ 7, 12, 13, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 2, 4, 13, 13, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 17, 4, 13, 13, 0, 13, 2, 2, 13, 18, 13, 13, 2, 13, 18, 13, 13, 4...
[ [ 5, 4 ], [ 11, 10 ], [ 23, 22 ], [ 10, 28 ], [ 10, 31 ], [ 34, 33 ], [ 37, 36 ], [ 10, 42 ], [ 45, 44 ], [ 22, 47 ], [ 10, 49 ], [ 36, 50 ], [ 22, 52 ], [ ...
[ "def main():\n n=int(input())\n num = list(map(int,input().split()))\n ave=round(sum(num)/len(num))\n ans=0\n for i in range(0,len(num)):\n ans+=(ave-num[i])*(ave-num[i])\n print(ans)\n\nmain()", "def main():\n n=int(input())\n num = list(map(int,input().split()))\n ave=round(sum(num)/len(num))\n ans...
def main(): n=int(input()) num = list(map(int,input().split())) ave=round(sum(num)/len(num)) ans=0 for i in range(0,len(num)): ans+=(ave-num[i])*(ave-num[i]) print(ans) main()
[ 7, 15, 13, 0, 13, 18, 18, 13, 13, 13, 0, 13, 2, 2, 17, 17, 17, 0, 13, 4, 13, 17, 4, 18, 13, 13, 2, 17, 17, 12, 13, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 13, 28, 13, 4, 13, ...
[ [ 90, 4 ], [ 96, 11 ], [ 87, 18 ], [ 33, 32 ], [ 91, 36 ], [ 39, 38 ], [ 91, 47 ], [ 51, 50 ], [ 88, 51 ], [ 54, 53 ], [ 60, 59 ], [ 63, 62 ], [ 38, 62 ], [ ...
[ "import sys\n\nreadline = sys.stdin.readline\nMOD = 10 ** 9 + 7\nINF = float('INF')\nsys.setrecursionlimit(10 ** 5)\n\n\ndef main():\n n = int(readline())\n a = list(map(int, readline().split()))\n\n ans = INF\n for i in range(-100, 101):\n score = 0\n for x in a:\n score += (x ...
import sys readline = sys.stdin.readline MOD = 10 ** 9 + 7 INF = float('INF') sys.setrecursionlimit(10 ** 5) def main(): n = int(readline()) a = list(map(int, readline().split())) ans = INF for i in range(-100, 101): score = 0 for x in a: score += (x - i) ** 2 ans...
[ 7, 15, 13, 13, 13, 13, 0, 13, 4, 13, 4, 13, 41, 28, 13, 4, 18, 4, 13, 13, 17, 4, 4, 13, 13, 0, 13, 13, 0, 13, 4, 13, 17, 28, 13, 4, 13, 17, 17, 0, 13, 17, 28, 13, 13, 0, 13, 2, 2, 13, 13, 17, 0, 13, 4, 13, ...
[ [ 74, 7 ], [ 15, 14 ], [ 14, 24 ], [ 68, 26 ], [ 77, 29 ], [ 35, 34 ], [ 71, 40 ], [ 44, 43 ], [ 69, 43 ], [ 62, 46 ], [ 43, 49 ], [ 34, 50 ], [ 65, 53 ], [ ...
[ "import os, sys, re, math\n\nN = int(input())\na = [int(s) for s in input().split(' ')]\n\nret = float('inf')\nfor i in range(-100,101):\n s = 0\n for aj in a:\n s += (aj - i) ** 2\n ret = min(ret,s)\n\nprint(ret)", "import os, sys, re, math", "os", "sys", "re", "math", "N = int(input())...
import os, sys, re, math N = int(input()) a = [int(s) for s in input().split(' ')] ret = float('inf') for i in range(-100,101): s = 0 for aj in a: s += (aj - i) ** 2 ret = min(ret,s) print(ret)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 4, 13, 13, 0, 13, 2, 17, 17, 28, 13, 4, 13, 4, 13, 13, 2, 4, 13, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 2, 2, 2, 18, ...
[ [ 93, 2 ], [ 96, 8 ], [ 84, 20 ], [ 97, 25 ], [ 90, 27 ], [ 33, 32 ], [ 97, 37 ], [ 97, 41 ], [ 81, 44 ], [ 48, 47 ], [ 94, 50 ], [ 87, 52 ], [ 97, 57 ], [ ...
[ "# N =int(input())\n# a = list(map(int,input().split()))\n# ans = (10**9)\n# for av in range(min(a),max(a)+1):\n# Sum = 0\n# for i in range(N):\n# Sum += (a[i]-av)**2\n# if Sum < ans:\n# ans = Sum\n# print(ans)\n\nN =int(input())\na = list(map(int,input().split()))\nb = list(set(a))\na...
# N =int(input()) # a = list(map(int,input().split())) # ans = (10**9) # for av in range(min(a),max(a)+1): # Sum = 0 # for i in range(N): # Sum += (a[i]-av)**2 # if Sum < ans: # ans = Sum # print(ans) N =int(input()) a = list(map(int,input().split())) b = list(set(a)) ans = (10**9) for av...
[ 7, 15, 13, 15, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 13, 14, 2, 2, 13, 4, 18, 13, 13, 13, 17, 0, 13, 4, 18, 13, 13, 13, 0, 13, 2, 4, 18, 13, 13, 13, 17, 0, 13, 17, ...
[ [ 85, 5 ], [ 73, 11 ], [ 76, 23 ], [ 74, 26 ], [ 77, 30 ], [ 77, 35 ], [ 70, 38 ], [ 77, 43 ], [ 79, 45 ], [ 77, 51 ], [ 88, 54 ], [ 58, 57 ], [ 74, 57 ], [ ...
[ "import math\nfrom statistics import mean\n\nn = int(input())\na = list(map(int, input().split()))\n\nm = mean(a)\nif m - math.floor(m) < 0.5:\n m = math.floor(m)\nelse:\n m = math.floor(m) + 1\n\ndiff = 0\nfor v in a:\n diff += (m - v) ** 2\n\nprint(diff)", "import math", "math", "from statistics im...
import math from statistics import mean n = int(input()) a = list(map(int, input().split())) m = mean(a) if m - math.floor(m) < 0.5: m = math.floor(m) else: m = math.floor(m) + 1 diff = 0 for v in a: diff += (m - v) ** 2 print(diff)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 18, 13, 13, 0, 13, 4, 13, 2, 13, 13, 0, 13, 2, 13, 17, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 0, 1...
[ [ 95, 2 ], [ 89, 8 ], [ 98, 20 ], [ 24, 23 ], [ 96, 26 ], [ 86, 28 ], [ 90, 30 ], [ 23, 31 ], [ 83, 33 ], [ 87, 37 ], [ 99, 37 ], [ 96, 38 ], [ 80, 40 ], [ ...
[ "n = int(input())\na = list(map(int,input().split()))\nb = 0\n\nfor i in range(n):\n b += a[i]\n\nc = int(b/n)\nd = c + 1\ne = 0\nf = 0\n\nfor i in range(n):\n e += (a[i]-c)**2\n f += (a[i]-d)**2\n\nprint(min(e,f))\n", "n = int(input())", "n", "int(input())", "int", "input()", "input", "a = l...
n = int(input()) a = list(map(int,input().split())) b = 0 for i in range(n): b += a[i] c = int(b/n) d = c + 1 e = 0 f = 0 for i in range(n): e += (a[i]-c)**2 f += (a[i]-d)**2 print(min(e,f))
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 39, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 2, 4, 13, 13, 13, 14, 2, 13, 2, 4, 13, 13, 17, 0, 13, 4, 13, 13, 0, 13, 2, 4, 13, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13,...
[ [ 76, 2 ], [ 82, 8 ], [ 73, 11 ], [ 88, 23 ], [ 74, 27 ], [ 83, 27 ], [ 77, 28 ], [ 89, 31 ], [ 89, 35 ], [ 79, 38 ], [ 89, 41 ], [ 85, 43 ], [ 89, 47 ], [ ...
[ "n=int(input())\na=[]\na=list(map(int,input().split()))\nave=sum(a)/n\nif ave<int(ave)+0.5:\n ave=int(ave)\nelse:\n ave=int(ave)+1\nans=0\nfor i in range(n):\n ans+=(a[i]-ave)**2\nprint(ans)", "n=int(input())", "n", "int(input())", "int", "input()", "input", "a=[]", "a", "[]", "a=list(map(int...
n=int(input()) a=[] a=list(map(int,input().split())) ave=sum(a)/n if ave<int(ave)+0.5: ave=int(ave) else: ave=int(ave)+1 ans=0 for i in range(n): ans+=(a[i]-ave)**2 print(ans)
[ 7, 15, 13, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 0, 13, 13, 0, 13, 2, 13, 17, 14, 2, 2, 13, 13, 17, 4, 13, 4, 13, 2, 13, 2, 2, 13, 17, 13, 0, 13...
[ [ 116, 4 ], [ 110, 10 ], [ 128, 22 ], [ 128, 25 ], [ 29, 28 ], [ 111, 28 ], [ 131, 31 ], [ 28, 32 ], [ 107, 34 ], [ 28, 36 ], [ 132, 41 ], [ 123, 41 ], [ 117, 42 ...
[ "import math\n\nn = int(input())\ns = list(map(int,input().split()))\n\nb = c = 0\nfor i in s:\n b += i\n c += i**2\n\nif b%n == 0:\n print(int(c-b**2/n))\nelse:\n koho1 = math.floor(b/n)\n koho2 = math.ceil(b/n)\n ans = min(n*(koho1**2)-2*b*koho1+c,n*(koho2**2)-2*b*koho2+c)\n print(ans)", "i...
import math n = int(input()) s = list(map(int,input().split())) b = c = 0 for i in s: b += i c += i**2 if b%n == 0: print(int(c-b**2/n)) else: koho1 = math.floor(b/n) koho2 = math.ceil(b/n) ans = min(n*(koho1**2)-2*b*koho1+c,n*(koho2**2)-2*b*koho2+c) print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 41, 28, 13, 4, 18, 4, 13, 13, 4, 4, 13, 13, 0, 13, 13, 0, 13, 39, 28, 13, 4, 13, 17, 17, 17, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 2, 2, 18, 13, 13, 13, 17, 4, 18, 13, 13, 13, 4, 13, ...
[ [ 63, 2 ], [ 10, 9 ], [ 9, 18 ], [ 66, 20 ], [ 69, 23 ], [ 27, 26 ], [ 72, 33 ], [ 37, 36 ], [ 64, 39 ], [ 60, 41 ], [ 67, 45 ], [ 36, 46 ], [ 26, 47 ], [ 7...
[ "N = int(input())\na = [int(x) for x in input().split()]\nans = []\nfor i in range(-100, 101, 1):\n v = 0\n for j in range(N):\n v += (a[j] - i) ** 2\n ans.append(v)\nprint(min(ans))", "N = int(input())", "N", "int(input())", "int", "input()", "input", "int(x) for x in input().split()"...
N = int(input()) a = [int(x) for x in input().split()] ans = [] for i in range(-100, 101, 1): v = 0 for j in range(N): v += (a[j] - i) ** 2 ans.append(v) print(min(ans))
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 2, 17, 17, 28, 13, 4, 13, 17, 17, 0, 13, 17, 28, 13, 13, 0, 13, 2, 2, 13, 13, 17, 0, 13, 4, 13, 13, 13, 4, 13, 13, 10, 4, 13, 10, ...
[ [ 59, 2 ], [ 53, 8 ], [ 68, 20 ], [ 26, 25 ], [ 62, 31 ], [ 35, 34 ], [ 54, 34 ], [ 56, 37 ], [ 34, 40 ], [ 25, 41 ], [ 65, 44 ], [ 69, 47 ], [ 66, 47 ], [ ...
[ "n = int(input())\nA = list(map(int,input().split()))\nans = 10**9\nfor i in range(-100,101):\n tmp = 0\n for a in A:\n tmp += (a-i)**2\n ans = min(ans, tmp)\nprint(ans)", "n = int(input())", "n", "int(input())", "int", "input()", "input", "A = list(map(int,input().split()))", "A", "list(map...
n = int(input()) A = list(map(int,input().split())) ans = 10**9 for i in range(-100,101): tmp = 0 for a in A: tmp += (a-i)**2 ans = min(ans, tmp) print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 2, 4, 13, 13, 13, 0, 13, 17, 28, 13, 13, 0, 13, 2, 2, 13, 13, 17, 4, 13, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 2, 13, 10...
[ [ 51, 2 ], [ 45, 8 ], [ 48, 20 ], [ 46, 26 ], [ 52, 27 ], [ 57, 29 ], [ 33, 32 ], [ 46, 32 ], [ 54, 35 ], [ 32, 38 ], [ 49, 39 ], [ 55, 43 ], [ 58, 43 ], [ ...
[ "n = int(input())\na_list = list(map(int,input().split()))\nmid = round(sum(a_list)/n)\nans = 0\nfor a in a_list:\n ans += (a-mid) ** 2\nprint(ans)", "n = int(input())", "n", "int(input())", "int", "input()", "input", "a_list = list(map(int,input().split()))", "a_list", "list(map(int,input().sp...
n = int(input()) a_list = list(map(int,input().split())) mid = round(sum(a_list)/n) ans = 0 for a in a_list: ans += (a-mid) ** 2 print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 39, 28, 13, 4, 13, 17, 17, 0, 13, 17, 28, 13, 13, 0, 13, 2, 2, 13, 13, 17, 4, 18, 13, 13, 13, 0, 13, 4, 13, 13, 4, 13, 13, 10, 4, ...
[ [ 55, 2 ], [ 61, 8 ], [ 64, 20 ], [ 24, 23 ], [ 67, 29 ], [ 33, 32 ], [ 62, 32 ], [ 70, 35 ], [ 23, 38 ], [ 32, 39 ], [ 65, 43 ], [ 71, 45 ], [ 68, 45 ], [ ...
[ "N = int(input())\nl = list(map(int, input().split()))\ncal = []\nfor i in range(-100,101):\n a = 0\n for j in l:\n a += (i - j)**2\n cal.append(a)\n\nans = min(cal)\nprint(ans)", "N = int(input())", "N", "int(input())", "int", "input()", "input", "l = list(map(int, input().split()))",...
N = int(input()) l = list(map(int, input().split())) cal = [] for i in range(-100,101): a = 0 for j in l: a += (i - j)**2 cal.append(a) ans = min(cal) print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 2, 17, 17, 28, 13, 4, 13, 17, 17, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 2, 4, 13, 2, 18, 13, 13, 13, 17, 0, 13, 4, 13, 13, 13, 4, 1...
[ [ 65, 2 ], [ 74, 8 ], [ 62, 20 ], [ 26, 25 ], [ 68, 31 ], [ 35, 34 ], [ 66, 37 ], [ 71, 39 ], [ 75, 45 ], [ 34, 46 ], [ 25, 47 ], [ 59, 50 ], [ 63, 53 ], [ ...
[ "N=int(input())\na=list(map(int,input().split()))\nans=10**9\nfor i in range(-100,101):\n bns=0\n for j in range(N):\n bns+=(abs(a[j]-i)**2)\n ans=min(ans,bns)\nprint(ans)", "N=int(input())", "N", "int(input())", "int", "input()", "input", "a=list(map(int,input().split()))", "a", "list(map(i...
N=int(input()) a=list(map(int,input().split())) ans=10**9 for i in range(-100,101): bns=0 for j in range(N): bns+=(abs(a[j]-i)**2) ans=min(ans,bns) print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 18, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 39, 13, 0, 13, 4, 13, 2, 4, 13, 13, 13, 0, 13, 12, 2, 2, 13, 13, 17, 23, 4, 13, 4, 13, 4, 13, 4, 13, 13, 13, 10, 12, 13, 10, 18, 13, ...
[ [ 57, 2 ], [ 54, 8 ], [ 60, 23 ], [ 55, 29 ], [ 58, 30 ], [ 51, 32 ], [ 61, 37 ], [ 52, 48 ], [ 55, 49 ], [ 51, 52 ], [ 54, 55 ], [ 57, 58 ], [ 60, 61 ] ]
[ "N = int(input())\nL = list(map(int, input().split()))[:N]\n\nstart = round(sum(L) / N)\nf = lambda x: (x - start)**2\n\nprint(sum(list(map(f, L))))", "N = int(input())", "N", "int(input())", "int", "input()", "input", "L = list(map(int, input().split()))[:N]", "L", "list(map(int, input().split())...
N = int(input()) L = list(map(int, input().split()))[:N] start = round(sum(L) / N) f = lambda x: (x - start)**2 print(sum(list(map(f, L))))
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 2, 4, 13, 13, 13, 0, 13, 39, 28, 13, 4, 13, 4, 13, 13, 2, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 2, 2, 13, 18, 13, 13...
[ [ 69, 2 ], [ 72, 8 ], [ 75, 20 ], [ 73, 26 ], [ 70, 27 ], [ 84, 29 ], [ 33, 32 ], [ 73, 37 ], [ 76, 39 ], [ 78, 42 ], [ 46, 45 ], [ 70, 48 ], [ 81, 50 ], [ ...
[ "N = int(input())\na = list(map(int, input().split()))\navg = round(sum(a)/N)\nsums = []\nfor i in range(min(a), avg+1):\n s = 0\n for j in range(N):\n s += (i-a[j])**2\n sums.append(s)\nprint(min(sums))", "N = int(input())", "N", "int(input())", "int", "input()", "input", "a = list(ma...
N = int(input()) a = list(map(int, input().split())) avg = round(sum(a)/N) sums = [] for i in range(min(a), avg+1): s = 0 for j in range(N): s += (i-a[j])**2 sums.append(s) print(min(sums))
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 17, 17, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 2, 2, 18, 13, 13, 13, 17, 0, 13, 4, 13, 13, 13, 4, 13, 13, 10, 4, ...
[ [ 67, 2 ], [ 55, 8 ], [ 64, 20 ], [ 24, 23 ], [ 58, 29 ], [ 33, 32 ], [ 68, 35 ], [ 61, 37 ], [ 56, 41 ], [ 32, 42 ], [ 23, 43 ], [ 70, 46 ], [ 65, 49 ], [ ...
[ "a = int(input())\nb = list(map(int,input().split()))\nans = 4000000\n\nfor i in range(-100,101):\n ans_sub = 0\n for j in range(a):\n ans_sub += (b[j]-i)**2\n ans = min(ans,ans_sub)\nprint(ans)", "a = int(input())", "a", "int(input())", "int", "input()", "input", "b = list(map(int,inp...
a = int(input()) b = list(map(int,input().split())) ans = 4000000 for i in range(-100,101): ans_sub = 0 for j in range(a): ans_sub += (b[j]-i)**2 ans = min(ans,ans_sub) print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 17, 17, 0, 13, 17, 28, 13, 13, 0, 13, 2, 2, 13, 13, 17, 0, 13, 4, 13, 13, 13, 4, 13, 13, 10, 4, 13, 10, 17, 13, ...
[ [ 66, 2 ], [ 57, 8 ], [ 54, 20 ], [ 24, 23 ], [ 63, 29 ], [ 33, 32 ], [ 58, 32 ], [ 60, 35 ], [ 32, 38 ], [ 23, 39 ], [ 51, 42 ], [ 55, 45 ], [ 52, 45 ], [ ...
[ "n = int(input())\n\na = list(map(int,input().split()))\n\nans = 100010001000\n\nfor i in range(-100,101):\n total = 0\n for j in a:\n total += (j-i)**2\n \n ans = min(ans,total)\n \nprint(ans)", "n = int(input())", "n", "int(input())", "int", "input()", "input", "a = list(map(in...
n = int(input()) a = list(map(int,input().split())) ans = 100010001000 for i in range(-100,101): total = 0 for j in a: total += (j-i)**2 ans = min(ans,total) print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 41, 28, 13, 4, 18, 4, 13, 13, 4, 4, 13, 13, 0, 13, 13, 0, 13, 4, 13, 2, 4, 13, 13, 4, 13, 13, 0, 13, 39, 2, 13, 17, 2, 13, 17, 2, 13, 17, 13, 2, 13, 17, 2, 13, 17, 2, 13, 17, 0, 13...
[ [ 92, 2 ], [ 10, 9 ], [ 9, 18 ], [ 98, 20 ], [ 104, 23 ], [ 99, 29 ], [ 99, 32 ], [ 86, 34 ], [ 105, 37 ], [ 105, 40 ], [ 105, 43 ], [ 105, 47 ], [ 105, 50 ], [...
[ "n = int(input())\na = [int(i) for i in input().split()]\nnum = int(sum(a) / len(a))\ncheck = [num -3, num - 2, num -1, num, num + 1, num + 2, num +3]\nans = float('inf')\nfor i in check:\n cnt = 0\n for j in a:\n cnt += (i - j) ** 2\n\n ans = min(ans, cnt)\nprint(ans)", "n = int(input())", "n",...
n = int(input()) a = [int(i) for i in input().split()] num = int(sum(a) / len(a)) check = [num -3, num - 2, num -1, num, num + 1, num + 2, num +3] ans = float('inf') for i in check: cnt = 0 for j in a: cnt += (i - j) ** 2 ans = min(ans, cnt) print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 2, 4, 13, 13, 13, 0, 13, 17, 28, 13, 13, 0, 13, 2, 2, 13, 13, 17, 4, 13, 13, 10, 2, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 1...
[ [ 48, 2 ], [ 57, 8 ], [ 51, 20 ], [ 58, 26 ], [ 49, 27 ], [ 54, 29 ], [ 33, 32 ], [ 58, 32 ], [ 45, 35 ], [ 32, 38 ], [ 52, 39 ], [ 46, 43 ], [ 55, 43 ], [ ...
[ "n = int(input())\na = list(map(int, input().split()))\navg_a = round(sum(a)/n)\n\nresult = 0\nfor num in a:\n result += (num-avg_a)**2\n\nprint(result)", "n = int(input())", "n", "int(input())", "int", "input()", "input", "a = list(map(int, input().split()))", "a", "list(map(int, input().split...
n = int(input()) a = list(map(int, input().split())) avg_a = round(sum(a)/n) result = 0 for num in a: result += (num-avg_a)**2 print(result)
[ 7, 12, 13, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 17, 28, 13, 4, 13, 17, 2, 17, 17, 0, 13, 17, 28, 13, 13, 0, 13, 2, 2, 13, 13, 17, 0, 13, 4, 13, 13, 13, 4, 13, 13, ...
[ [ 5, 4 ], [ 11, 10 ], [ 23, 22 ], [ 28, 27 ], [ 36, 35 ], [ 39, 38 ], [ 10, 38 ], [ 42, 41 ], [ 27, 44 ], [ 38, 45 ], [ 49, 48 ], [ 22, 51 ], [ 48, 51 ], [ ...
[ "def solve():\n N = int(input())\n A = list(map(int,input().split()))\n\n ans = float('inf')\n for i in range(-100, 100+1):\n cnt = 0\n for a in A:\n cnt += (i-a) ** 2 \n ans = min(ans, cnt)\n \n print(ans)\n\nif __name__ == '__main__':\n solve()", "def solve()...
def solve(): N = int(input()) A = list(map(int,input().split())) ans = float('inf') for i in range(-100, 100+1): cnt = 0 for a in A: cnt += (i-a) ** 2 ans = min(ans, cnt) print(ans) if __name__ == '__main__': solve()
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 2, 4, 13, 13, 4, 13, 13, 0, 13, 17, 28, 13, 13, 14, 2, 13, 13, 9, 0, 13, 2, 2, 13, 13, 17, 4, 13, 13, 10, 4, 13, 10, 17, 13...
[ [ 64, 2 ], [ 52, 8 ], [ 61, 20 ], [ 53, 26 ], [ 53, 29 ], [ 55, 31 ], [ 35, 34 ], [ 53, 34 ], [ 34, 38 ], [ 62, 39 ], [ 58, 42 ], [ 34, 45 ], [ 62, 46 ], [ ...
[ "N = int(input())\nS = list(map(int,input().split()))\nave = round(sum(S) / len(S))\nans = 0\nfor i in S:\n if i == ave:\n continue\n else:\n ans += (i - ave) ** 2\n\nprint(ans)", "N = int(input())", "N", "int(input())", "int", "input()", "input", "S = list(map(int,input().split()))...
N = int(input()) S = list(map(int,input().split())) ave = round(sum(S) / len(S)) ans = 0 for i in S: if i == ave: continue else: ans += (i - ave) ** 2 print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 41, 28, 13, 4, 18, 4, 13, 13, 4, 4, 13, 13, 0, 13, 13, 0, 13, 2, 17, 17, 28, 13, 4, 13, 4, 13, 13, 2, 4, 13, 13, 17, 0, 13, 4, 13, 13, 4, 13, 2, 2, 13, 13, 17, 4, 13, 13, 10, 13, 1...
[ [ 61, 2 ], [ 10, 9 ], [ 9, 18 ], [ 55, 20 ], [ 58, 23 ], [ 29, 28 ], [ 56, 33 ], [ 56, 37 ], [ 64, 40 ], [ 59, 43 ], [ 65, 43 ], [ 28, 48 ], [ 65, 53 ], [ 5...
[ "N = int(input())\nA = [int(T) for T in input().split()]\nMin = 10**9\nfor TN in range(min(A),max(A)+1):\n Min = min(Min,sum((TN-TA)**2 for TA in A))\nprint(Min)", "N = int(input())", "N", "int(input())", "int", "input()", "input", "int(T) for T in input().split()", "for T in input().split()", ...
N = int(input()) A = [int(T) for T in input().split()] Min = 10**9 for TN in range(min(A),max(A)+1): Min = min(Min,sum((TN-TA)**2 for TA in A)) print(Min)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 2, 4, 13, 13, 13, 4, 13, 4, 13, 2, 2, 13, 13, 17, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 38, 2 ], [ 44, 8 ], [ 41, 20 ], [ 45, 26 ], [ 39, 27 ], [ 42, 35 ], [ 38, 39 ], [ 41, 42 ], [ 44, 45 ] ]
[ "N = int(input())\nA = list(map(int,input().split()))\nm = round(sum(A)/N)\nprint(sum((a-m)**2 for a in A))", "N = int(input())", "N", "int(input())", "int", "input()", "input", "A = list(map(int,input().split()))", "A", "list(map(int,input().split()))", "list", "map(int,input().split())", "...
N = int(input()) A = list(map(int,input().split())) m = round(sum(A)/N) print(sum((a-m)**2 for a in A))
[ 7, 12, 13, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 17, 0, 13, 39, 28, 13, 4, 13, 4, 13, 13, 2, 4, 13, 13, 17, 28, 13, 13, 14, 40, 13, 13, 0, 13, 2, 2, 13, 13, 17, 4, 18, 13, ...
[ [ 5, 4 ], [ 11, 10 ], [ 23, 22 ], [ 26, 25 ], [ 29, 28 ], [ 10, 33 ], [ 10, 37 ], [ 41, 40 ], [ 10, 40 ], [ 28, 44 ], [ 40, 45 ], [ 48, 47 ], [ 28, 50 ], [ ...
[ "# -*- coding: utf-8 -*-\n\ndef main():\n\n \n N = int(input())\n a = list(map(int, input().split()))\n\n cost = 0\n listCost = []\n\n for i in range(min(a), max(a)+1):\n for j in a:\n if i != j:\n cost += (i - j) ** 2\n\n listCost.append(cost)\n cost...
# -*- coding: utf-8 -*- def main(): N = int(input()) a = list(map(int, input().split())) cost = 0 listCost = [] for i in range(min(a), max(a)+1): for j in a: if i != j: cost += (i - j) ** 2 listCost.append(cost) cost = 0 ans = min(li...
[ 7, 15, 13, 12, 13, 12, 13, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 2, 4, 13, 13, 13, 0, 13, 2, 17, 17, 28, 13, 4, 13, 13, 2, 13, 17, 0, 13, 17, 28, 13, 13, 0, 13, 4, 13, 13, ...
[ [ 9, 8 ], [ 71, 12 ], [ 15, 14 ], [ 71, 23 ], [ 27, 26 ], [ 14, 30 ], [ 8, 31 ], [ 34, 33 ], [ 39, 38 ], [ 26, 41 ], [ 26, 43 ], [ 47, 46 ], [ 50, 49 ], [ 1...
[ "import sys\ndef input(): return sys.stdin.readline().strip()\n\ndef main():\n N = int(input())\n A = list(map(int, input().split()))\n c = sum(A) // N\n ans = 10**10\n for x in range(c, c + 2):\n val = 0\n for a in A: val += (x - a) ** 2\n ans = min(ans, val)\n print(ans)\n\n...
import sys def input(): return sys.stdin.readline().strip() def main(): N = int(input()) A = list(map(int, input().split())) c = sum(A) // N ans = 10**10 for x in range(c, c + 2): val = 0 for a in A: val += (x - a) ** 2 ans = min(ans, val) print(ans) if __name__ == "__m...
[ 7, 0, 13, 4, 13, 4, 13, 41, 28, 13, 4, 18, 4, 13, 13, 17, 4, 4, 13, 13, 0, 13, 13, 0, 13, 4, 13, 2, 4, 13, 13, 13, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 2, 2, 18, 13, 13, 13, 17, 4, 13, 13, 10, 2, 13, 10, ...
[ [ 56, 2 ], [ 10, 9 ], [ 9, 19 ], [ 65, 21 ], [ 59, 24 ], [ 66, 30 ], [ 57, 31 ], [ 62, 33 ], [ 37, 36 ], [ 57, 39 ], [ 53, 41 ], [ 66, 45 ], [ 36, 46 ], [ 6...
[ "q = int(input())\n\nl = [int(x) for x in input().split(' ')]\n\navarage = round(sum(l)/q)\n\ncost = 0\nfor i in range(q):\n cost += (l[i]-avarage)**2\n\nprint(cost)", "q = int(input())", "q", "int(input())", "int", "input()", "input", "int(x) for x in input().split(' ')", "for x in input().split...
q = int(input()) l = [int(x) for x in input().split(' ')] avarage = round(sum(l)/q) cost = 0 for i in range(q): cost += (l[i]-avarage)**2 print(cost)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 39, 0, 13, 4, 13, 13, 0, 13, 4, 13, 13, 28, 13, 4, 13, 13, 2, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 2, 13, 2, 2, 18, 13, 13...
[ [ 82, 2 ], [ 73, 8 ], [ 76, 20 ], [ 70, 23 ], [ 74, 26 ], [ 79, 28 ], [ 74, 31 ], [ 34, 33 ], [ 71, 36 ], [ 80, 38 ], [ 85, 41 ], [ 45, 44 ], [ 83, 47 ], [ ...
[ "n=int(input())\nl=list(map(int,input().split()))\nk=[]\na=min(l)\nb=max(l)\nfor i in range(a,b+1):\n c=0\n for j in range(n):\n c=c+(l[j]-i)**2\n k.append(c)\nprint(min(k))", "n=int(input())", "n", "int(input())", "int", "input()", "input", "l=list(map(int,input().split()))", "l", "list(map...
n=int(input()) l=list(map(int,input().split())) k=[] a=min(l) b=max(l) for i in range(a,b+1): c=0 for j in range(n): c=c+(l[j]-i)**2 k.append(c) print(min(k))
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 2, 4, 13, 13, 13, 17, 0, 13, 17, 28, 13, 13, 0, 13, 2, 2, 13, 13, 17, 4, 13, 4, 13, 13, 10, 4, 13, 10, 17, 13, 10, 2, 13, 1...
[ [ 60, 2 ], [ 57, 8 ], [ 48, 20 ], [ 58, 26 ], [ 61, 27 ], [ 51, 30 ], [ 34, 33 ], [ 58, 33 ], [ 54, 36 ], [ 33, 39 ], [ 49, 40 ], [ 55, 46 ], [ 52, 46 ], [ ...
[ "N = int(input())\nan = list(map(int,input().split()))\nave = round((sum(an)/N),0)\nans = 0\n\nfor i in an:\n ans += (i-ave)**2\n\nprint(int(ans))", "N = int(input())", "N", "int(input())", "int", "input()", "input", "an = list(map(int,input().split()))", "an", "list(map(int,input().split()))"...
N = int(input()) an = list(map(int,input().split())) ave = round((sum(an)/N),0) ans = 0 for i in an: ans += (i-ave)**2 print(int(ans))
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 17, 0, 13, 39, 28, 13, 4, 13, 17, 17, 0, 13, 17, 28, 13, 13, 0, 13, 2, 2, 13, 13, 17, 4, 18, 13, 13, 13, 4, 18, 13, 13, 4, 13, 18, 13, 17, ...
[ [ 60, 2 ], [ 57, 8 ], [ 66, 21 ], [ 25, 24 ], [ 63, 30 ], [ 34, 33 ], [ 58, 33 ], [ 69, 36 ], [ 33, 39 ], [ 24, 40 ], [ 67, 44 ], [ 70, 46 ], [ 64, 46 ], [ ...
[ "n = int(input())\nl = list(map(int,input().split(\" \")))\n\ncost_list = []\n\nfor i in range (-100,101):\n cost = 0\n for j in l:\n cost += (j - i)**2\n cost_list.append(cost)\ncost_list.sort()\nprint(cost_list[0])", "n = int(input())", "n", "int(input())", "int", "input()", "input", ...
n = int(input()) l = list(map(int,input().split(" "))) cost_list = [] for i in range (-100,101): cost = 0 for j in l: cost += (j - i)**2 cost_list.append(cost) cost_list.sort() print(cost_list[0])
[ 7, 12, 13, 0, 13, 17, 28, 13, 13, 0, 13, 2, 2, 13, 13, 17, 29, 13, 23, 13, 23, 13, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 41, 28, 13, 4, 13, 17, 17, 4, 4, 13, 13, 13, 0, 13, 4, 13, ...
[ [ 5, 4 ], [ 8, 7 ], [ 19, 7 ], [ 11, 10 ], [ 7, 13 ], [ 21, 14 ], [ 10, 17 ], [ 4, 17 ], [ 19, 19 ], [ 21, 21 ], [ 67, 23 ], [ 64, 29 ], [ 43, 42 ], [ 62, ...
[ "def sigma(a,r):\n t=0\n for i in a:\n t+=(i-r)**2\n return t\n\n_=int(input())\na=list(map(int,input().split()))\ns=min([sigma(a,r) for r in range(-100,101)])\nprint(s)", "def sigma(a,r):\n t=0\n for i in a:\n t+=(i-r)**2\n return t", "sigma", "t=0", "t", "0", "for i in ...
def sigma(a,r): t=0 for i in a: t+=(i-r)**2 return t _=int(input()) a=list(map(int,input().split())) s=min([sigma(a,r) for r in range(-100,101)]) print(s)
[ 7, 15, 0, 13, 18, 13, 13, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 14, 40, 4, 13, 4, 13, 13, 17, 0, 13, 2, 17, 17, 28, 13, 4, 13, 17, 17, 0, 13, 17, 28, 13, 13, 0, 13, 2, 2, 13, 13, ...
[ [ 92, 3 ], [ 80, 8 ], [ 93, 12 ], [ 77, 14 ], [ 93, 23 ], [ 78, 31 ], [ 86, 34 ], [ 40, 39 ], [ 89, 45 ], [ 49, 48 ], [ 78, 48 ], [ 74, 51 ], [ 48, 54 ], [ ...
[ "from sys import stdin\ninput = stdin.readline\n\nN = int(input())\nA = list(map(int, input().split()))\n\nif len(set(A)) != 1:\n cost = 2**20\n for i in range(-100, 101):\n tc = 0\n for a in A:\n tc += (a-i)**2\n if cost > tc:\n cost = tc\nelse:\n cost = 0\n\npri...
from sys import stdin input = stdin.readline N = int(input()) A = list(map(int, input().split())) if len(set(A)) != 1: cost = 2**20 for i in range(-100, 101): tc = 0 for a in A: tc += (a-i)**2 if cost > tc: cost = tc else: cost = 0 print(cost)
[ 7, 12, 13, 29, 4, 13, 13, 4, 18, 4, 13, 13, 12, 13, 14, 40, 13, 29, 4, 13, 4, 13, 29, 4, 13, 23, 13, 17, 12, 13, 29, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 0, 13, 4, 13, 0, 13, 2, 17, 17, 28, 13,...
[ [ 26, 16 ], [ 27, 26 ], [ 95, 42 ], [ 99, 44 ], [ 113, 46 ], [ 93, 48 ], [ 107, 50 ], [ 56, 55 ], [ 101, 61 ], [ 65, 64 ], [ 114, 69 ], [ 110, 71 ], [ 55, 74 ], ...
[ "def cin():\n\treturn map(int,input().split())\n\ndef cino(test=False):\n if not test:\n return int(input())\n else:\n return input()\ndef cina():\n return list(map(int,input().split()))\n\na = cino()\nl = cina()\nans = 10**18\nfor i in range(-100,101):\n cost = 0\n for j in range(len(l))...
def cin(): return map(int,input().split()) def cino(test=False): if not test: return int(input()) else: return input() def cina(): return list(map(int,input().split())) a = cino() l = cina() ans = 10**18 for i in range(-100,101): cost = 0 for j in range(len(l)): cost += (i-l...
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 2, 17, 17, 28, 13, 4, 13, 17, 0, 13, 17, 0, 13, 17, 28, 13, 13, 4, 13, 13, 0, 13, 2, 2, 13, 13, 17, 0, 13, 2, 2, 13, 13, 17, 0, 13...
[ [ 66, 2 ], [ 87, 8 ], [ 78, 20 ], [ 26, 25 ], [ 81, 30 ], [ 75, 33 ], [ 88, 40 ], [ 84, 42 ], [ 25, 46 ], [ 72, 49 ], [ 25, 53 ], [ 69, 56 ], [ 79, 59 ], [ ...
[ "n=int(input())\na = list(map(int,input().split()))\n\nans = 10**7\nfor i in range(102):\n p = 0\n m = 0\n for j, aa in enumerate(a):\n p += (aa-i)**2\n m += (aa+i)**2\n ans = min(ans,p,m)\n\nprint(ans)", "n=int(input())", "n", "int(input())", "int", "input()", "input", "a = ...
n=int(input()) a = list(map(int,input().split())) ans = 10**7 for i in range(102): p = 0 m = 0 for j, aa in enumerate(a): p += (aa-i)**2 m += (aa+i)**2 ans = min(ans,p,m) print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 2, 4, 13, 13, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 4, 13, 13, 0, 13, 2, 13, 2, 2, 18, 13, 13, 13, 17, 4, 13, 4, 13, 13, 10,...
[ [ 57, 2 ], [ 66, 8 ], [ 63, 20 ], [ 67, 26 ], [ 67, 29 ], [ 60, 31 ], [ 35, 34 ], [ 67, 39 ], [ 69, 41 ], [ 61, 43 ], [ 70, 43 ], [ 67, 47 ], [ 34, 48 ], [ ...
[ "#ABC043C\nn=int(input())\na = list(map(int, input().split()))\nh=round(sum(a)/len(a))\nsum_a=0\nfor i in range(len(a)):\n sum_a=sum_a+(a[i]-h)**2\nprint(int(sum_a))", "n=int(input())", "n", "int(input())", "int", "input()", "input", "a = list(map(int, input().split()))", "a", "list(map(int, in...
#ABC043C n=int(input()) a = list(map(int, input().split())) h=round(sum(a)/len(a)) sum_a=0 for i in range(len(a)): sum_a=sum_a+(a[i]-h)**2 print(int(sum_a))
[ 7, 0, 13, 4, 13, 4, 13, 41, 28, 13, 4, 18, 4, 13, 13, 4, 4, 13, 13, 0, 13, 13, 12, 13, 0, 13, 17, 28, 13, 13, 0, 13, 2, 2, 13, 13, 17, 29, 13, 23, 13, 23, 13, 41, 28, 13, 4, 13, 4, 13, 13, 2, 4, 13, 13, 17,...
[ [ 73, 2 ], [ 10, 9 ], [ 9, 18 ], [ 79, 20 ], [ 26, 25 ], [ 29, 28 ], [ 40, 28 ], [ 32, 31 ], [ 28, 34 ], [ 42, 35 ], [ 31, 38 ], [ 25, 38 ], [ 40, 40 ], [ 4...
[ "N = int(input())\nint_list = [int(x) for x in input().split()]\n\n# int_listの各整数をyに書き換えるときのコストの総和を計算\ndef calc_cost(int_list, y):\n cost = 0\n for x in int_list:\n cost += (x - y)**2\n return cost\n\ncost_list = [calc_cost(int_list, y) for y in range(min(int_list), max(int_list)+1)]\nprint(min(cost...
N = int(input()) int_list = [int(x) for x in input().split()] # int_listの各整数をyに書き換えるときのコストの総和を計算 def calc_cost(int_list, y): cost = 0 for x in int_list: cost += (x - y)**2 return cost cost_list = [calc_cost(int_list, y) for y in range(min(int_list), max(int_list)+1)] print(min(cost_list))
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 12, 13, 29, 2, 2, 13, 13, 17, 23, 13, 23, 13, 0, 13, 2, 4, 13, 13, 13, 0, 13, 39, 17, 17, 17, 17, 17, 0, 13, 2, 17, 17, 28, 13, 4, 13, 4, ...
[ [ 94, 2 ], [ 91, 8 ], [ 28, 24 ], [ 30, 25 ], [ 28, 28 ], [ 30, 30 ], [ 103, 32 ], [ 92, 36 ], [ 95, 37 ], [ 88, 39 ], [ 100, 47 ], [ 53, 52 ], [ 89, 57 ], [ ...
[ "N=int(input())\na=list(map(int,input().split()))\n\ndef calc_cost(x,avg):\n return (x-avg)**2\n\navg = sum(a)//N\n\ndelta = [-2,-1,0,1,2]\n\nans=10**20\nfor i in range(len(delta)):\n val = sum(map(lambda x:calc_cost(x,avg+delta[i]),a))\n ans = min(ans,val)\n \nprint(ans)", "N=int(input())", "N", "int(inp...
N=int(input()) a=list(map(int,input().split())) def calc_cost(x,avg): return (x-avg)**2 avg = sum(a)//N delta = [-2,-1,0,1,2] ans=10**20 for i in range(len(delta)): val = sum(map(lambda x:calc_cost(x,avg+delta[i]),a)) ans = min(ans,val) print(ans)
[ 7, 6, 13, 12, 13, 0, 18, 13, 13, 13, 0, 18, 13, 13, 13, 41, 28, 13, 4, 13, 2, 18, 13, 13, 17, 4, 17, 0, 18, 13, 13, 13, 41, 28, 13, 4, 13, 2, 18, 13, 13, 17, 4, 17, 0, 18, 13, 13, 13, 28, 13, 4, 13, 17, 2, ...
[ [ 9, 6 ], [ 104, 7 ], [ 106, 8 ], [ 106, 9 ], [ 14, 11 ], [ 104, 12 ], [ 108, 13 ], [ 108, 14 ], [ 18, 17 ], [ 6, 21 ], [ 104, 22 ], [ 106, 23 ], [ 31, 28 ], [ ...
[ "\nclass Combination:\n def __init__(self, n, mod):\n self.n = n\n self.mod = mod\n self.fac = [1 for i in range(self.n + 1)]\n self.finv = [1 for i in range(self.n + 1)]\n for i in range(2, self.n+1):\n self.fac[i] = (self.fac[i - 1] * i) % self.mod\n sel...
class Combination: def __init__(self, n, mod): self.n = n self.mod = mod self.fac = [1 for i in range(self.n + 1)] self.finv = [1 for i in range(self.n + 1)] for i in range(2, self.n+1): self.fac[i] = (self.fac[i - 1] * i) % self.mod self.finv[i] = (s...
[ 7, 41, 28, 13, 4, 18, 4, 13, 13, 4, 4, 13, 13, 0, 13, 4, 13, 4, 13, 0, 13, 13, 41, 28, 13, 4, 13, 17, 17, 4, 4, 13, 13, 4, 13, 4, 13, 13, 10, 4, 13, 10, 13, 13 ]
[ [ 4, 3 ], [ 3, 12 ], [ 39, 14 ], [ 42, 20 ], [ 25, 24 ], [ 39, 40 ], [ 42, 43 ] ]
[ "N=int(input());a=[int(i) for i in input().split()]\nprint(min([sum([(n-i)**2 for n in a])for i in range(-100,101)]))", "int(i) for i in input().split()", "for i in input().split()", "i", "input().split()", "().split", "()", "input", "split", "for i in input().split()", "int(i)", "int", "i",...
N=int(input());a=[int(i) for i in input().split()] print(min([sum([(n-i)**2 for n in a])for i in range(-100,101)]))
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 39, 28, 13, 4, 13, 17, 17, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 2, 13, 2, 2, 13, 18, 13, 13, 17, 4, 18, 13, 13, 13, 4, 13, 4, 13, ...
[ [ 70, 2 ], [ 58, 8 ], [ 64, 20 ], [ 24, 23 ], [ 61, 29 ], [ 33, 32 ], [ 71, 35 ], [ 67, 37 ], [ 62, 39 ], [ 68, 39 ], [ 23, 42 ], [ 59, 44 ], [ 32, 45 ], [ ...
[ "n = int(input())\na = list(map(int,input().split()))\n\nstock =[]\n\nfor x in range(-100,101):\n total = 0\n for i in range(n):\n total = total + (x-a[i])**2\n stock.append(total)\n\n\nprint(min(stock))", "n = int(input())", "n", "int(input())", "int", "input()", "input", "a = list(ma...
n = int(input()) a = list(map(int,input().split())) stock =[] for x in range(-100,101): total = 0 for i in range(n): total = total + (x-a[i])**2 stock.append(total) print(min(stock))
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 17, 28, 13, 4, 13, 17, 17, 17, 0, 13, 17, 28, 13, 13, 0, 13, 2, 2, 13, 13, 17, 0, 13, 4, 13, 13, 13, 4, 13, 13, 10, 4, 13, ...
[ [ 69, 2 ], [ 54, 8 ], [ 60, 20 ], [ 26, 25 ], [ 57, 32 ], [ 36, 35 ], [ 55, 35 ], [ 66, 38 ], [ 25, 41 ], [ 35, 42 ], [ 63, 45 ], [ 67, 48 ], [ 58, 48 ], [ ...
[ "n = int(input())\na = tuple(map(int,input().split()))\n\nans = float('inf')\nfor x in range(-100,101,1):\n c = 0\n for ai in a:\n c += (x-ai)**2\n ans = min(c,ans)\nprint(ans)", "n = int(input())", "n", "int(input())", "int", "input()", "input", "a = tuple(map(int,input().split()))", "a", "...
n = int(input()) a = tuple(map(int,input().split())) ans = float('inf') for x in range(-100,101,1): c = 0 for ai in a: c += (x-ai)**2 ans = min(c,ans) print(ans)
[ 7, 12, 13, 15, 0, 13, 4, 13, 13, 4, 18, 4, 18, 4, 13, 17, 13, 13, 31, 13, 0, 13, 4, 13, 13, 0, 13, 4, 13, 4, 18, 13, 13, 0, 13, 4, 13, 13, 13, 4, 13, 13, 0, 13, 4, 13, 17, 28, 13, 4, 13, 13, 2, 13, 17, 0, ...
[ [ 6, 5 ], [ 6, 18 ], [ 22, 21 ], [ 27, 26 ], [ 21, 31 ], [ 35, 34 ], [ 26, 37 ], [ 39, 38 ], [ 26, 41 ], [ 44, 43 ], [ 49, 48 ], [ 34, 51 ], [ 38, 53 ], [ 5...
[ "def main():\n from collections import Counter\n n, *a = map(int, open(0).read().split())\n c = Counter(a)\n d = list(c.keys())\n x, y = min(d), max(d)\n ans = float(\"Inf\")\n for i in range(x, y + 1):\n tmp = 0\n for k, v in c.items():\n tmp += (k - i) ** 2 * v\n ...
def main(): from collections import Counter n, *a = map(int, open(0).read().split()) c = Counter(a) d = list(c.keys()) x, y = min(d), max(d) ans = float("Inf") for i in range(x, y + 1): tmp = 0 for k, v in c.items(): tmp += (k - i) ** 2 * v ans = min(ans, ...
[ 7, 15, 13, 15, 13, 4, 18, 13, 13, 0, 13, 18, 13, 13, 4, 18, 13, 13, 18, 13, 13, 0, 13, 4, 13, 4, 13, 0, 13, 4, 18, 13, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 4, 18, 13, 13, 4, 18, 17, 13, 13, 0, 13, 4, 18,...
[ [ 11, 10 ], [ 127, 22 ], [ 124, 28 ], [ 125, 51 ], [ 130, 53 ], [ 125, 58 ], [ 118, 60 ], [ 131, 64 ], [ 122, 64 ], [ 125, 69 ], [ 131, 78 ], [ 122, 78 ], [ 133, 80...
[ "import numpy as np\nimport logging\nlogging.basicConfig(level=logging.DEBUG)\nlogging.disable(logging.CRITICAL)\n\nN=int(input())\n\nx=np.array(list(map(int,input().split())))\nlogging.debug('x={}'.format(x))\n\ni=np.amin(x)\nans=[]\nwhile i<=np.amax(x):\n\n logging.debug('i={}'.format(i))\n y=np.array([i]*N...
import numpy as np import logging logging.basicConfig(level=logging.DEBUG) logging.disable(logging.CRITICAL) N=int(input()) x=np.array(list(map(int,input().split()))) logging.debug('x={}'.format(x)) i=np.amin(x) ans=[] while i<=np.amax(x): logging.debug('i={}'.format(i)) y=np.array([i]*N) ans.append(sum...
[ 7, 0, 13, 4, 13, 4, 13, 0, 31, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 13, 0, 13, 4, 13, 13, 0, 13, 4, 13, 17, 28, 13, 4, 13, 13, 2, 13, 17, 41, 28, 13, 13, 4, 2, 2, 13, 13, 17, 0, 13, 4, 13, 13, 4...
[ [ 69, 2 ], [ 10, 8 ], [ 72, 19 ], [ 66, 24 ], [ 75, 29 ], [ 35, 34 ], [ 67, 37 ], [ 73, 39 ], [ 44, 43 ], [ 43, 48 ], [ 34, 49 ], [ 63, 52 ], [ 76, 55 ], [ ...
[ "N=int(input())\n*A,=map(int,input().split())\n\nmx=max(A)\nmn=min(A)\n\nans=float('inf')\nfor i in range(mn,mx+1):\n ans=min(ans, sum([(k-i)**2 for k in A]))\nprint(ans)", "N=int(input())", "N", "int(input())", "int", "input()", "input", "*A,=map(int,input().split())", "*A", "A", "map(int,in...
N=int(input()) *A,=map(int,input().split()) mx=max(A) mn=min(A) ans=float('inf') for i in range(mn,mx+1): ans=min(ans, sum([(k-i)**2 for k in A])) print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 4, 18, 13, 13, 0, 13, 2, 4, 13, 13, 4, 13, 13, 12, 13, 0, 13, 17, 28, 13, 13, 29, 13, 23, 13, 23, 13, 13, 41, 28, 13, 13, 4, 4, 13, 13, 13, 4, 13,...
[ [ 58, 2 ], [ 61, 8 ], [ 62, 19 ], [ 67, 22 ], [ 62, 26 ], [ 62, 29 ], [ 34, 33 ], [ 37, 36 ], [ 41, 36 ], [ 33, 39 ], [ 41, 41 ], [ 43, 43 ], [ 48, 47 ], [ ...
[ "\nn = int(raw_input())\nais = map(int, raw_input().split())\nais.sort()\nvv= sum(ais)/len(ais)\ndef g(ais,m):\n\ts= 0\n\tfor ai in ais: s+=abs(ai - m) **2\n\treturn s\nprint min([g(ais,m) for m in [vv+dela for dela in [-1,0,+1]]])", "n = int(raw_input())", "n", "int(raw_input())", "int", "raw_input()", ...
n = int(raw_input()) ais = map(int, raw_input().split()) ais.sort() vv= sum(ais)/len(ais) def g(ais,m): s= 0 for ai in ais: s+=abs(ai - m) **2 return s print min([g(ais,m) for m in [vv+dela for dela in [-1,0,+1]]])
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 17, 28, 13, 4, 13, 17, 17, 0, 13, 17, 28, 13, 13, 0, 13, 4, 13, 2, 13, 13, 17, 0, 13, 4, 13, 13, 13, 4, 13, 13, 10, 4, 13, ...
[ [ 60, 2 ], [ 63, 8 ], [ 69, 20 ], [ 26, 25 ], [ 66, 31 ], [ 35, 34 ], [ 64, 34 ], [ 54, 37 ], [ 34, 41 ], [ 25, 42 ], [ 57, 45 ], [ 70, 48 ], [ 58, 48 ], [ ...
[ "N = int(input())\nA = list(map(int, input().split()))\n\nans = float('inf')\nfor k in range(-100, 101):\n cnt = 0\n for a in A:\n cnt += pow(a - k, 2)\n ans = min(ans, cnt)\n\nprint(ans)", "N = int(input())", "N", "int(input())", "int", "input()", "input", "A = list(map(int, input().s...
N = int(input()) A = list(map(int, input().split())) ans = float('inf') for k in range(-100, 101): cnt = 0 for a in A: cnt += pow(a - k, 2) ans = min(ans, cnt) print(ans)
[ 7, 15, 13, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 2, 4, 13, 13, 13, 0, 13, 4, 18, 13, 13, 13, 0, 13, 4, 18, 13, 13, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 0, 13, 2, 2, 13, 1...
[ [ 73, 4 ], [ 88, 10 ], [ 76, 22 ], [ 89, 26 ], [ 74, 27 ], [ 91, 29 ], [ 77, 34 ], [ 94, 36 ], [ 77, 41 ], [ 82, 43 ], [ 79, 46 ], [ 50, 49 ], [ 89, 49 ], [ ...
[ "import math\nn = int(input())\na = list(map(int,input().split()))\navg = sum(a)/n\nx = math.floor(avg)\ny = math.ceil(avg)\nsumx = 0\nsumy = 0\nfor i in a:\n sumx += (i - x) ** 2\n sumy += (i - y) ** 2\n\nprint(min([sumx,sumy]))", "import math", "math", "n = int(input())", "n", "int(input())", "i...
import math n = int(input()) a = list(map(int,input().split())) avg = sum(a)/n x = math.floor(avg) y = math.ceil(avg) sumx = 0 sumy = 0 for i in a: sumx += (i - x) ** 2 sumy += (i - y) ** 2 print(min([sumx,sumy]))
[ 7, 15, 13, 15, 13, 15, 13, 15, 13, 15, 13, 15, 4, 18, 13, 13, 2, 17, 17, 0, 13, 2, 17, 17, 0, 13, 2, 2, 17, 17, 17, 0, 13, 18, 18, 18, 13, 13, 13, 13, 0, 13, 18, 18, 18, 13, 13, 13, 13, 0, 13, 18, 18, 18, 13,...
[ [ 111, 20 ], [ 114, 25 ], [ 117, 32 ], [ 126, 41 ], [ 120, 50 ], [ 135, 59 ], [ 123, 65 ], [ 129, 77 ], [ 112, 78 ], [ 81, 80 ], [ 108, 86 ], [ 90, 89 ], [ 124, 89 ...
[ "import sys\nimport itertools\n# import numpy as np\nimport time\nimport math\nimport heapq\nfrom collections import defaultdict\nsys.setrecursionlimit(10 ** 7)\n \nINF = 10 ** 18\nMOD = 10 ** 9 + 7\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\n# map(...
import sys import itertools # import numpy as np import time import math import heapq from collections import defaultdict sys.setrecursionlimit(10 ** 7) INF = 10 ** 18 MOD = 10 ** 9 + 7 read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines # map(int, input().split()...
[ 7, 0, 13, 4, 13, 4, 13, 41, 28, 13, 4, 18, 4, 13, 13, 4, 4, 13, 13, 0, 13, 13, 4, 18, 13, 13, 0, 13, 39, 28, 13, 4, 13, 18, 13, 17, 2, 18, 13, 17, 17, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 2, 2, 18, 13, 13, ...
[ [ 75, 2 ], [ 10, 9 ], [ 9, 18 ], [ 78, 20 ], [ 79, 24 ], [ 81, 27 ], [ 31, 30 ], [ 79, 34 ], [ 79, 38 ], [ 72, 42 ], [ 46, 45 ], [ 76, 48 ], [ 69, 50 ], [ 7...
[ "n = int(input())\na = [int(x) for x in input().split()]\na.sort()\nans = []\nfor i in range(a[0], a[-1]+1):\n cnt = 0\n for j in range(n):\n cnt += (a[j] - i)**2\n ans.append(cnt)\n\nprint(min(ans))", "n = int(input())", "n", "int(input())", "int", "input()", "input", "int(x) for x in...
n = int(input()) a = [int(x) for x in input().split()] a.sort() ans = [] for i in range(a[0], a[-1]+1): cnt = 0 for j in range(n): cnt += (a[j] - i)**2 ans.append(cnt) print(min(ans))
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 13, 0, 13, 4, 13, 13, 0, 13, 2, 17, 17, 28, 13, 4, 13, 13, 2, 13, 17, 0, 13, 17, 28, 13, 13, 0, 13, 2, 2, 13, 13, 17, 0, 13...
[ [ 68, 2 ], [ 71, 8 ], [ 74, 20 ], [ 72, 23 ], [ 83, 25 ], [ 72, 28 ], [ 77, 30 ], [ 36, 35 ], [ 84, 38 ], [ 75, 40 ], [ 65, 43 ], [ 47, 46 ], [ 72, 46 ], [ ...
[ "n=int(input())\na=list(map(int,input().split()))\nma=max(a)\nmi=min(a)\nans=10**9\n\nfor i in range(mi,ma+1):\n tm=0\n for j in a:\n tm+=(j-i)**2\n else:\n ans=min(ans,tm)\n\nprint(ans)\n", "n=int(input())", "n", "int(input())", "int", "input()", "input", "a=list(map(int,input(...
n=int(input()) a=list(map(int,input().split())) ma=max(a) mi=min(a) ans=10**9 for i in range(mi,ma+1): tm=0 for j in a: tm+=(j-i)**2 else: ans=min(ans,tm) print(ans)
[ 7, 15, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 4, 18, 13, 13, 17, 0, 13, 12, 4, 13, 4, 18, 4, 18, 18, 18, 13, 13, 13, 13, 13, 0, 13, 12, 4, 13, 4, 13, 13, 4, 18, 4, 18, 18, 18, 13, 13, 13, 13, 13, 0, 13, 12, ...
[ [ 277, 18 ], [ 262, 34 ], [ 274, 53 ], [ 74, 73 ], [ 271, 92 ], [ 265, 97 ], [ 289, 114 ], [ 138, 137 ], [ 292, 157 ], [ 280, 162 ], [ 268, 177 ], [ 286, 184 ], [ 200, ...
[ "import sys, os, math, bisect, itertools, collections, heapq, queue, copy, array\n\n# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall\n# from decimal import Decimal\n# from collections import defaultdict, deque\n\nsys.setrecursionlimit(10000000)\n\nii = lambda: int(sys.stdin.buffer.readline().rs...
import sys, os, math, bisect, itertools, collections, heapq, queue, copy, array # from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall # from decimal import Decimal # from collections import defaultdict, deque sys.setrecursionlimit(10000000) ii = lambda: int(sys.stdin.buffer.readline().rstrip()) il = ...
[ 7, 15, 13, 4, 13, 0, 13, 4, 18, 13, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 4, 13, 4, 13, 4, 13, 2, 2, 13, 13, 17, 10, 4, 13 ]
[ [ 33, 6 ], [ 34, 29 ], [ 33, 34 ] ]
[ "import numpy as np\n\ninput()\na = np.array(sorted(map(int, input().split())))\nprint(min(sum((a - i) ** 2) for i in range(min(a), max(a) + 1)))", "import numpy as np", "numpy", "input()", "input", "a = np.array(sorted(map(int, input().split())))", "a", "np.array(sorted(map(int, input().split())))", ...
import numpy as np input() a = np.array(sorted(map(int, input().split()))) print(min(sum((a - i) ** 2) for i in range(min(a), max(a) + 1)))
[ 7, 12, 13, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 12, 4, 13, 2, 2, 2, 13, 17, 17, 17, 23, 0, 13, 4, 13, 2, 4, 13, 13, 4, 13, 13, 41, 28, 13, 13, 4, 2, 2, 13, 13, 17, 0, 13,...
[ [ 5, 4 ], [ 11, 10 ], [ 23, 22 ], [ 36, 35 ], [ 22, 37 ], [ 10, 41 ], [ 10, 44 ], [ 48, 47 ], [ 10, 47 ], [ 47, 52 ], [ 35, 53 ], [ 57, 56 ], [ 56, 62 ], [ ...
[ "def main():\n n = int(input())\n A = list(map(int, input().split()))\n round = lambda x: int((x * 2 + 1) // 2)\n m = round(sum(A) / len(A))\n ans = [(a - m) ** 2 for a in A]\n print(sum(ans))\n\nif __name__ == '__main__':\n main()", "def main():\n n = int(input())\n A = list(map(int, i...
def main(): n = int(input()) A = list(map(int, input().split())) round = lambda x: int((x * 2 + 1) // 2) m = round(sum(A) / len(A)) ans = [(a - m) ** 2 for a in A] print(sum(ans)) if __name__ == '__main__': main()
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 13, 0, 13, 4, 13, 13, 0, 13, 39, 28, 13, 4, 13, 13, 2, 13, 17, 0, 13, 17, 28, 13, 13, 0, 13, 2, 2, 13, 13, 17, 4, 18, 13, 1...
[ [ 73, 2 ], [ 70, 8 ], [ 76, 20 ], [ 71, 23 ], [ 67, 25 ], [ 71, 28 ], [ 82, 30 ], [ 34, 33 ], [ 68, 36 ], [ 77, 38 ], [ 64, 41 ], [ 45, 44 ], [ 71, 44 ], [ ...
[ "N=int(input())\ns=list(map(int,input().split()))\ns_max=max(s)\ns_min=min(s)\nA=[]\nfor i in range(s_min,s_max+1):\n b=0\n for j in s:\n b+=(j-i)**2\n A.append(b)\nprint(min(A))", "N=int(input())", "N", "int(input())", "int", "input()", "input", "s=list(map(int,input().split()))", "s", "lis...
N=int(input()) s=list(map(int,input().split())) s_max=max(s) s_min=min(s) A=[] for i in range(s_min,s_max+1): b=0 for j in s: b+=(j-i)**2 A.append(b) print(min(A))
[ 7, 0, 13, 4, 13, 4, 13, 0, 31, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 13, 0, 13, 4, 13, 13, 14, 2, 4, 13, 4, 13, 13, 17, 4, 13, 17, 0, 13, 4, 13, 17, 28, 13, 4, 13, 13, 13, 41, 28, 13, 13, 4, 2, 2...
[ [ 81, 2 ], [ 10, 8 ], [ 78, 19 ], [ 75, 24 ], [ 84, 40 ], [ 46, 45 ], [ 76, 48 ], [ 79, 49 ], [ 53, 52 ], [ 52, 57 ], [ 45, 58 ], [ 72, 61 ], [ 85, 64 ], [ ...
[ "N=int(input())\n*A,=map(int,input().split())\n\nmx=max(A)\nmn=min(A)\n\n\nif len(set(A))==1:\n print(0)\nelse:\n ans=float('inf')\n for i in range(mn,mx):\n ans=min(ans, sum([(k-i)**2 for k in A]))\n print(ans)", "N=int(input())", "N", "int(input())", "int", "input()", "input", "*A...
N=int(input()) *A,=map(int,input().split()) mx=max(A) mn=min(A) if len(set(A))==1: print(0) else: ans=float('inf') for i in range(mn,mx): ans=min(ans, sum([(k-i)**2 for k in A])) print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 2, 4, 13, 13, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 4, 13, 13, 0, 13, 2, 2, 13, 18, 13, 13, 17, 4, 13, 13, 10, 4, 13, 10, 2,...
[ [ 59, 2 ], [ 62, 8 ], [ 53, 20 ], [ 63, 26 ], [ 63, 29 ], [ 65, 31 ], [ 35, 34 ], [ 63, 39 ], [ 56, 41 ], [ 54, 44 ], [ 63, 46 ], [ 34, 47 ], [ 57, 51 ], [ ...
[ "n = int(input())\nl = list(map(int,input().split()))\nm = round(sum(l)/len(l))\nans = 0\nfor i in range(len(l)):\n ans += (m - l[i])**2\n\nprint(ans)", "n = int(input())", "n", "int(input())", "int", "input()", "input", "l = list(map(int,input().split()))", "l", "list(map(int,input().split()))",...
n = int(input()) l = list(map(int,input().split())) m = round(sum(l)/len(l)) ans = 0 for i in range(len(l)): ans += (m - l[i])**2 print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 2, 17, 17, 28, 13, 4, 13, 4, 13, 13, 2, 4, 13, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 2, 2, 18, 13, 13, 13, 17, 14, 2, 13, 1...
[ [ 76, 2 ], [ 79, 8 ], [ 64, 20 ], [ 26, 25 ], [ 80, 30 ], [ 80, 34 ], [ 70, 37 ], [ 41, 40 ], [ 77, 43 ], [ 67, 45 ], [ 80, 49 ], [ 40, 50 ], [ 25, 51 ], [ ...
[ "n=int(input())\na=list(map(int,input().split()))\nans=10**18\nfor i in range(min(a),max(a)+1):\n x=0\n for j in range(n):\n x+=(a[j]-i)**2\n if ans>x:\n ans=x\nprint(ans)", "n=int(input())", "n", "int(input())", "int", "input()", "input", "a=list(map(int,input().split()))", "...
n=int(input()) a=list(map(int,input().split())) ans=10**18 for i in range(min(a),max(a)+1): x=0 for j in range(n): x+=(a[j]-i)**2 if ans>x: ans=x print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 2, 17, 17, 28, 13, 4, 13, 17, 17, 0, 13, 17, 28, 13, 13, 0, 13, 2, 2, 13, 13, 17, 0, 13, 4, 13, 13, 13, 4, 13, 13, 10, 2, 13, 10, ...
[ [ 68, 2 ], [ 59, 8 ], [ 53, 20 ], [ 26, 25 ], [ 62, 31 ], [ 35, 34 ], [ 60, 34 ], [ 56, 37 ], [ 25, 40 ], [ 34, 41 ], [ 65, 44 ], [ 54, 47 ], [ 66, 47 ], [ ...
[ "N = int(input())\nA = list(map(int, input().split()))\nC = 10 ** 9\nfor i in range(-100, 101):\n c = 0\n for a in A:\n c += (i - a) ** 2\n C = min(C, c)\nprint(C)", "N = int(input())", "N", "int(input())", "int", "input()", "input", "A = list(map(int, input().split()))", "A", "lis...
N = int(input()) A = list(map(int, input().split())) C = 10 ** 9 for i in range(-100, 101): c = 0 for a in A: c += (i - a) ** 2 C = min(C, c) print(C)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 17, 28, 13, 4, 13, 17, 17, 0, 13, 17, 28, 13, 4, 13, 13, 0, 13, 2, 2, 13, 18, 13, 13, 17, 0, 13, 4, 13, 13, 13, 4, 13, 13, ...
[ [ 72, 2 ], [ 63, 8 ], [ 57, 20 ], [ 26, 25 ], [ 60, 31 ], [ 35, 34 ], [ 73, 37 ], [ 69, 39 ], [ 25, 42 ], [ 64, 44 ], [ 34, 45 ], [ 66, 48 ], [ 70, 51 ], [ ...
[ "n=int(input())\na=list(map(int,input().split()))\nans=float('inf')\nfor i in range(-100, 101):\n tmp=0\n for j in range(n):\n tmp+=(i-a[j])**2\n ans=min(tmp,ans)\nprint(ans)", "n=int(input())", "n", "int(input())", "int", "input()", "input", "a=list(map(int,input().split()))", "a", ...
n=int(input()) a=list(map(int,input().split())) ans=float('inf') for i in range(-100, 101): tmp=0 for j in range(n): tmp+=(i-a[j])**2 ans=min(tmp,ans) print(ans)
[ 7, 12, 13, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 14, 2, 4, 13, 4, 13, 13, 17, 4, 13, 17, 0, 13, 2, 2, 17, 17, 17, 28, 13, 4, 13, 17, 17, 41, 28, 13, 13, 4, 2, 2, 13, 13, 17, 0, 1...
[ [ 5, 4 ], [ 11, 10 ], [ 10, 27 ], [ 34, 33 ], [ 41, 40 ], [ 48, 47 ], [ 10, 47 ], [ 47, 52 ], [ 40, 53 ], [ 57, 56 ], [ 56, 62 ], [ 33, 63 ], [ 65, 63 ], [ ...
[ "def resolve():\n N = int(input())\n a_list = list(map(int, input().split()))\n if len(set(a_list)) == 1:\n print(0)\n else:\n # コストは最大でも10**6\n min_cost = 10 ** 6 + 1\n for x in range(-100, 101):\n cost = sum([(a -x)**2 for a in a_list])\n if cost < min...
def resolve(): N = int(input()) a_list = list(map(int, input().split())) if len(set(a_list)) == 1: print(0) else: # コストは最大でも10**6 min_cost = 10 ** 6 + 1 for x in range(-100, 101): cost = sum([(a -x)**2 for a in a_list]) if cost < min_cost: ...
[ 7, 0, 13, 4, 13, 4, 13, 41, 28, 13, 4, 18, 4, 13, 13, 4, 4, 13, 13, 0, 13, 13, 0, 13, 4, 13, 17, 28, 13, 4, 13, 17, 17, 0, 13, 17, 28, 13, 13, 0, 13, 2, 2, 13, 13, 17, 0, 13, 4, 13, 13, 13, 4, 13, 13, 10, ...
[ [ 68, 2 ], [ 10, 9 ], [ 9, 18 ], [ 62, 20 ], [ 59, 23 ], [ 29, 28 ], [ 56, 34 ], [ 38, 37 ], [ 63, 37 ], [ 71, 40 ], [ 28, 43 ], [ 37, 44 ], [ 65, 47 ], [ 6...
[ "n = int(input())\nl = [int(i) for i in input().split()]\n\nval = float(\"inf\")\nfor i in range(-100,101):\n\tnew = 0\n\tfor j in l:\n\t\tnew += (i-j)**2\t\n\tval = min(val,new)\t\t\nprint(val)\t", "n = int(input())", "n", "int(input())", "int", "input()", "input", "int(i) for i in input().split()", ...
n = int(input()) l = [int(i) for i in input().split()] val = float("inf") for i in range(-100,101): new = 0 for j in l: new += (i-j)**2 val = min(val,new) print(val)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 2, 17, 17, 28, 13, 4, 13, 17, 2, 17, 17, 0, 13, 17, 28, 13, 13, 0, 13, 2, 2, 13, 13, 17, 0, 13, 4, 13, 13, 13, 4, 13, 13, 10, 4, 1...
[ [ 58, 2 ], [ 55, 8 ], [ 61, 20 ], [ 26, 25 ], [ 64, 33 ], [ 37, 36 ], [ 56, 36 ], [ 70, 39 ], [ 36, 42 ], [ 25, 43 ], [ 67, 46 ], [ 62, 49 ], [ 68, 49 ], [ ...
[ "n = int(input())\na = list(map(int,input().split()))\nans=10**9\nfor i in range(-100,100+1):\n const=0\n for j in a:\n const += (j-i)**2\n ans=min(ans,const)\nprint(ans)", "n = int(input())", "n", "int(input())", "int", "input()", "input", "a = list(map(int,input().split()))", "a", ...
n = int(input()) a = list(map(int,input().split())) ans=10**9 for i in range(-100,100+1): const=0 for j in a: const += (j-i)**2 ans=min(ans,const) print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 2, 4, 13, 13, 4, 13, 13, 0, 13, 2, 4, 13, 13, 4, 13, 13, 14, 2, 2, 13, 13, 17, 0, 13, 17, 0, 13, 17, 28, 13, 13, 0, 13, 2, ...
[ [ 65, 2 ], [ 74, 8 ], [ 83, 20 ], [ 75, 26 ], [ 75, 29 ], [ 80, 31 ], [ 75, 35 ], [ 75, 38 ], [ 81, 42 ], [ 84, 43 ], [ 68, 46 ], [ 77, 49 ], [ 53, 52 ], [ ...
[ "n = int(input())\nli = list(map(int,input().split()))\n\nx = int(sum(li)/len(li))\ny = sum(li)/len(li)\nif y-x > 0.5:\n x += 1\n\nans = 0\n\nfor i in li:\n ans += (i-x)**2\n\nprint(ans)", "n = int(input())", "n", "int(input())", "int", "input()", "input", "li = list(map(int,input().split()))", ...
n = int(input()) li = list(map(int,input().split())) x = int(sum(li)/len(li)) y = sum(li)/len(li) if y-x > 0.5: x += 1 ans = 0 for i in li: ans += (i-x)**2 print(ans)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 17, 17, 0, 13, 17, 28, 13, 13, 0, 13, 2, 2, 13, 13, 17, 14, 2, 13, 13, 0, 13, 13, 4, 13, 13, 10, 4, 13, 10, 2, ...
[ [ 64, 2 ], [ 52, 8 ], [ 58, 20 ], [ 24, 23 ], [ 67, 29 ], [ 33, 32 ], [ 53, 32 ], [ 55, 35 ], [ 23, 38 ], [ 32, 39 ], [ 59, 43 ], [ 62, 43 ], [ 56, 44 ], [ ...
[ "n = int(input())\na = list(map(int, input().split()))\n\n\ny = 1000000\n\n\nfor i in range(-100, 101):\n x = 0\n for m in a:\n x += (i-m)**2\n if y > x:\n y = x\n\nprint(y)", "n = int(input())", "n", "int(input())", "int", "input()", "input", "a = list(map(int, input().split())...
n = int(input()) a = list(map(int, input().split())) y = 1000000 for i in range(-100, 101): x = 0 for m in a: x += (i-m)**2 if y > x: y = x print(y)
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 14, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 14, 40, 40, 13, 17, 13, 4, 13, 17, 14, 2, 2, 2, 2, 13, 13, 17, 17, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13 ]
[ [ 52, 2 ], [ 52, 11 ], [ 50, 16 ], [ 53, 19 ], [ 50, 26 ], [ 53, 28 ], [ 53, 37 ], [ 50, 38 ], [ 52, 50 ], [ 52, 53 ] ]
[ "a,b = map(int, input().split())\nif 0 < a and 0 < b:\n print('Positive')\nelif a <= 0 <= b:\n print('Zero')\nelse:\n if (b-a+1)%2 == 1:\n print('Negative')\n else:\n print('Positive')", "a,b = map(int, input().split())", "a", "map(int, input().split())", "map", "int", "input()...
a,b = map(int, input().split()) if 0 < a and 0 < b: print('Positive') elif a <= 0 <= b: print('Zero') else: if (b-a+1)%2 == 1: print('Negative') else: print('Positive')
[ 7, 15, 13, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 14, 40, 40, 13, 17, 13, 4, 13, 17, 4, 18, 13, 13, 14, 2, 2, 13, 17, 2, 2, 2, 2, 13, 13, 17, 17, 17, 4, 13, 17, 4, 18, 13, 13, 4, 13, 17, 10, 4, 13, 10, 4, ...
[ [ 55, 4 ], [ 55, 13 ], [ 53, 17 ], [ 56, 19 ], [ 56, 30 ], [ 56, 36 ], [ 53, 37 ], [ 55, 53 ], [ 55, 56 ] ]
[ "import sys\na,b = map(int, input().split())\nif a <= 0 <= b:\n print(\"Zero\")\n sys.exit()\nelif b <0 and (b-a+1)%2 == 1:\n print(\"Negative\")\n sys.exit()\nelse:\n print(\"Positive\")", "import sys", "sys", "a,b = map(int, input().split())", "a", "map(int, input().split())", "map", ...
import sys a,b = map(int, input().split()) if a <= 0 <= b: print("Zero") sys.exit() elif b <0 and (b-a+1)%2 == 1: print("Negative") sys.exit() else: print("Positive")
[ 7, 15, 41, 28, 13, 4, 18, 4, 13, 13, 4, 4, 13, 13, 0, 13, 13, 13, 14, 2, 40, 13, 17, 40, 17, 13, 4, 13, 17, 14, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 4, 13, 8, 2, 2, 2, 2, 13, 13, 17, 17, 17, 17, 17, 10, 13, ...
[ [ 5, 4 ], [ 4, 13 ], [ 58, 15 ], [ 58, 17 ], [ 59, 21 ], [ 56, 25 ], [ 59, 33 ], [ 56, 36 ], [ 56, 47 ], [ 59, 48 ], [ 58, 56 ], [ 58, 59 ] ]
[ "from bisect import bisect_right\na, b = (int(x) for x in input().split())\nif a <= 0 and 0 <= b: #0を含む\n print('Zero')\nelif 0 < a and 0 < b: #すべて正\n print('Positive')\nelse: #すべて負\n print('Positive' if (b - a + 1)%2 == 0 else 'Negative')", "from bisect import bisect_right", "int(x) for x in input().split()...
from bisect import bisect_right a, b = (int(x) for x in input().split()) if a <= 0 and 0 <= b: #0を含む print('Zero') elif 0 < a and 0 < b: #すべて正 print('Positive') else: #すべて負 print('Positive' if (b - a + 1)%2 == 0 else 'Negative')
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 14, 2, 2, 13, 17, 2, 13, 17, 4, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 4, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 4, 13, 17, 0, 13, 2, 4, 13, 13, 4, 13, 13, 14, 2, 2,...
[ [ 73, 2 ], [ 73, 11 ], [ 74, 15 ], [ 71, 18 ], [ 74, 26 ], [ 71, 29 ], [ 74, 37 ], [ 71, 40 ], [ 67, 46 ], [ 74, 50 ], [ 71, 53 ], [ 68, 57 ], [ 67, 68 ], [ ...
[ "a,b = map(int, input().split())\nif a > 0 and b > 0:\n print(\"Positive\")\nelif a < 0 and b > 0:\n print(\"Zero\")\nelif a == 0 or b == 0:\n print(\"Zero\")\nelse:\n d = abs(a) - abs(b)\n if d % 2 == 1:\n print(\"Positive\")\n else:\n print(\"Negative\")", "a,b = map(int, input()...
a,b = map(int, input().split()) if a > 0 and b > 0: print("Positive") elif a < 0 and b > 0: print("Zero") elif a == 0 or b == 0: print("Zero") else: d = abs(a) - abs(b) if d % 2 == 1: print("Positive") else: print("Negative")
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 14, 2, 2, 13, 17, 2, 13, 17, 4, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 4, 13, 17, 14, 2, 13, 17, 4, 13, 17, 0, 13, 2, 2, 13, 13, 17, 14, 2, 2, 13, 17, 17, 4, 13, 1...
[ [ 67, 2 ], [ 67, 11 ], [ 68, 15 ], [ 62, 18 ], [ 68, 26 ], [ 62, 29 ], [ 68, 36 ], [ 64, 42 ], [ 62, 45 ], [ 68, 46 ], [ 65, 51 ], [ 67, 62 ], [ 64, 65 ], [ ...
[ "a,b=map(int,input().split())\nif a == 0 or b == 0:\n print('Zero')\nelif a < 0 and b > 0:\n print('Zero')\nelif a > 0:\n print('Positive')\nelse:\n d = b - a + 1\n if d % 2 == 0:\n print('Positive')\n else:\n print('Negative')", "a,b=map(int,input().split())", "a", "map(int,in...
a,b=map(int,input().split()) if a == 0 or b == 0: print('Zero') elif a < 0 and b > 0: print('Zero') elif a > 0: print('Positive') else: d = b - a + 1 if d % 2 == 0: print('Positive') else: print('Negative')
[ 7, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 0, 13, 17, 14, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 14, 2, 2, 40, 13, 17, 40, 17, 13, 2, 40, 17, 13, 40, 13, 17, 4, 13, 17, 14, 2, 2, 2, 2, 13, 13, 17, 17, ...
[ [ 67, 2 ], [ 67, 13 ], [ 70, 15 ], [ 68, 21 ], [ 65, 24 ], [ 68, 32 ], [ 65, 36 ], [ 68, 40 ], [ 65, 42 ], [ 65, 52 ], [ 68, 53 ], [ 67, 65 ], [ 67, 68 ], [ ...
[ "a, b = list(map(int, input().split()))\np = 1\n\nif 0 < a and 0 < b:\n print('Positive')\nelif a <= 0 and 0 <= b or 0 <= a and b <= 0:\n print('Zero')\nelse:\n if (b - a + 1) % 2 == 0:\n print('Positive')\n else:\n print('Negative')", "a, b = list(map(int, input().split()))", "a", "...
a, b = list(map(int, input().split())) p = 1 if 0 < a and 0 < b: print('Positive') elif a <= 0 and 0 <= b or 0 <= a and b <= 0: print('Zero') else: if (b - a + 1) % 2 == 0: print('Positive') else: print('Negative')
[ 7, 41, 28, 13, 4, 18, 4, 13, 13, 4, 4, 13, 13, 0, 13, 13, 13, 14, 2, 13, 17, 4, 13, 17, 14, 2, 13, 17, 4, 13, 17, 14, 40, 13, 17, 4, 13, 17, 14, 2, 2, 2, 13, 13, 17, 17, 4, 13, 17, 4, 13, 17, 10, 13, 13, 10...
[ [ 4, 3 ], [ 3, 12 ], [ 56, 14 ], [ 56, 16 ], [ 57, 19 ], [ 57, 26 ], [ 54, 33 ], [ 54, 42 ], [ 57, 43 ], [ 56, 54 ], [ 56, 57 ] ]
[ "a, b = [int(i) for i in input().split()]\n\nif a > 0:\n print(\"Positive\")\nelif a == 0:\n print(\"Zero\")\nelse:\n if b >= 0:\n print(\"Zero\")\n else:\n if (b - a) % 2 == 0:\n print(\"Negative\")\n else:\n print(\"Positive\")", "int(i) for i in input().sp...
a, b = [int(i) for i in input().split()] if a > 0: print("Positive") elif a == 0: print("Zero") else: if b >= 0: print("Zero") else: if (b - a) % 2 == 0: print("Negative") else: print("Positive")
[ 7, 15, 13, 12, 13, 12, 13, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 14, 2, 13, 17, 4, 13, 17, 14, 2, 40, 13, 17, 40, 13, 17, 4, 13, 17, 14, 2, 2, 13, 17, 2, 2, 2, 13, 13, 17, 17, 4, 13, 17, 4, 13, 17, 4, 13,...
[ [ 9, 8 ], [ 58, 15 ], [ 9, 17 ], [ 8, 20 ], [ 8, 28 ], [ 17, 31 ], [ 17, 39 ], [ 17, 44 ], [ 8, 45 ], [ 61, 55 ] ]
[ "import sys\ndef input(): return sys.stdin.readline().strip()\n\ndef resolve():\n a,b=map(int, input().split())\n if a>0:\n print('Positive')\n elif a<=0 and b>=0:\n print('Zero')\n elif b<0 and (b-a)%2==0:\n print('Negative')\n else:\n print('Positive')\nresolve()", "im...
import sys def input(): return sys.stdin.readline().strip() def resolve(): a,b=map(int, input().split()) if a>0: print('Positive') elif a<=0 and b>=0: print('Zero') elif b<0 and (b-a)%2==0: print('Negative') else: print('Positive') resolve()
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 14, 2, 13, 17, 8, 2, 2, 2, 13, 13, 17, 17, 4, 13, 17, 4, 13, 17, 14, 2, 17, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13 ]
[ [ 44, 2 ], [ 44, 11 ], [ 45, 14 ], [ 45, 20 ], [ 42, 21 ], [ 42, 33 ], [ 44, 42 ], [ 44, 45 ] ]
[ "a, b = map(int, input().split())\n\nif b < 0:\n print('Positive') if (b-a)%2 == 1 else print('Negative')\nelif 0 < a:\n print('Positive')\nelse:\n print('Zero')", "a, b = map(int, input().split())", "a", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "inp...
a, b = map(int, input().split()) if b < 0: print('Positive') if (b-a)%2 == 1 else print('Negative') elif 0 < a: print('Positive') else: print('Zero')
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 14, 2, 2, 2, 2, 13, 17, 2, 13, 17, 2, 2, 13, 17, 2, 13, 17, 2, 2, 13, 17, 2, 13, 17, 4, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 4, 13, 17, 14, 2, 2, 13, 17, 2, 13, ...
[ [ 83, 2 ], [ 83, 11 ], [ 84, 17 ], [ 81, 20 ], [ 84, 24 ], [ 81, 27 ], [ 84, 31 ], [ 81, 34 ], [ 84, 42 ], [ 81, 45 ], [ 84, 53 ], [ 81, 56 ], [ 86, 59 ], [ ...
[ "# Problem A - Range Product\n\n# input\na, b = map(int, input().split())\n\n# calc\nif (a==0 or b==0) or (a<0 and b>0) or (a>0 and b<0):\n print(\"Zero\")\nelif a>0 and b>0:\n print(\"Positive\")\nelif a<0 and b<0:\n nums = abs(b - a) + 1\n if nums%2==1:\n print(\"Negative\")\n else:\n ...
# Problem A - Range Product # input a, b = map(int, input().split()) # calc if (a==0 or b==0) or (a<0 and b>0) or (a>0 and b<0): print("Zero") elif a>0 and b>0: print("Positive") elif a<0 and b<0: nums = abs(b - a) + 1 if nums%2==1: print("Negative") else: print("Positive")
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 14, 2, 2, 13, 17, 2, 13, 17, 4, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 4, 13, 17, 14, 2, 2, 2, 13, 17, 2, 13, 17, 2, 2, 13, 17, 2, 13, 17, 4, 13, 17, 14, 2, 2, 2, ...
[ [ 73, 2 ], [ 73, 11 ], [ 71, 15 ], [ 74, 18 ], [ 71, 26 ], [ 74, 29 ], [ 71, 38 ], [ 74, 41 ], [ 71, 45 ], [ 74, 48 ], [ 71, 58 ], [ 74, 59 ], [ 73, 71 ], [ ...
[ "a, b = map(int, input().split())\nif a>0 and b>0:\n print(\"Positive\")\nelif a==0 or b==0:\n print(\"Zero\")\nelif (a>0 and b<0) or (a<0 and b>0):\n print(\"Zero\")\nelif ((a+b)+1)%2==0:\n print(\"Positive\")\nelse:\n print(\"Negative\")", "a, b = map(int, input().split())", "a", "map(int, in...
a, b = map(int, input().split()) if a>0 and b>0: print("Positive") elif a==0 or b==0: print("Zero") elif (a>0 and b<0) or (a<0 and b>0): print("Zero") elif ((a+b)+1)%2==0: print("Positive") else: print("Negative")
[ 7, 15, 13, 15, 13, 4, 18, 13, 13, 2, 17, 17, 0, 13, 18, 18, 13, 13, 13, 12, 13, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 14, 2, 13, 17, 4, 13, 17, 14, 2, 13, 17, 14, 2, 2, 2, 13, 13, 17, 17, 4, 13, 17, 4, 13...
[ [ 67, 13 ], [ 23, 22 ], [ 68, 29 ], [ 23, 31 ], [ 22, 34 ], [ 31, 41 ], [ 31, 47 ], [ 22, 48 ], [ 71, 65 ], [ 67, 68 ] ]
[ "import sys\nimport bisect\nsys.setrecursionlimit(1 << 25)\nread = sys.stdin.readline\n\ndef main():\n a,b = map(int,read().split())\n if a > 0:\n print(\"Positive\")\n elif b < 0:\n if (b - a)%2 == 1:\n print(\"Positive\")\n else:\n print(\"Negative\")\n else:...
import sys import bisect sys.setrecursionlimit(1 << 25) read = sys.stdin.readline def main(): a,b = map(int,read().split()) if a > 0: print("Positive") elif b < 0: if (b - a)%2 == 1: print("Positive") else: print("Negative") else: print("Zero") ...
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 14, 2, 2, 13, 17, 2, 17, 13, 4, 13, 17, 14, 2, 17, 13, 4, 13, 17, 0, 13, 4, 13, 2, 13, 13, 14, 2, 2, 13, 17, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13, 10, ...
[ [ 56, 2 ], [ 56, 11 ], [ 57, 15 ], [ 51, 19 ], [ 57, 26 ], [ 53, 31 ], [ 57, 35 ], [ 51, 36 ], [ 54, 40 ], [ 56, 51 ], [ 53, 54 ], [ 56, 57 ] ]
[ "a, b = map(int, input().split())\n\nif a < 0 and 0 < b:\n print(\"Zero\")\nelif 0 < a:\n print(\"Positive\")\nelse:\n ab = abs(a - b)\n if ab % 2 == 1:\n print(\"Positive\")\n else:\n print(\"Negative\")", "a, b = map(int, input().split())", "a", "map(int, input().split())", "m...
a, b = map(int, input().split()) if a < 0 and 0 < b: print("Zero") elif 0 < a: print("Positive") else: ab = abs(a - b) if ab % 2 == 1: print("Positive") else: print("Negative")
[ 7, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 14, 2, 13, 13, 0, 13, 13, 13, 13, 14, 2, 2, 17, 13, 2, 2, 13, 17, 2, 2, 2, 13, 13, 17, 17, 4, 13, 17, 14, 2, 40, 13, 17, 40, 17, 13, 4, 13, 17, 4, 13, 17, ...
[ [ 66, 2 ], [ 66, 13 ], [ 67, 16 ], [ 58, 17 ], [ 63, 19 ], [ 58, 20 ], [ 60, 21 ], [ 64, 22 ], [ 67, 22 ], [ 64, 27 ], [ 67, 27 ], [ 61, 30 ], [ 58, 30 ], [ ...
[ "a, b = list(map(int, input().split()))\nif a > b:\n a, b = b, a\nif 0 < a or (b < 0 and (b - a) % 2 == 1):\n print('Positive')\nelif a <= 0 and 0 <= b:\n print('Zero')\nelse:\n print('Negative')", "a, b = list(map(int, input().split()))", "a", "list(map(int, input().split()))", "list", "map(i...
a, b = list(map(int, input().split())) if a > b: a, b = b, a if 0 < a or (b < 0 and (b - a) % 2 == 1): print('Positive') elif a <= 0 and 0 <= b: print('Zero') else: print('Negative')
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 0, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 0, 13, 17, 14, 2, 40, 13, 17, 40, 13, 17, 0, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 14, 2, 2, 2, 13, 13, 17, 17, 0, 13, 17, ...
[ [ 81, 2 ], [ 81, 11 ], [ 72, 13 ], [ 82, 18 ], [ 70, 21 ], [ 66, 24 ], [ 82, 29 ], [ 70, 32 ], [ 78, 35 ], [ 82, 40 ], [ 70, 43 ], [ 70, 49 ], [ 82, 50 ], [ ...
[ "a, b = map(int, input().split())\nans = ''\nif a > 0 and b > 0:\n ans = 'Positive'\nelif a <= 0 and b >= 0:\n ans = 'Zero'\nelif a < 0 and b < 0:\n if (b - a) % 2 == 0:\n ans = 'Negative'\n else:\n ans = 'Positive'\nprint(ans)", "a, b = map(int, input().split())", "a", "map(int, input().split())",...
a, b = map(int, input().split()) ans = '' if a > 0 and b > 0: ans = 'Positive' elif a <= 0 and b >= 0: ans = 'Zero' elif a < 0 and b < 0: if (b - a) % 2 == 0: ans = 'Negative' else: ans = 'Positive' print(ans)
[ 7, 15, 13, 0, 13, 18, 18, 13, 13, 13, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 14, 2, 13, 17, 4, 13, 17, 14, 40, 13, 17, 4, 13, 17, 14, 2, 13, 17, 2, 13, 17, 14, 2, 2, 2, 2, 4, 13, 13, 4, 13, 13, 17, 17, 17,...
[ [ 69, 4 ], [ 66, 11 ], [ 70, 18 ], [ 66, 20 ], [ 67, 23 ], [ 64, 30 ], [ 64, 37 ], [ 64, 40 ], [ 67, 49 ], [ 64, 52 ], [ 66, 64 ], [ 66, 67 ], [ 69, 70 ] ]
[ "import sys\ninput = sys.stdin.readline\n\n# A - Range Product\na, b = map(int, input().split())\n\nif a > 0:\n\tprint('Positive')\nelif b >= 0:\n\tprint('Zero')\nelse:\n\tif b > 0:\n\t\tb == 0\n\t\n\tif (abs(a)-abs(b)+1) % 2 == 1:\n\t\tprint('Negative')\n\telse:\n\t\tprint('Positive')", "import sys", "sys", ...
import sys input = sys.stdin.readline # A - Range Product a, b = map(int, input().split()) if a > 0: print('Positive') elif b >= 0: print('Zero') else: if b > 0: b == 0 if (abs(a)-abs(b)+1) % 2 == 1: print('Negative') else: print('Positive')
[ 7, 12, 13, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 0, 13, 17, 14, 2, 40, 13, 17, 40, 13, 17, 4, 13, 17, 29, 14, 2, 13, 17, 4, 13, 17, 29, 0, 13, 2, 13, 13, 14, 2, 2, 13, 17, 17, 4, 13, 17, 29, 4, 13, 17, 29...
[ [ 5, 4 ], [ 5, 13 ], [ 16, 15 ], [ 4, 20 ], [ 13, 23 ], [ 4, 31 ], [ 39, 38 ], [ 13, 40 ], [ 4, 41 ], [ 38, 45 ], [ 15, 45 ], [ 64, 61 ] ]
[ "def main():\n a, b = map(int, input().split())\n num_neg = 0\n if a <= 0 and b >= 0:\n print('Zero')\n return\n elif a > 0:\n print('Positive')\n return\n else:\n num_neg = b - a\n if num_neg % 2 == 1:\n print('Positive')\n return\n ...
def main(): a, b = map(int, input().split()) num_neg = 0 if a <= 0 and b >= 0: print('Zero') return elif a > 0: print('Positive') return else: num_neg = b - a if num_neg % 2 == 1: print('Positive') return else: ...
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 14, 2, 2, 13, 17, 2, 13, 17, 4, 13, 17, 14, 2, 40, 13, 17, 40, 13, 17, 4, 13, 17, 8, 2, 2, 13, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13 ]
[ [ 50, 2 ], [ 50, 11 ], [ 48, 15 ], [ 51, 18 ], [ 48, 26 ], [ 51, 29 ], [ 48, 37 ], [ 51, 38 ], [ 50, 48 ], [ 50, 51 ] ]
[ "a, b = map(int, input().split())\nif a > 0 and b > 0:\n print('Positive')\nelif a <= 0 and b >= 0:\n print('Zero')\nelse:\n print('Positive') if (a - b) % 2 else print('Negative')", "a, b = map(int, input().split())", "a", "map(int, input().split())", "map", "int", "input().split()", "().spl...
a, b = map(int, input().split()) if a > 0 and b > 0: print('Positive') elif a <= 0 and b >= 0: print('Zero') else: print('Positive') if (a - b) % 2 else print('Negative')
[ 7, 12, 13, 29, 4, 13, 4, 13, 12, 13, 29, 4, 13, 13, 4, 18, 4, 13, 13, 12, 13, 29, 4, 13, 4, 13, 12, 13, 29, 4, 13, 4, 13, 12, 13, 29, 4, 13, 4, 13, 13, 0, 13, 4, 13, 13, 14, 2, 13, 17, 4, 13, 17, 14, 2, 40,...
[ [ 97, 42 ], [ 86, 44 ], [ 97, 45 ], [ 92, 48 ], [ 92, 56 ], [ 98, 60 ], [ 98, 68 ], [ 92, 69 ], [ 97, 92 ], [ 97, 98 ] ]
[ "def i():\n\treturn int(input())\ndef i2():\n\treturn map(int,input().split())\ndef s():\n\treturn str(input())\ndef l():\n\treturn list(input())\ndef intl():\n\treturn list(int(k) for k in input().split())\n\na,b = i2()\nif a > 0:\n\tprint(\"Positive\")\nelif a <= 0 and 0 <= b:\n\tprint(\"Zero\")\nelse:\n\tif (b -...
def i(): return int(input()) def i2(): return map(int,input().split()) def s(): return str(input()) def l(): return list(input()) def intl(): return list(int(k) for k in input().split()) a,b = i2() if a > 0: print("Positive") elif a <= 0 and 0 <= b: print("Zero") else: if (b - a)%2 == 0: print("Negative") e...
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 14, 2, 2, 13, 17, 2, 13, 17, 0, 13, 17, 14, 40, 13, 17, 14, 2, 13, 17, 0, 13, 17, 0, 13, 2, 2, 13, 13, 17, 14, 2, 13, 17, 0, 13, 17, 0, 13, 17, 14, 2, 13, 17, 4, ...
[ [ 87, 2 ], [ 87, 11 ], [ 73, 15 ], [ 88, 18 ], [ 75, 21 ], [ 73, 25 ], [ 73, 29 ], [ 69, 32 ], [ 78, 35 ], [ 88, 38 ], [ 73, 39 ], [ 73, 43 ], [ 81, 46 ], [ ...
[ "a, b = map(int, input().split())\nif b > 0 and a < 0:\n ans = 2\nelif b <= 0:\n if b == 0:\n ans = 2\n else:\n ans = (a - b) % 2\nelse:\n if b == 0:\n ans = 2\n else:\n ans = 1\nif ans == 0:\n print(\"Negative\")\nelif ans == 1:\n print(\"Positive\")\nelse:\n pri...
a, b = map(int, input().split()) if b > 0 and a < 0: ans = 2 elif b <= 0: if b == 0: ans = 2 else: ans = (a - b) % 2 else: if b == 0: ans = 2 else: ans = 1 if ans == 0: print("Negative") elif ans == 1: print("Positive") else: print("Zero")
[ 7, 15, 13, 0, 13, 18, 18, 13, 13, 13, 0, 13, 2, 2, 17, 17, 17, 0, 13, 4, 13, 17, 4, 18, 13, 13, 2, 17, 17, 12, 13, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 14, 40, 40, 13, 17, 13, 4, 13, 17, 14, 2, 17, 13, 4...
[ [ 82, 4 ], [ 91, 11 ], [ 88, 18 ], [ 33, 32 ], [ 83, 39 ], [ 33, 41 ], [ 32, 45 ], [ 41, 47 ], [ 32, 54 ], [ 32, 64 ], [ 41, 65 ], [ 86, 80 ], [ 82, 83 ], [ ...
[ "import sys\n\nreadline = sys.stdin.readline\nMOD = 10 ** 9 + 7\nINF = float('INF')\nsys.setrecursionlimit(10 ** 5)\n\n\ndef main():\n a, b = map(int, readline().split())\n\n if a <= 0 <= b:\n print(\"Zero\")\n else:\n if 0 < a:\n print(\"Positive\")\n elif (-a + b + 1) % 2 ...
import sys readline = sys.stdin.readline MOD = 10 ** 9 + 7 INF = float('INF') sys.setrecursionlimit(10 ** 5) def main(): a, b = map(int, readline().split()) if a <= 0 <= b: print("Zero") else: if 0 < a: print("Positive") elif (-a + b + 1) % 2 == 0: print("...
[ 7, 12, 13, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 14, 2, 2, 13, 17, 2, 13, 17, 4, 13, 17, 14, 2, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 17, 2, 13, 17, 4, 13, 17, 14, 40, 2, 2, 13, 13, 17, 17, 4, 13, 17, 4, 1...
[ [ 5, 4 ], [ 5, 13 ], [ 4, 17 ], [ 13, 20 ], [ 4, 30 ], [ 13, 33 ], [ 4, 36 ], [ 13, 39 ], [ 4, 48 ], [ 13, 49 ], [ 66, 63 ] ]
[ "def main():\n a, b = map(int, input().split())\n if a > 0 and b > 0:\n print('Positive')\n elif (a > 0) ^ (b > 0) or a == 0 or b == 0:\n print('Zero')\n else:\n if (a - b) % 2 != 0:\n print('Positive')\n else:\n print('Negative')\n\n\nif __name__ == '__...
def main(): a, b = map(int, input().split()) if a > 0 and b > 0: print('Positive') elif (a > 0) ^ (b > 0) or a == 0 or b == 0: print('Zero') else: if (a - b) % 2 != 0: print('Positive') else: print('Negative') if __name__ == '__main__': main(...
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 14, 2, 40, 13, 17, 40, 17, 13, 0, 13, 17, 14, 2, 40, 13, 17, 40, 13, 17, 0, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 14, 2, 2, 2, 13, 13, 17, 17, 0, 13, 17, 0, 13, 17,...
[ [ 72, 2 ], [ 72, 11 ], [ 73, 15 ], [ 70, 19 ], [ 63, 21 ], [ 73, 26 ], [ 70, 29 ], [ 75, 32 ], [ 73, 37 ], [ 70, 40 ], [ 70, 46 ], [ 73, 47 ], [ 60, 51 ], [ ...
[ "a,b = map(int,input().split())\n\nif((a<=0)and(0<=b)):\n ans = 'Zero'\nelif((a>=0)and(b>=0)):\n ans = 'Positive'\nelif((a<0)and(b<0)):\n if((b-a)%2 == 1):\n ans = 'Positive'\n else:\n ans = 'Negative'\nprint(ans) ", "a,b = map(int,input().split())", "a", "map(int,input().split())", "map", "in...
a,b = map(int,input().split()) if((a<=0)and(0<=b)): ans = 'Zero' elif((a>=0)and(b>=0)): ans = 'Positive' elif((a<0)and(b<0)): if((b-a)%2 == 1): ans = 'Positive' else: ans = 'Negative' print(ans)
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 14, 2, 40, 13, 17, 40, 13, 17, 4, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 4, 13, 17, 14, 40, 2, 2, 13, 13, 17, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13 ]
[ [ 52, 2 ], [ 52, 11 ], [ 53, 15 ], [ 50, 18 ], [ 53, 26 ], [ 50, 29 ], [ 50, 38 ], [ 53, 39 ], [ 52, 50 ], [ 52, 53 ] ]
[ "A, B = map(int, input().split())\nif A <= 0 and B >= 0:\n print('Zero')\nelif A > 0 and B > 0:\n print('Positive')\nelse:\n if (B-A)%2 != 0:\n print('Positive')\n else:\n print('Negative')", "A, B = map(int, input().split())", "A", "map(int, input().split())", "map", "int", "input().split()",...
A, B = map(int, input().split()) if A <= 0 and B >= 0: print('Zero') elif A > 0 and B > 0: print('Positive') else: if (B-A)%2 != 0: print('Positive') else: print('Negative')
[ 7, 12, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 14, 2, 40, 13, 17, 40, 13, 17, 4, 13, 17, 14, 2, 2, 13, 17, 2, 2, 2, 2, 13, 13, 17, 17, 17, 4, 13, 17, 4, 13, 17, 29, 4, 13, 10, 12, 13 ]
[ [ 5, 4 ], [ 5, 15 ], [ 4, 19 ], [ 15, 22 ], [ 15, 30 ], [ 15, 36 ], [ 4, 37 ], [ 52, 49 ] ]
[ "def resolve():\n a, b = list(map(int, input().split()))\n\n if a <= 0 and b >= 0:\n print('Zero')\n elif b < 0 and (b - a + 1) % 2 == 1:\n print('Negative')\n else:\n print('Positive')\n return\n\n\nresolve()", "def resolve():\n a, b = list(map(int, input().split()))\n\n ...
def resolve(): a, b = list(map(int, input().split())) if a <= 0 and b >= 0: print('Zero') elif b < 0 and (b - a + 1) % 2 == 1: print('Negative') else: print('Positive') return resolve()
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 14, 2, 13, 17, 4, 13, 17, 14, 2, 13, 17, 4, 13, 17, 14, 40, 13, 17, 4, 13, 17, 14, 2, 2, 2, 13, 13, 17, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13 ]
[ [ 51, 2 ], [ 51, 11 ], [ 52, 14 ], [ 52, 21 ], [ 49, 28 ], [ 49, 37 ], [ 52, 38 ], [ 51, 49 ], [ 51, 52 ] ]
[ "a, b = map(int, input().split())\nif a > 0:\n print(\"Positive\")\nelif a == 0:\n print(\"Zero\")\nelse:\n if b >= 0:\n print(\"Zero\")\n else:\n if (b - a) % 2 == 0:\n print(\"Negative\")\n else:\n print(\"Positive\")", "a, b = map(int, input().split())", ...
a, b = map(int, input().split()) if a > 0: print("Positive") elif a == 0: print("Zero") else: if b >= 0: print("Zero") else: if (b - a) % 2 == 0: print("Negative") else: print("Positive")