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
p03246
u841222846
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing some of its elements. Find the minimum number of elements that needs to be replaced.
['n = int(input())\nv = list(map(int, input().split(" ")))\n\nv1 = {}\nv2 = {}\nfor i in range(len(v)):\n if(i % 2 == 0):\n if((v[i] in v1) == True):\n v1[v[i]] += 1\n else:\n v1[v[i]] = 1\n else: \n if((v[i] in v2) == True):\n v2[v[i]] += 1\n else:\n v2[v[i]] = 1\n\n\nif(max_k1 == max_k2):\n if(v1[max_k1] > v2[max_k2]):\n v2[max_k2] = 0\n max_k2 = max(v2, key=v2.get)\n else:\n v1[max_k1] = 0\n max_k1 = max(v1, key=v1.get)\n\n\nans = n // 2 - v1[max_k1]\nans += n // 2 - v2[max_k2]\n\nprint(ans)', 'n = int(input())\nv = list(map(int, input().split(" ")))\n\nv1 = {}\nv2 = {}\nfor i in range(n):\n if(i % 2 == 0):\n if((v[i] in v1) == True):\n v1[v[i]] += 1\n else:\n v1[v[i]] = 1\n else: \n if((v[i] in v2) == True):\n v2[v[i]] += 1\n else:\n v2[v[i]] = 1\n\nmax_k1 = max(v1, key=v1.get)\nmax_k2 = max(v2, key=v2.get)\n\nans1 = 1e9\nans2 = 1e9\nif(max_k1 == max_k2):\n tmp = v1[max_k1]\n v1[max_k1] = 0\n max_k1 = max(v1, key=v1.get)\n ans1 = n - v1[max_k1] - v2[max_k2]\n v1[max_k1] = tmp\n max_k1 = max(v1, key=v1.get)\n\n v2[max_k2] = 0\n max_k2 = max(v2, key=v2.get)\n ans2 = n - v1[max_k1] - v2[max_k2]\nelse: ans1 = n - v1[max_k1] - v2[max_k2]\n\nprint(min(ans1, ans2))']
['Runtime Error', 'Accepted']
['s136460798', 's719427148']
[17056.0, 17056.0]
[86.0, 98.0]
[579, 747]
p03246
u905802918
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing some of its elements. Find the minimum number of elements that needs to be replaced.
['n=int(input())\ns=input().split()\ns=[int(o) for o in s]\nleft=dict()\nright=dict()\ndef count_nums(mydict,o):\n if o in mydict.keys():\n mydict[o]+=1\n else:\n mydict[o]=1\nflag=True\nfor o in s:\n if flag:\n count_nums(left,o)\n flag=False\n else:\n count_nums(right,o)\n flag=True\nmyleft=sorted(left.keys(),key=lambda x: left[x])\nmyright=sorted(right.keys(),key=lambda x: right[x])\nif myleft[-1]!=myright[-1]:\n print( len(s)-left[myleft[-1]]-right[myright[-1]])\na0,b0=left[myleft[-1]],right[myright[-1]]\na1=0 if len(myleft)==1 else left[myleft[-2]]\nb1=0 if len(myright)==1 else right[myright[-2]]\nprint( len(s)-max(a0+b1,a1+b0))', 'n=int(input())\ns=input().split()\ns=[int(o) for o in s]\nleft=dict()\nright=dict()\ndef count_nums(mydict,o):\n if o in mydict.keys():\n mydict[o]+=1\n else:\n mydict[o]=1\nflag=True\nfor o in s:\n if flag:\n count_nums(left,o)\n flag=False\n else:\n count_nums(right,o)\n flag=True\nmyleft=sorted(left.keys(),key=lambda x: left[x])\nmyright=sorted(right.keys(),key=lambda x: right[x])\nif myleft[-1]!=myright[-1]:\n print( len(s)-left[myleft[-1]]-right[myright[-1]])\nelse:\n a0,b0=left[myleft[-1]],right[myright[-1]]\n a1=0 if len(myleft)==1 else left[myleft[-2]]\n b1=0 if len(myright)==1 else right[myright[-2]]\n print( len(s)-max(a0+b1,a1+b0))']
['Wrong Answer', 'Accepted']
['s447328454', 's667443905']
[17568.0, 17568.0]
[105.0, 101.0]
[637, 651]
p03246
u919730120
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing some of its elements. Find the minimum number of elements that needs to be replaced.
["def main():\n n=int(input())\n v=list(map(int,input().split()))\n l1=[0]*(10**5+1)\n l2=[0]*(10**5+1)\n for i,vn in enumerate(v):\n if i%2==0:\n l1[vn]+=1\n else:\n l2[vn]+=1\n f1,f2,s1,s2=0,0,0,0\n for i,ln in enumerate(l1):\n s1=max(s1,min(ln,f1))\n f1=max(f1,ln)\n for i,ln in enumerate(l2):\n s2=max(s2,min(ln,f2))\n f2=max(f2,ln)\n print(max(n-f1-s2,n-f2-s1))\n\nif __name__ == '__main__':\n main()", "def main():\n n=int(input())\n v=list(map(int,input().split()))\n l1=[0]*(10**5+1)\n l2=[0]*(10**5+1)\n for i,vn in enumerate(v):\n if i%2==0:\n l1[vn]+=1\n else:\n l2[vn]+=1\n f1,f2,s1,s2,m1,m2=0,0,0,0,0,0\n for i,ln in enumerate(l1):\n s1=max(s1,min(ln,f1))\n if f1<ln:\n m1=i\n f1=max(f1,ln)\n for i,ln in enumerate(l2):\n s2=max(s2,min(ln,f2))\n if f2<ln:\n m2=i\n f2=max(f2,ln)\n if m1==m2:\n print(min(n-f1-s2,n-f2-s1))\n else:\n print(n-f1-f2)\n\nif __name__ == '__main__':\n main()"]
['Wrong Answer', 'Accepted']
['s868947236', 's012331367']
[14268.0, 14404.0]
[170.0, 174.0]
[477, 609]
p03246
u921773161
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing some of its elements. Find the minimum number of elements that needs to be replaced.
['from collections import Counter\n\nn=int(input())\nV=list(map(int,input().split()))\n\nV1=V[0::2]\nV2=V[1::2]\n\nV1c=Counter(V1).most_common()\nV2c=Counter(V2).most_common()\nprint(V1c)\nprint(V2c)\n\n\nif V1c[0][0]==V2c[0][0]:\n if len(V1c)==1 and len(V2c)==1:\n print(n//2)\n elif len(V1c)==1:\n print(V2c[0][1])\n elif len(V2c)==1:\n print(V1c[0][1]) \n else:\n print(n-max(V1c[0][1]+V2c[1][1],V1c[1][1]+V2c[0][1]))\nelse:\n print(n-V1c[0][1]-V2c[0][1])\n', '#%%\nimport collections\n\nn = int(input())\nv = list(input().split())\nv1 = v[0::2]\nv2 = v[1::2]\n\n#print(v1)\n#print(v2)\n\n\nl1 = list(collections.Counter(v1).most_common())\nl2 = list(collections.Counter(v2).most_common())\n\n\nif l1[0][0] != l2[0][0]:\n tmp = l1[0][1] + l2[0][1]\nelse:\n if len(l1) > 1 and len(l2) > 1: \n tmp = max(l1[1][1] + l2[0][1], l1[0][1] + l2[1][1])\n elif len(l1) == 1 and len(l2) > 1:\n tmp = max(l2[0][1], l1[0][1] + l2[1][1])\n elif len(l2) == 1 and len(l1) > 1:\n tmp = max(l1[1][1] + l2[0][1], l1[0][1])\n else:\n tmp = max(l2[0][1], l1[0][1])\n\nans = n - tmp\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s627149661', 's917628444']
[22364.0, 23644.0]
[120.0, 86.0]
[452, 626]
p03246
u941407962
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing some of its elements. Find the minimum number of elements that needs to be replaced.
['vs = [int(i) for i in input().strip()]\nn = (len(vs) - 2)//2\ndef main(vs):\n if vs[0] != 1:\n print(-1)\n return -1\n if vs[-1] != 0:\n print(-1)\n return -1\n if vs[-2] != 1:\n print(-1)\n return -1\n for i in range(n):\n if vs[i+1] != vs[-2-i-1]:\n print(-1)\n return\n\n temp = 1\n for i in range(n+1 if len(vs) % 2 == 0 else n+2):\n print(1, temp+1)\n temp += 1\n temptemp = temp\n temp = 1\n for i in range(n):\n x = 1+n-i\n if vs[n-i] == 1:\n print(temptemp, temptemp+1)\n temp = temptemp\n temptemp += 1\n else:\n print(temp, temptemp+1) \n temptemp += 1\n\nmain(vs)\n', "from collections import Counter\nn = int(input().strip())\nvs = [int(i) for i in input().split(' ')]\nvs1 = vs[::2]\nvs2 = vs[1::2]\na = Counter(vs1).most_common()\nb = Counter(vs2).most_common()\n\nif a[0][0] != b[0][0]:\n print(n - a[0][1] - b[0][1])\nelse:\n candidates = []\n if len(a) != 1:\n candidates.append(n - a[1][1] - b[0][1])\n if len(b) != 1:\n candidates.append(n - a[0][1] - b[1][1])\n if len(candidates) != 0:\n print(min(candidates))\n else:\n print(n//2)\n"]
['Wrong Answer', 'Accepted']
['s266473293', 's261399818']
[3064.0, 21084.0]
[17.0, 89.0]
[730, 501]
p03246
u942033906
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing some of its elements. Find the minimum number of elements that needs to be replaced.
['n = int(input())\nv = list(map(int,input().split()))\n\nv_e_cnt = [0 for i in range(10**6)]\nv_o_cnt = [0 for i in range(10**6)]\nfor x in range(n):\n\tif x % 2 == 0:\n\t\tv_e_cnt[v[x]] += 1\n\telse:\n\t\tv_o_cnt[v[x]] += 1\n\nmax_e = [(0,0),(0,0)]\nmax_o = [(0,0),(0,0)]\nfor i in range(10**5+1):\n\tif max_e[1][0] < v_e_cnt[i]:\n\t\tif max_e[0][0] < v_e_cnt[i]:\n\t\t\tmax_e[1] = max_e[0]\n\t\t\tmax_e[0] = (v_e_cnt[i], i)\n\t\telse:\n\t\t\tmax_e[1] = (v_e_cnt[i], i)\n\tif max_o[1][0] < v_o_cnt[i]:\n\t\tif max_o[0][0] > v_o_cnt[i]:\n\t\t\tmax_o[1] = max_o[0]\n\t\t\tmax_o[0] = (v_o_cnt[i], i)\n\t\telse:\n\t\t\tmax_o[0] = (v_o_cnt[i], i)\n\nans = n - e[0][0] - o[0][0]\nif e[0][1] == o[0][1]:\n\tans = n - max(e[0][0] + o[1][0], e[1][0] + o[0][0])\n\nprint(ans)\n', 'n = int(input())\nv = list(map(int,input().split()))\n\nv_e_cnt = [0 for i in range(10**6)]\nv_o_cnt = [0 for i in range(10**6)]\nfor x in range(n):\n\tif x % 2 == 0:\n\t\tv_e_cnt[v[x]] += 1\n\telse:\n\t\tv_o_cnt[v[x]] += 1\n\nmax_e = [(0,0),(0,0)]\nmax_o = [(0,0),(0,0)]\nfor i in range(10**5+1):\n\tif max_e[1][0] < v_e_cnt[i]:\n\t\tif max_e[0][0] < v_e_cnt[i]:\n\t\t\tmax_e[1] = max_e[0]\n\t\t\tmax_e[0] = (v_e_cnt[i], i)\n\t\telse:\n\t\t\tmax_e[1] = (v_e_cnt[i], i)\n\tif max_o[1][0] < v_o_cnt[i]:\n\t\tif max_o[0][0] > v_o_cnt[i]:\n\t\t\tmax_o[1] = max_o[0]\n\t\t\tmax_o[0] = (v_o_cnt[i], i)\n\t\telse:\n\t\t\tmax_o[1] = (v_o_cnt[i], i)\n\nans = n - max_e[0][0] - max_o[0][0]\nif max_e[0][1] == max_o[0][1]:\n\tans = n - max(max_e[0][0] + max_o[1][0], max_e[1][0] + max_o[0][0])\n\nprint(ans)\n', 'n = int(input())\nv = list(map(int,input().split()))\n\nv_e_cnt = [0 for i in range(10**6)]\nv_o_cnt = [0 for i in range(10**6)]\nfor x in range(n):\n\tif x % 2 == 0:\n\t\tv_e_cnt[v[x]] += 1\n\telse:\n\t\tv_o_cnt[v[x]] += 1\n\nmax_e = [(0,0),(0,0)]\nmax_o = [(0,0),(0,0)]\nfor i in range(10**5+1):\n\tif max_e[1][0] < v_e_cnt[i]:\n\t\tif max_e[0][0] < v_e_cnt[i]:\n\t\t\tmax_e[1] = max_e[0]\n\t\t\tmax_e[0] = (v_e_cnt[i], i)\n\t\telse:\n\t\t\tmax_e[1] = (v_e_cnt[i], i)\n\tif max_o[1][0] < v_o_cnt[i]:\n\t\tif max_o[0][0] < v_o_cnt[i]:\n\t\t\tmax_o[1] = max_o[0]\n\t\t\tmax_o[0] = (v_o_cnt[i], i)\n\t\telse:\n\t\t\tmax_o[1] = (v_o_cnt[i], i)\n\nans = n - max_e[0][0] - max_o[0][0]\nif max_e[0][1] == max_o[0][1]:\n\tans = n - max(max_e[0][0] + max_o[1][0], max_e[1][0] + max_o[0][0])\n\nprint(ans)\n']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s077686281', 's684550424', 's390373441']
[26468.0, 26468.0, 26468.0]
[183.0, 174.0, 173.0]
[700, 732, 732]
p03246
u944209426
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing some of its elements. Find the minimum number of elements that needs to be replaced.
['n=int(input())\na=list(map(int, input().split()))\n\nb=[a[i] for i in range(0,n,2)]\nc=[a[i] for i in range(1,n,2)]\nfrom collections import Counter\nxb=list(Counter(b).items())\nxc=list(Counter(c).items())\nxb=sorted(xb, key=lambda x:-x[1])\nxc=sorted(xc, key=lambda x:-x[1])\nans=[]\nprint(xb,xc)\nif xb[0][0]==xc[0][0]:\n print(len(xc),len(xb))\n if len(xc)>1:\n ans.append(n//2-xb[0][1]-(-n//2)-xc[1][1])\n if len(xb)>1:\n ans.append(n//2-xb[1][1]-(-n//2)-xc[0][1])\n if len(xc)==1 and len(xb)==1:\n ans.append(n//2)\nelse:\n ans.append(n//2-xb[0][1]-(-n//2)-xc[0][1])\nprint(min(ans))', 'n=int(input())\na=list(map(int, input().split()))\n\nb=[a[i] for i in range(0,n,2)]\nc=[a[i] for i in range(1,n,2)]\nfrom collections import Counter\nxb=list(Counter(b).items())\nxc=list(Counter(c).items())\nxb=sorted(xb, key=lambda x:-x[1])\nxc=sorted(xc, key=lambda x:-x[1])\nans=[]\nif xb[0][0]==xc[0][0]:\n if len(xc)>1:\n ans.append(n//2-xb[0][1]-(-n//2)-xc[1][1])\n if len(xb)>1:\n ans.append(n//2-xb[1][1]-(-n//2)-xc[0][1])\n if len(xc)==1 and len(xb)==1:\n ans.append(n//2)\nelse:\n ans.append(n//2-xb[0][1]-(-n//2)-xc[0][1])\nprint(min(ans))']
['Wrong Answer', 'Accepted']
['s018145558', 's244150668']
[22236.0, 20956.0]
[133.0, 98.0]
[603, 563]
p03246
u945199633
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing some of its elements. Find the minimum number of elements that needs to be replaced.
['import collections\n\nn = int(input())\nv = list(map(int,input().split()))\n\nv1 = v[::2]\nv2 = v[1::2]\n\nc1 = collections.Counter(v1)\nc2 = collections.Counter(v2)\n\nif v1 == v2 and len(c1.most_common()) == 1\n print(len(v1))\nelif c1.most_common()[0][0] != c2.most_common()[0][0]:\n print(len(v1) - c1.most_common()[0][1] + len(v2) - c2.most_common()[0][1])\nelse:\n if c1.most_common()[1][1] < c2.most_common()[1][1]:\n print(len(v1) - c1.most_common()[0][1] + len(v2) - c2.most_common()[1][1])\n else:\n print(len(v1) - c1.most_common()[1][1] + len(v2) - c2.most_common()[0][1])', 'import collections\n\nn = int(input())\nv = list(map(int,input().split()))\n\nv1 = v[::2]\nv2 = v[1::2]\n\nc1 = collections.Counter(v1)\nc2 = collections.Counter(v2)\n\nif (v1 == v2 and len(c1.most_common()) == 1):\n print(len(v1))\nelif c1.most_common()[0][0] != c2.most_common()[0][0]:\n print(len(v1) - c1.most_common()[0][1] + len(v2) - c2.most_common()[0][1])\nelse:\n if c1.most_common()[1][1] < c2.most_common()[1][1]:\n print(len(v1) - c1.most_common()[0][1] + len(v2) - c2.most_common()[1][1])\n else:\n print(len(v1) - c1.most_common()[1][1] + len(v2) - c2.most_common()[0][1])']
['Runtime Error', 'Accepted']
['s593382491', 's929032748']
[2940.0, 19032.0]
[17.0, 131.0]
[591, 594]
p03246
u951601135
2,000
1,048,576
A sequence a_1,a_2,... ,a_n is said to be /\/\/\/ when the following conditions are satisfied: * For each i = 1,2,..., n-2, a_i = a_{i+2}. * Exactly two different numbers appear in the sequence. You are given a sequence v_1,v_2,...,v_n whose length is even. We would like to make this sequence /\/\/\/ by replacing some of its elements. Find the minimum number of elements that needs to be replaced.
['import collections\nn=int(input())\nlist=list(map(int,input().split()))\n#print(list)\nlist_1=list[::2]\nlist_2=list[1::2]\nif (list_1[0]==list_2[0] & all(list_1) & all(list_2)):\n print(n//2)\n #print(list_1)\n #print(list_2)\n a=collections.Counter(list_1)\n b=collections.Counter(list_2)\nelif(a==b):\n print(n//2)\nelse\n #print(a)\n #print(b)\n #print(a.most_common())\n #print(b.most_common())\n #print(a.most_common()[0][1])\n #print(b.most_common()[0][1])\n print(n-a.most_common()[0][1]-b.most_common()[0][1])', 'import collections\nn=int(input())\nlist=list(map(int,input().split()))\nlist_1=list[::2]\nlist_2=list[1::2]\na=collections.Counter(list_1)\nb=collections.Counter(list_2)\nprint(a.most_common()[0]==b.most_common()[0])\nprint(len(list_1),a.most_common()[0][1])\nif((a.most_common()[0]==b.most_common()[0]) & (a.most_common()[0][1]!=len(list_1))):\n if(n-a.most_common()[0][1]-b.most_common()[1][1]>n-a.most_common()[1][1]-b.most_common()[0][1]):\n \tprint(n-a.most_common()[1][1]-b.most_common()[0][1])\n else:\n print(n-a.most_common()[0][1]-b.most_common()[1][1])\nelif ((a.most_common()==b.most_common()) & (a.most_common()[0][1]==len(list_1))):\n print(n//2)\nelse:\n\n print(n-a.most_common()[0][1]-b.most_common()[0][1])', 'import collections\nn=int(input())\nlist=list(map(int,input().split()))\n#print(list)\nlist_1=list[::2]\nlist_2=list[1::2]\nprint(list_1)\n#print(list_2)\na=collections.Counter(list_1)\nb=collections.Counter(list_2)\n#print(a)\n#print(b)\n#print(a.most_common())\n#print(b.most_common())\n#print(a.most_common()[0][1])\n#print(b.most_common()[0][1])\nprint(n-a.most_common()[0][1]-b.most_common()[0][1])', 'import collections\nn=int(input())\nlist=list(map(int,input().split()))\n#print(list)\nlist_1=list[::2]\nlist_2=list[1::2]\nif (list_1==list_2):\n print(n//2)\n break\n#print(list_1)\n#print(list_2)\na=collections.Counter(list_1)\nb=collections.Counter(list_2)\n#print(a)\n#print(b)\n#print(a.most_common())\n#print(b.most_common())\n#print(a.most_common()[0][1])\n#print(b.most_common()[0][1])\n\nprint(n-a.most_common()[0][1]-b.most_common()[0][1])', 'import collections\nn=int(input())\nlist=list(map(int,input().split()))\n#print(list)\nlist_1=list[::2]\nlist_2=list[1::2]\n#print(list_1)\n#print(list_2)\na=collections.Counter(list_1)\nb=collections.Counter(list_2)\n#print(a)\n#print(b)\n#print(a.most_common())\n#print(b.most_common())\nif (list_1[0]==list_2[0] & all(list_1) & all(list_2)):\n print(n//2)\nelif (a.most_common==b.most>common):\n print(n//2)\nelse:\n #print(a.most_common()[0][1])\n #print(b.most_common()[0][1])\n print(n-a.most_common()[0][1]-b.most_common()[0][1])', "import collections\nn=int(input())\nlist=list(map(int,input().split()))\n#print(list)\nlist_1=list[::2]\nlist_2=list[1::2]\n#print(list_1)\n#print(list_2)\na=collections.Counter(list_1)\nb=collections.Counter(list_2)\nprint(a.most_common()[0]==b.most_common()[0])\nprint(len(list_1),a.most_common()[0][1])\nif ((a.most_common()==b.most_common()) & a.most_common()[0][1]==len(list_1)):\n print('test1')\n print(n//2)\nelif(a.most_common()[0]==b.most_common()[0]):\n print('test2')\n print(n-a.most_common()[0][1]-b.most_common()[1][1])\nelse:\n print(n-a.most_common()[0][1]-b.most_common()[0][1])", "import collections\nn=int(input())\nlist=list(map(int,input().split()))\n#print(list)\nlist_1=list[::2]\nlist_2=list[1::2]\n#print(list_1)\n#print(list_2)\na=collections.Counter(list_1)\nb=collections.Counter(list_2)\n#print(a.most_common()[0]==b.most_common()[0])\n#print(len(list_1),a.most_common()[0][1])\nif((a.most_common()[0]==b.most_common()[0]) & (a.most_common()[0][1]!=len(list_1))):\n #print('test2')\n if(n-a.most_common()[0][1]-b.most_common()[1][1]>n-a.most_common()[1][1]-b.most_common()[0][1]):\n \tprint(n-a.most_common()[1][1]-b.most_common()[0][1])\n else:\n print(n-a.most_common()[0][1]-b.most_common()[1][1])\nelif ((a.most_common()==b.most_common()) & (a.most_common()[0][1]==len(list_1))):\n #print('test1')\n print(n//2)\nelse:\n #print(a)\n #print(b)\n #print(a.most_common())\n #print(b.most_common())\n #print(a.most_common()[0][1])\n #print(b.most_common()[0][1])\n\n print(n-a.most_common()[0][1]-b.most_common()[0][1])"]
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s189039726', 's254602535', 's305616918', 's326749675', 's404025658', 's698560072', 's151377543']
[2940.0, 21952.0, 19424.0, 3060.0, 19040.0, 21952.0, 21952.0]
[18.0, 178.0, 99.0, 18.0, 62.0, 181.0, 151.0]
[510, 942, 387, 432, 520, 810, 1163]
p03248
u143509139
2,000
1,048,576
You are given a string s of length n. Does a tree with n vertices that satisfies the following conditions exist? * The vertices are numbered 1,2,..., n. * The edges are numbered 1,2,..., n-1, and Edge i connects Vertex u_i and v_i. * If the i-th character in s is `1`, we can have a connected component of size i by removing one edge from the tree. * If the i-th character in s is `0`, we cannot have a connected component of size i by removing any one edge from the tree. If such a tree exists, construct one such tree.
["input()\nprint(input().split().index('1')+1)", "s = input()\nn = len(s)\nif s[0] == '0':\n print(-1)\n exit(0)\nif s[-1] == '1':\n print(-1)\n exit(0)\nfor i in range((n - 1) // 2):\n if s[i] != s[n - i - 2]:\n print(-1)\n exit(0)\np = 1\nt = 2\ni = n - 2\nwhile i >= 0:\n print(p, t)\n if s[i] == '1':\n p = t\n t += 1\n i -= 1"]
['Runtime Error', 'Accepted']
['s515074028', 's757480475']
[3188.0, 4648.0]
[17.0, 182.0]
[43, 308]
p03248
u257374434
2,000
1,048,576
You are given a string s of length n. Does a tree with n vertices that satisfies the following conditions exist? * The vertices are numbered 1,2,..., n. * The edges are numbered 1,2,..., n-1, and Edge i connects Vertex u_i and v_i. * If the i-th character in s is `1`, we can have a connected component of size i by removing one edge from the tree. * If the i-th character in s is `0`, we cannot have a connected component of size i by removing any one edge from the tree. If such a tree exists, construct one such tree.
['s = input()\n\ndef print_index(x,y):\n if y > len(s):\n return\n print(x,y)\n\ndef solve(s,index):\n if not s:\n return\n if s[0]=="1":\n print_index(index,index+1)\n return solve(s[1:],index+1)\n else:\n print_index(index,index+1)\n print_index(index,index+2)\n return solve(s[1:],index+1)\n\n\n(solve(s,1))', 'import bisect\ns = input()\nif s[-1] == "1" or s[0] == "0":\n print(-1)\n exit()\n\nfor i in range((len(s) - 1) // 2):\n \n if s[i] != s[len(s) - i -2]:\n print(-1)\n exit()\n\nsd = s[:-1] + \'1\'\nplist = [i for i, v in enumerate(sd) if v == \'1\']\n# print(plist)\nfor i,v in enumerate(s[:-1]):\n r = bisect.bisect(plist,i)\n print(i+1,plist[r] + 1)\n\n']
['Runtime Error', 'Accepted']
['s877087502', 's501536766']
[101568.0, 8724.0]
[125.0, 227.0]
[353, 388]
p03248
u263830634
2,000
1,048,576
You are given a string s of length n. Does a tree with n vertices that satisfies the following conditions exist? * The vertices are numbered 1,2,..., n. * The edges are numbered 1,2,..., n-1, and Edge i connects Vertex u_i and v_i. * If the i-th character in s is `1`, we can have a connected component of size i by removing one edge from the tree. * If the i-th character in s is `0`, we cannot have a connected component of size i by removing any one edge from the tree. If such a tree exists, construct one such tree.
["def main():\n S = list(input())\n\n N = len(S)\n\n if (S[0] == 0) or (S[-1] == 0):\n print (-1)\n return 0\n\n lst = []\n for i in range((N - 1) // 2):\n if S[i] != S[N - 2 - i]:\n print (-1)\n return 0\n if S[i] == '1':\n lst.append(i + 1)\n # print (lst)\n\n if lst[-1] * 2 != N:\n center = lst[-1] + 1\n for x in range(lst[-1] * 2 + 2, N + 1):\n print (center, x)\n\n before = 1\n n = lst[-1] * 2 + 2\n for tmp in lst[1:]:\n print (before, tmp)\n print (n - before, n - tmp)\n for x in range(tmp - before - 1):\n print (before + 1 + x, tmp)\n print (n - (before + 1 + x), n - tmp)\n before = tmp\n print (tmp, center)\n print (n - tmp, center)\n\n if lst[-1] * 2 == N:\n before = 1\n n = lst[-1] * 2 + 2\n for tmp in lst[1:]:\n print (before, tmp)\n print (n - before, n - tmp)\n for x in range(tmp - before - 1):\n print (before + 1 + x, tmp)\n print (n - (before + 1 + x), n - tmp)\n before = tmp\n print (tmp, n - tmp)\n\nif __name__ == '__main__':\n main()", "def main():\n S = list(input())\n\n N = len(S)\n\n if (S[0] == 0) or (S[-1] == 0):\n print (-1)\n return 0\n\n lst = []\n for i in range((N - 1) // 2):\n if S[i] != S[N - 2 - i]:\n print (-1)\n return 0\n if S[i] == '1':\n lst.append(i + 1)\n if N % 2 == 0 and S[N//2 - 1] == '1':\n lst.append(N//2)\n # print (lst)\n\n if lst[-1] * 2 != N:\n center = lst[-1] + 1\n for x in range(lst[-1] * 2 + 2, N + 1):\n print (center, x)\n\n before = 1\n n = lst[-1] * 2 + 2\n tmp = 1\n for tmp in lst[1:]:\n print (before, tmp)\n print (n - before, n - tmp)\n for x in range(tmp - before - 1):\n print (before + 1 + x, tmp)\n print (n - (before + 1 + x), n - tmp)\n before = tmp\n print (tmp, center)\n print (n - tmp, center)\n\n if lst[-1] * 2 == N:\n before = 1\n n = lst[-1] * 2 + 1\n tmp = 1\n for tmp in lst[1:]:\n print (before, tmp)\n print (n - before, n - tmp)\n for x in range(tmp - before - 1):\n print (before + 1 + x, tmp)\n print (n - (before + 1 + x), n - tmp)\n before = tmp\n print (tmp, n - tmp)\n\nif __name__ == '__main__':\n main()", "def main():\n S = list(input())\n\n N = len(S)\n\n if (S[0] == 0) or (S[-1] == 0):\n print (-1)\n return 0\n\n lst = []\n for i in range((N - 1) // 2):\n if S[i] != S[N - 2 - i]:\n print (-1)\n return 0\n if S[i] == '1':\n lst.append(i + 1)\n if N % 2 == 0 and S[N//2 - 1] == '1':\n lst.append(N//2)\n # print (lst)\n\n if lst[-1] * 2 != N:\n center = lst[-1] + 1\n for x in range(lst[-1] * 2 + 2, N + 1):\n print (center, x)\n\n before = 1\n n = lst[-1] * 2 + 2\n for tmp in lst[1:]:\n print (before, tmp)\n print (n - before, n - tmp)\n for x in range(tmp - before - 1):\n print (before + 1 + x, tmp)\n print (n - (before + 1 + x), n - tmp)\n before = tmp\n print (tmp, center)\n print (n - tmp, center)\n\n if lst[-1] * 2 == N:\n before = 1\n n = lst[-1] * 2 + 1\n for tmp in lst[1:]:\n print (before, tmp)\n print (n - before, n - tmp)\n for x in range(tmp - before - 1):\n print (before + 1 + x, tmp)\n print (n - (before + 1 + x), n - tmp)\n before = tmp\n print (tmp, n - tmp)\n\nif __name__ == '__main__':\n main()", "def main():\n S = list(input())\n\n N = len(S)\n\n if (S[0] == '0') or (S[-1] == '1'):\n print (-1)\n return 0\n\n lst = []\n for i in range((N - 1) // 2):\n if S[i] != S[N - 2 - i]:\n print (-1)\n return 0\n if S[i] == '1':\n lst.append(i + 1)\n if N % 2 == 0 and S[N//2 - 1] == '1':\n lst.append(N//2)\n # print (lst)\n\n if lst[-1] * 2 != N:\n center = lst[-1] + 1\n for x in range(lst[-1] * 2 + 2, N + 1):\n print (center, x)\n\n before = 1\n n = lst[-1] * 2 + 2\n tmp = 1\n for tmp in lst[1:]:\n print (before, tmp)\n print (n - before, n - tmp)\n for x in range(tmp - before - 1):\n print (before + 1 + x, tmp)\n print (n - (before + 1 + x), n - tmp)\n before = tmp\n print (tmp, center)\n print (n - tmp, center)\n\n if lst[-1] * 2 == N:\n before = 1\n n = lst[-1] * 2 + 1\n tmp = 1\n for tmp in lst[1:]:\n print (before, tmp)\n print (n - before, n - tmp)\n for x in range(tmp - before - 1):\n print (before + 1 + x, tmp)\n print (n - (before + 1 + x), n - tmp)\n before = tmp\n print (tmp, n - tmp)\n\nif __name__ == '__main__':\n main()"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s118786865', 's550255871', 's841980628', 's524142168']
[7600.0, 7688.0, 7688.0, 7688.0]
[167.0, 155.0, 149.0, 159.0]
[1239, 1338, 1306, 1342]
p03248
u792078574
2,000
1,048,576
You are given a string s of length n. Does a tree with n vertices that satisfies the following conditions exist? * The vertices are numbered 1,2,..., n. * The edges are numbered 1,2,..., n-1, and Edge i connects Vertex u_i and v_i. * If the i-th character in s is `1`, we can have a connected component of size i by removing one edge from the tree. * If the i-th character in s is `0`, we cannot have a connected component of size i by removing any one edge from the tree. If such a tree exists, construct one such tree.
["s = input()\nl = len(s)\n\nif s[0] != '1' or s[-2] != '1' or s[-1] != '0':\n print('-1')\nif s[:-1] != s[:-1][::-1]:\n print('-1')\n\n\ne = [list(range(2, l+1))] + [[] for _ in range(l-1)]\nnow = 0\nh = (l-1) // 2\nfor i in range(h, 0, -1):\n c = s[i]\n if c == '0':\n continue\n \n nowl = len(e[now])\n e[l-i-1] = e[now][-i:]\n e[now] = e[now][:nowl-i]\n now = l-i-1\n\nfor i, arr in enumerate(e):\n for a in arr:\n print(i+1, a)", "s = input()\nl = len(s)\n\nif s[0] != '1' or s[-2] != '1' or s[-1] != '0':\n print('-1')\n exit()\nif s[:-1] != s[:-1][::-1]:\n print('-1')\n exit()\n\n\ne = [l] + [-1] * (l-1)\nnow = 0\nh = (l-1) // 2\nfor i in range(h, 0, -1):\n c = s[i]\n if c == '0':\n continue\n \n e[now] = l - i\n e[l-i-1] = l\n now = l-i-1\n\nfor i, a in enumerate(e):\n for j in range(i+2, a+1):\n print(i+1, j)"]
['Wrong Answer', 'Accepted']
['s097881878', 's407464260']
[15424.0, 6952.0]
[2104.0, 200.0]
[522, 479]
p03248
u834415466
2,000
1,048,576
You are given a string s of length n. Does a tree with n vertices that satisfies the following conditions exist? * The vertices are numbered 1,2,..., n. * The edges are numbered 1,2,..., n-1, and Edge i connects Vertex u_i and v_i. * If the i-th character in s is `1`, we can have a connected component of size i by removing one edge from the tree. * If the i-th character in s is `0`, we cannot have a connected component of size i by removing any one edge from the tree. If such a tree exists, construct one such tree.
["n=input()\nn='0'+n\nl=len(n)\nflag=0\nif n!=n[::-1]:\n flag=1\nif n[1]=='0':\n flag=1\nif flag==0:\n print(1,2)\n c=1\n for i in range(1,l-2):\n if n[i]=='1':\n print(i+1,i+2)\n c+=1\n else:\n print(c,i+2)", "n=input()\nn='0'+n\nl=len(n)\nflag=0\nif n!=n[::-1]:\n flag=1\nif n[1]=='0':\n flag=1\nif flag==0:\n print(1,2)\n c=1\n for i in range(1,l-2):\n if n[i]=='1':\n print(i+1,i+2)\n c=i+1\n else:\n print(c,i+2)\nelse:\n print(-1)"]
['Wrong Answer', 'Accepted']
['s420487615', 's423574344']
[4652.0, 4652.0]
[168.0, 173.0]
[251, 272]
p03248
u875291233
2,000
1,048,576
You are given a string s of length n. Does a tree with n vertices that satisfies the following conditions exist? * The vertices are numbered 1,2,..., n. * The edges are numbered 1,2,..., n-1, and Edge i connects Vertex u_i and v_i. * If the i-th character in s is `1`, we can have a connected component of size i by removing one edge from the tree. * If the i-th character in s is `0`, we cannot have a connected component of size i by removing any one edge from the tree. If such a tree exists, construct one such tree.
['# coding: utf-8\n# Your code here!\n\nss=input()\nans=0\n\nif ss[-1]==1:\n ans=-1\ns=ss[:-1]\n#print(s)\ngans=[]\n\nc=1\nfor i in range(len(s)):\n if i==0 and s[i]=="0":\n ans=-1\n break\n \n if s[i]=="1":\n gans.append([c, i+2])\n c=i+2\n else:\n gans.append([i+2,c])\n\n\nif ans==-1:\n print(ans)\nelse:\n for i in gans:\n print(*i)', '# coding: utf-8\n# Your code here!\n\nss=input()\nans=0\n\nif ss[-1]=="1":\n ans=-1\ns=ss[:-1]\n#print(s)\ngans=[]\n\nc=1\nfor i in range(len(s)):\n if i==0 and s[i]=="0":\n ans=-1\n break\n if s[i] != s[len(s)-i-1]:\n ans=-1\n break\n \n if s[i]=="1":\n gans.append([c, i+2])\n c=i+2\n else:\n gans.append([i+2,c])\n\n\nif ans==-1:\n print(ans)\nelse:\n for i in gans:\n print(*i)']
['Wrong Answer', 'Accepted']
['s445450295', 's424974911']
[21228.0, 21356.0]
[206.0, 233.0]
[368, 429]
p03250
u003501233
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['s=list(map(int,input().split())\ns.sort()\nprint(max(10*s[0]+s[1]+s[2],s[0]+s[1]*10+s[2],s[0]+s[1]+s[2]*10))', 'A,B,C=sorted(map(int.input.split()))\nprint(A+B+C*10)', 'A,B,C=map(int,input().split())\nD=A+B\nprint(D+C)', 'A,B,C=sorted(map(int,input.split()))\nprint(A+B+C*10)', 'A,B,C=sorted(map(int,input().split()))\nprint(A+B+C*10)']
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s064661947', 's078881455', 's140311887', 's248711657', 's409353590']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0, 17.0]
[106, 52, 47, 52, 54]
p03250
u008992227
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['a,b,c=sorted(map(int,input()))\nprint(10*c+a+b)\n', 'a,b,c=sorted(map(int,input().split()))\nprint(10*c+a+b)\n']
['Runtime Error', 'Accepted']
['s515168703', 's783476369']
[2940.0, 2940.0]
[17.0, 17.0]
[47, 55]
p03250
u009414205
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['import math\nimport sympy\nimport numpy as np\n\ndef p(n,r):\n return int(math.factorial(n)/math.factorial(n-r))\ndef c(n,r):\n return int(p(n,r)/math.factorial(r))\n\nn, m = map(int, input().split())\ndic = sympy.factorint(m)\nprint(dic)\nans = [c(i+n-1,i) % (10**9+7) for i in dic.values()]\nprint(np.prod(ans) % (10**9+7))', 'a = sorted(list(map(int, input().split())))[::-1]\nprint(int(str(a[0]) + str(a[1])) + a[2])']
['Runtime Error', 'Accepted']
['s234450460', 's910366034']
[3064.0, 2940.0]
[17.0, 17.0]
[318, 90]
p03250
u010090035
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['abc = list(map(int,input().split()))\nabc.sort\nprint(abc[0] + (abc[2]*10 + abc[1]))\n', 'abc = list(map(int,input().split()))\nabc.sort()\nprint(abc[0] + (abc[2]*10 + abc[1]))\n']
['Wrong Answer', 'Accepted']
['s879628850', 's674311009']
[2940.0, 2940.0]
[17.0, 18.0]
[83, 85]
p03250
u017415492
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['a=list(map(int,input().split()))\na.sort()\nprint(int (str(a[0])+str(a[1])) +a[2])', 'a=list(map(int,input().split()))\na.sort()\nprint(int (str(a[2])+str(a[1])) +a[0])\n']
['Wrong Answer', 'Accepted']
['s359460641', 's109948951']
[2940.0, 2940.0]
[18.0, 17.0]
[80, 81]
p03250
u021371099
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['n, m, x, y = [int(i) for i in input().split(" ")]\nx_range = [int(i) for i in input().split(" ")]\ny_range = [int(i) for i in input().split(" ")]\nwar = True\nfor z in range(x, y):\n if x < z <= y and max(x_range) < z <= min(y_range[:m]):\n war = False\nprint("War" if war else "No War")\n', 'input_data = [int(i) for i in input().split(" ")]\n\nans = 0\nfor k1, v1 in enumerate(input_data):\n for k2, v2 in enumerate(input_data):\n for k3, v3 in enumerate(input_data):\n if k1 == k2 or k2 == k3 or k3 == k1:\n continue\n kou1 = int(v1 + v2)\n if ans < kou1 + v3:\n ans = kou1 + v3\nprint(ans)\n', '\ns = input()\nt = input()\n\n[globals().update({\'s\': s.translate(str.maketrans({s[i]: t[i], t[i]: s[i]}))}) for i in range(len(s))]\n\nprint("Yes" if s == t else "No")\n', 'input_data = [int(i) for i in input().split(" ")]\n\nans = 0\nfor k1, v1 in enumerate(input_data):\n for k2, v2 in enumerate(input_data):\n for k3, v3 in enumerate(input_data):\n if k1 == k2 or k2 == k3 or k3 == k1:\n continue\n kou1 = int(str(v1) + str(v2))\n kou2 = v3\n if ans < kou1 + kou2:\n ans = kou1 + v3\nprint(ans)\n']
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s307837760', 's721013827', 's954554323', 's667487382']
[3060.0, 2940.0, 2940.0, 3060.0]
[17.0, 17.0, 17.0, 17.0]
[291, 363, 163, 397]
p03250
u022488946
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['A, B, C = map(int, input().split())\nm = max(A, B, C)\nprint(m * 9 + sum(A, B, C))', 'A, B, C = map(int, input().split())\nm = max(A, B, C)\nprint(m * 9 + sum((A, B, C)))']
['Runtime Error', 'Accepted']
['s993445239', 's501379301']
[9072.0, 9044.0]
[27.0, 32.0]
[80, 82]
p03250
u023185908
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['s1 = input()\nt1 = input()\n\ns = list(s1)\nt = list(t1)\n\nflag = 0\nfor i in range(len(s)):\n for j in range(len(s)):\n if s[i] == s[j]:\n if t[i] == t[j]:\n a = 1\n else:\n print("No")\n flag = 1\n break\n if flag == 1:\n break\n\n if t[i] == t[j]:\n if s[i] == s[j]:\n a = 1\n else:\n print("No")\n flag = 1\n break\n if flag == 1:\n break\n if flag == 1:\n break\nif flag == 0:\n print("Yes")\n', 'd = input().split()\n\na = int(d[0])\nb = int(d[1])\nc = int(d[2])\n\nint e = 0\n\ne = a*10+b+c\n\nif e < b*10+a+c:\n e = b*10+a+c\n if e < c*10+a+b:\n e = c*10+a+b\n\nif e < c*10+a+b:\n e= c*10+a+b\n if e < b*10+a+c:\n e = b*10+a+c\n\nprint(e)\n', 'd = input().split()\n\na = int(d[0])\nb = int(d[1])\nc = int(d[2])\n\ne = 0\n\ne = a*10+b+c\n\nif e < b*10+a+c:\n e = b*10+a+c\n if e < c*10+a+b:\n e = c*10+a+b\n\nif e < c*10+a+b:\n e= c*10+a+b\n if e < b*10+a+c:\n e = b*10+a+c\n\nprint(e)\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s723082863', 's915692572', 's919309186']
[3064.0, 3064.0, 3064.0]
[17.0, 17.0, 17.0]
[597, 251, 247]
p03250
u026155812
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['A = [int(i) for i in input().split()]\nA.sort()\nprint(10*A[0] + A[1] + A[2])', "A = [str(i) for i in input().split()]\nA.sort()\nA.insert(2, '+')\nprint(eval(''.join(A)))", 'A = [int(i) for i in input().split()]\nA.sort(reverse=True)\nprint(10*A[0] + A[1] + A[2])']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s257505485', 's519283485', 's079181726']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[75, 87, 87]
p03250
u039623862
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['a,b,c = sorted(list(map(int, input().split())))\nprint(a*10+b+c)', 'a,b,c = *sorted(list(map(int, input().split())))\nprint(a*10+b+c)', 'a,b,c = sorted(list(map(int, input().split())))\nprint(c*10+b+a)']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s272189488', 's345126324', 's199177158']
[2940.0, 2940.0, 2940.0]
[18.0, 18.0, 18.0]
[63, 64, 63]
p03250
u055687574
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['s = sorted(map(int, input().split()))\n\nprint(s[2] * 10 + s[0] + s[0])\n', 's = sorted(map(int, input().split()))\n\nprint(s[2] * 10 + s[0] + s[1])\n']
['Wrong Answer', 'Accepted']
['s071311544', 's487403261']
[3064.0, 2940.0]
[17.0, 17.0]
[70, 70]
p03250
u060793972
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['l = list(map(int, input.split()))\nprint(sum(l)+max(l)*9)', 'l = list(map(int, input().split()))\nprint(sum(l)+max(l)*9)']
['Runtime Error', 'Accepted']
['s051342238', 's781181972']
[2940.0, 2940.0]
[17.0, 18.0]
[56, 58]
p03250
u070561949
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['s = list(str(input()))\nt = list(str(input()))\ns.sort()\nt.sort()\n\nfor i in range(len(s)):\n \n if s[i] != t[i]:\n \n c1 = s[i]\n c2 = t[i]\n \n for j in range(len(s)):\n if s[j] == c1:\n s[j] = c2\n elif s[j] == c2:\n s[j] = c1\n\nif "".join(s) == "".join(t) :\n print("Yes") \nelse :\n print("No")', 's = list(str(input()))\nt = list(str(input()))\n\nsd = {}\ntd = {}\n\nfor k in range(ord(\'a\'),ord(\'z\')+1): \n sd[chr(k)] = 0\n td[chr(k)] = 0\n\nfor i in range(len(s)) :\n if s[i] in sd :\n sd[s[i]] = sd[s[i]] + 1\n\n if t[i] in td :\n td[t[i]] = td[t[i]] + 1\n""" \nfor k in range(ord(\'a\'),ord(\'z\')+1): \n print(str(chr(k)) + ":",end="")\n if chr(k) in sd :\n print(str(sd[chr(k)]) + " ",end="")\n else:\n print("0 ",end="")\nprint()\nfor k in range(ord(\'a\'),ord(\'z\')+1): \n print(str(chr(k)) + ":",end="")\n if chr(k) in td :\n print(str(td[chr(k)]) + " ",end="")\n else:\n print("0 ",end="")\nprint() """\n\nta = []\nsa = []\nfor k in range(ord(\'a\'),ord(\'z\')+1):\n if td[chr(k)] != sd[chr(k)] : \n if td[chr(k)] > 0 :\n ta.append(td[chr(k)])\n if sd[chr(k)] > 0 : \n sa.append(sd[chr(k)])\n#print(ta)\n#print(sa)\n\nta.sort()\nsa.sort()\n\nif ta == sa :\n print("Yes")\nelse :\n print("No")', 'l = list(map(int,input().split()))\nl.sort(reverse=True)\nprint(l[0]*10+l[1]+l[2])']
['Runtime Error', 'Runtime Error', 'Accepted']
['s307912044', 's742057029', 's050137767']
[3064.0, 3064.0, 2940.0]
[17.0, 18.0, 18.0]
[372, 972, 80]
p03250
u071916806
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['A,B,C=input().split()\n\na=int(A)\nb=int(B)\nc=int(C)\n\nif a>=b:\n if a>=c:\n x=a\n if b>=c:\n y=b\n z=c\n else:\n y=c\n z=b\n else:\n x=c\n y=a\n z=b\nelse:\n if b>=c:\n x=b\n if a>=c:\n y=a\n z=c\n else:\n y=c\n z=a\n else:\n x=c\n y=b\n z=a\n\nn==x*100+y*10+z\nprint(n)', 'A,B,C=input().split()\n\na=int(A)\nb=int(B)\nc=int(C)\n\nif a>=b:\n if a>=c:\n x=a\n if b>=c:\n y=b\n z=c\n else:\n y=c\n z=b\n else:\n x=c\n y=a\n z=b\nelse:\n if b>=c:\n x=b\n if a>=c:\n y=a\n z=c\n else:\n y=c\n z=a\n else:\n x=c\n y=b\n z=a\n\nn=x*10+y+z\nprint(n)']
['Runtime Error', 'Accepted']
['s199043241', 's044594651']
[2940.0, 3064.0]
[17.0, 17.0]
[347, 334]
p03250
u072717685
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['A,B,C = map(int, input().split())\nr = max(A,B,C)*10 + B +C\nprint(int(r))', 'A,B,C = map(int, input().split())\nr = max(A,B,C)*10 + B +C\nprint(r)', 'A,B,C = map(int, input().split())\nr = max(A,B,C)*9 + sum(A, B, C)\nprint(int(r))', 'A,B,C = map(int, input().split())\nr = max(A,B,C)*9 + A+B+C\nprint(int(r))']
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s255994992', 's507591953', 's840896000', 's422445155']
[3316.0, 2940.0, 2940.0, 2940.0]
[21.0, 17.0, 17.0, 17.0]
[72, 67, 79, 72]
p03250
u078349616
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['A, B, C = map(int, input().split())\nif 10 * A + B < 10 * C + B:\n print(10 * C + B)\nelse:\n print(10 * A + B)', 'A, B, C = map(int, input().split())\nif 10 * A + B < 10 * C + B:\n print(10 * B + C)\nelse:\n print(10 * A + B)', 'A, B, C = sorted(map(int, input().split()))\nprint(10 * C + A + B)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s275113959', 's350189106', 's522300401']
[2940.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0]
[109, 109, 65]
p03250
u079022116
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['a=list(input().split())\na=sorted(a)\nprint(int(a[2])+int(a[0]+a[1]))', 'a,b,c=map(int,input().split())\nprint(a+int(b+c))', 'a=list(input().split()))\na=sorted(a)\nprint(int(a[2])+int(a[0]+a[1])))', 'a=list(input().split())\na=sorted(a)\nprint(int(a[2])+int(a[0]+a[1])))', 'a=list(input().split())\na=sorted(a)\nprint(int(a[0])+int(a[2]+a[1]))']
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s454213952', 's783021442', 's857114633', 's976528952', 's188968213']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 18.0, 19.0, 17.0, 18.0]
[67, 48, 69, 68, 67]
p03250
u088974156
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['a,b,c = sorted (map(int,input().split())\nprint(10*c+b+a)', 'print(eval(\'+\'.join(sorted(input()))+"*10"))']
['Runtime Error', 'Accepted']
['s531493441', 's874552213']
[2940.0, 2940.0]
[17.0, 18.0]
[56, 44]
p03250
u089142196
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['def main():\n\tl = map(int, input().split())\n\tA=l[0]\n\tB=l[1]\n\tC=l[2]\n\n\tl_max=max(A,B,C)\n\tl_min=min(A,B,C)\n\tl_mid=(A+B+C)-(l_max+l_min)\n\n\tans=10*l_max+l_mid+l_min\n\tprint(ans)\n \nmain()', 'def main():\n\tA, B, C = [int(_) for _ in input().split()]\n\n\tl_max=max(A,B,C)\n\tl_min=min(A,B,C)\n\tl_mid=(A+B+C)-(l_max+l_min)\n\n\tans=10*l_max+l_mid+l_min\n\tprint(ans)\n \nmain()']
['Runtime Error', 'Accepted']
['s131382854', 's645309314']
[3060.0, 2940.0]
[17.0, 17.0]
[183, 173]
p03250
u093033848
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['n, m, X, Y = map(int, input().split())\nx = [int(i) for i in input().split()]\ny = [int(i) for i in input().split()]\n\nx.append(X)\ny.append(Y)\n\nif max(x) < min(y):\n print("No War")\nelse :\n print("War")', 'a, b, c = map(int, input().split())\narray = [a, b, c]\narray.sort()\nprint(array[-1] * 10 + array[0] + array[1])']
['Runtime Error', 'Accepted']
['s240378555', 's370159109']
[3060.0, 2940.0]
[17.0, 18.0]
[204, 110]
p03250
u095021077
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['x=list(map(int, input().split()))\nprint(max(x[0]*10+x[1], x[1]*10+x[2]))', 'x=list(map(int, input().split()))\nprint(max(x[0]*10+x[1]+x[2], x[0]+x[1]*10+x[2], x[0]+x[1]+x[2]*10))']
['Wrong Answer', 'Accepted']
['s804325380', 's264373050']
[2940.0, 3060.0]
[17.0, 17.0]
[72, 101]
p03250
u098420017
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['a=list(map(int,input().split()))\nsorted(a)\nprint(10*a[2]+a[1]+a[0])', 'a=list(map(int,input().split()))\na=sorted(a)\nprint(10*a[2]+a[1]+a[0])']
['Wrong Answer', 'Accepted']
['s740167985', 's382602429']
[2940.0, 2940.0]
[17.0, 17.0]
[67, 69]
p03250
u099918199
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['def factorial(n):\n\tfact = 1\n\twhile n > 0:\n\t\tfact *= n\n\t\tn -= 1\n\treturn fact\n\t\ndef combination(n, r):\n return factorial(n) // (factorial(n - r) * factorial(r))\n\nn, m = map(int, input().split())\nn_def = n\nnatural = list(range(2,320))\nindex = 0\nwhile index < len(natural):\n\tfor number in natural:\n\t\tif number % natural[index] == 0 and number / natural[index] != 1:\n\t\t\tnatural.remove(number)\n\tindex += 1\nprime = natural\n\nprime_division = {}\nindex = 0\nnumber_prime = 0\nwhile prime[index] <= m:\n\tif m % prime[index] == 0:\n\t\tm /= prime[index]\n\t\tnumber_prime += 1\n\t\tcontinue\t\t\n\telse:\n\t\tprime_division[prime[index]] = number_prime\n\t\tnumber_prime = 0\n\t\tindex += 1\nelse:\n\tprime_division[prime[index]] = number_prime\n\nlist_division = list(prime_division.values())\nans = 1\nfor i in list_division:\n\tans *= combination(i+n-1,n-1)\nprint(int(ans%(10**9 + 7)))', 'a,b,c = map(int, input().split())\nprint(9*max(a,b,c) + a+b+c)']
['Runtime Error', 'Accepted']
['s430215846', 's798057141']
[3064.0, 2940.0]
[17.0, 17.0]
[845, 61]
p03250
u102461423
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['ABC = [int(x) for x in input().split()]\nABC.sort()\nanswer = ABC[0]*10 + sum(ABC[1:])\nprint(answer)', 'ABC = [int(x) for x in input().split()]\nABC.sort()\nanswer = ABC[-1]*10 + sum(ABC[:2])\nprint(answer)']
['Wrong Answer', 'Accepted']
['s661636526', 's296100257']
[2940.0, 2940.0]
[17.0, 17.0]
[98, 99]
p03250
u102960641
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['n = list(map(int,input().split())).sort()\nprint(n[2]*10+n[1]+n[0])\n', 'n = list(map(int,input(),split()))\nn.sort()\nn.reverse()\nprint(n[0]*10+n[1]+n[2])', 's = input()\nt = input()\nfor i in range(len(s)-2):\n if (s[i] == s[i+1]) != (t[i] == t[i+1]):\n print("No")\n exit()\nprint("Yes")', 'def factorize(n):\n fct = [] \n b, e = 2, 0 \n while b * b <= n:\n while n % b == 0:\n n = n // b\n e = e + 1\n if e > 0:\n fct.append((b, e))\n b, e = b + 1, 0\n if n > 1:\n fct.append((n, 1))\n return fct\n\n \ndef cmb(n, r, mod):\n if ( r<0 or r>n ):\n return 0\n r = min(r, n-r)\n return g1[n] * g2[r] * g2[n-r] % mod\n \n \nN,M = map(int, input().split())\nm_factorized = factorize(M)\nmod = 10 ** 9 + 7\ng1 = [1, 1] \ng2 = [1, 1] \ninverse = [0, 1] 計算用テーブル\nans = 1\nfor i in range( 2, 2**N + 1 ):\n g1.append( ( g1[-1] * i ) % mod )\n inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )\n g2.append( (g2[-1] * inverse[-1]) % mod )\n \n \nfor i in m_factorized:\n k = i[1] \n ans *= cmb(N-1+k,k,mod)\n ans %= mod\nprint(ans)\n ', 'n = list(map(int,input().split()))\nn.sort()\nprint(n[2]*10+n[1]+n[0])\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s047093019', 's130241992', 's136493616', 's868697103', 's640803259']
[2940.0, 2940.0, 3060.0, 3064.0, 2940.0]
[17.0, 17.0, 19.0, 18.0, 17.0]
[67, 80, 132, 907, 69]
p03250
u103902792
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['l = list(map(int,input().split())).sort\nprint(l[2]*10 + l[1] + l[0])', 'a = list(map(int,input().split()))\n\nprint(max(a)*9 + sum(a))']
['Runtime Error', 'Accepted']
['s255537529', 's682896164']
[2940.0, 2940.0]
[17.0, 17.0]
[68, 60]
p03250
u106103668
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['a=list(map(int,input().split()))\na.sort()\nprint(a[0]*10+a[1]+a[2])', 'a=list(map(int,input().split()))\na.sort()\nprint(a[2]*10+a[1]+a[0])']
['Wrong Answer', 'Accepted']
['s598142880', 's019037620']
[3064.0, 2940.0]
[17.0, 17.0]
[66, 66]
p03250
u109632368
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
[',b,c = map(int, input().split())\n\nans = []\n\nans.append(10*a+b+c)\nans.append(10*b+a+c)\nans.append(10*c+b+a)\n\nprint(max(ans))', 'a,b,c = map(int, input().split())\n\nans = []\n\nans.append(10*a+b+c)\nans.append(10*b+c+a)\nans.append(10*c+a+b)\n\nprint(max(ans))']
['Runtime Error', 'Accepted']
['s704338318', 's808840661']
[2940.0, 2940.0]
[17.0, 17.0]
[123, 124]
p03250
u112567325
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['A,B,C = list(map(int,input()))\nif A >= B and B >= C:\n print(A*10 + B+C)\nelif B >= C and C >=A:\n print(B*10 + C+A)\nelif C >= A and A >= B:\n print(C*10 + A+B)', 'A,B,C = list(map(int,input().split()))\nif A >= B and B >= C:\n print(A*10 + B+C)\nelif B >= C and C >=A:\n print(B*10 + C+A)\nelif C >= A and A >= B:\n print(C*10 + A+B)\nelif A >= B and C >= B:\n print(A*10 + B+C)\nelif B >= A and A >= C:\n print(B*10 + A+C)\nelif C >= A and B >= A:\n print(C*10 + A+B)']
['Runtime Error', 'Accepted']
['s178843591', 's776887491']
[3060.0, 3060.0]
[17.0, 17.0]
[159, 299]
p03250
u113003638
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['a,b,c = sorted(map(int,input().split()))\nprint(10*c+b+c)', 'a,b,c = sorted(map(int,input().split()))\nprint(10*c+b+a)']
['Wrong Answer', 'Accepted']
['s105160506', 's045126624']
[2940.0, 2940.0]
[17.0, 17.0]
[56, 56]
p03250
u115877451
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['a=list(map(int,input().split()))\nsorted(a)\nprint(a[0]+a[1]*a[2])\n', 'a=list(map(int,input().split()))\na=sorted(a)\nprint(a[-1]*10+a[1]+a[0])']
['Wrong Answer', 'Accepted']
['s545975395', 's433353636']
[2940.0, 2940.0]
[17.0, 17.0]
[65, 70]
p03250
u119578112
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['A = int(input())\nB = int(input())\nC = int(input())\na = 10*A + B\nb = 10*B + C\nprint(max([a+C ,A+b]))', 'A = int(input())\nB = int(input())\nC = int(input())\na = 10*A + B\nb = 10*B + C\nc = 10*C + A\nd = 10*A + C\ne = 10*B + A\nf = 10*C +B\nprint(max([a+C ,b+A, c+B, d+B, e+C, f+A]))\n', 'suuji = list(map(int, input().split()))\nsaidai = max(suuji)\nsuuji.remove(saidai)\nprint(saidai*10+suuji[0]+suuji[1])\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s013776063', 's442492157', 's919005008']
[2940.0, 3060.0, 2940.0]
[17.0, 17.0, 17.0]
[99, 171, 116]
p03250
u122195031
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['a,b,c = map(int,input().split())\nprint(max(10*a+b,10*b+c))', 'a,b,c = map(int,input().split())\nprint(max((10*a+b)+c,a+(10*b+c),10*c+a+b))']
['Wrong Answer', 'Accepted']
['s373597619', 's602113472']
[2940.0, 2940.0]
[17.0, 18.0]
[58, 75]
p03250
u129074747
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['N, M = map(int, input().split())\n\nmod = 1000000007\n\nf = [] \n\nfor p in range(2, M): \n e = 0\n while M%p == 0:\n e += 1\n M /= p\n \n if e>0:\n f.append(e)\n \n if M == 1:\n break\n\ndef pw(a, e):\n if e == 1:\n return a\n p = pw(a, e // 2)\n if e%2 == 1:\n return p * p % mod * a % mod\n else:\n return p * p % mod\n\n\nfact = [1] * 100033\ninv = [1] * 100033\nfor k in range(1, 100033):\n fact[k] = fact[k-1] * k % mod\n inv[k] = pw(fact[k], mod-2)\n\ndef combine(n, k):\n return fact[n] * inv[k] % mod * inv[n-k] % mod\n\nans = 1\nfor e in f:\n ans *= combine(e+N-1, e) \n ans %= mod\n\nprint(ans)\n', 'N, M = map(int, input().split())\n\nmod = 1000000007\n\nf = [] \n\nfor p in range(2, M): \n e = 0\n while M%p == 0:\n e += 1\n M /= p\n \n if e>0:\n f.append(e)\n \n if M == 1:\n break\n\ndef pw(a, e):\n if e == 1:\n return a\n p = pw(a, e // 2)\n if e%2 == 1:\n return p * p % mod a % mod\n else:\n return p * p % mod\n\n\nfact = [1] * 100040\ninv = [1] * 100040\nfor k in range(1, 100040):\n fact[k] = fact[k-1] * k % mod\n inv[k] = pw(fact[k], mod-2)\n\nans = 1\nfor e in f:\n ans = ans * fact[e+N-1] % mod * inv[e] % mod * inv[N-1] % mod \n\nprint(ans)\n', 'N, M = map(int, input().split())\n\nmod = 1000000007\n\nf = [] \n\nfor p in range(2, M): \n e = 0\n while M%p == 0:\n e += 1\n M /= p\n \n if e>0:\n f.append(e)\n \n if M == 1:\n break\n\ndef pw(a, e):\n if e == 1:\n return a\n p = pw(a, e // 2)\n if e%2 == 1:\n return p * p * a % mod\n else:\n return p * p % mod\n\n\nfact = [1] * 100040\ninv = [1] * 100040\nfor k in range(1, 100040):\n fact[k] = fact[k-1] * k % mod\n inv[k] = pw(fact[k], mod-2)\n\nans = 1\nfor e in f:\n ans *= fact[e+N-1] * inv[e] * inv[N-1] % mod \n\nprint(ans)\n', 'from collections import Counter\n\nmod = 1000000007\n\n\n\ndef prime(n):\n d = Counter()\n i = 2\n while n != 1:\n while n%i == 0:\n n //= i\n d[i] += 1\n i += 1\n return d\n\n\ndef mod_pow(x, n):\n if n == 0:\n return 1\n elif n % 2 == 0:\n half_x = mod_pow(x, n // 2)\n return half_x * half_x % mod\n else:\n return x * mod_pow(x, n-1) % mod\n\nfact = [0] * 100099\ninv = [0] * 100099\nfact[0] = 1\ninv[0] = 1\nfor k in range(1, 100099):\n fact[k] = fact[k-1] * k % mod\n inv[k] = mod_pow(fact[k], mod-2)\n\ndef nCr(n, r):\n return fact[n] * inv[r] % mod * inv[n-r] % mod\n\ndef solve():\n N, M = map(int, input().split())\n p = prime(M)\n s = 1\n for i in p.values():\n s *= nCr(i + N - 1, N - 1)\n s %= mod\n print(s)\n\nsolve()', 'N, M = map(int, input().split())\n\nmod = 1000000007\n\nf = [] \n\nfor p in range(2, M): \n e = 0\n while M%p == 0:\n e += 1\n M /= p\n \n if e>0:\n f.append(e)\n \n if M == 1:\n break\n\ndef pw(a, e):\n if e == 1:\n return a\n p = pw(a, e // 2)\n if e%2 == 1:\n return p * p % mod * a % mod\n else:\n return p * p % mod\n\n\nfact = [1] * 100033\ninv = [1] * 100033\nfor k in range(1, 100033):\n fact[k] = fact[k-1] * k % mod\n inv[k] = pw(fact[k], mod-2))\n\ndef combine(n, k):\n return fact[n] * inv[k] % mod * inv[n-k] % mod\n\nans = 1\nfor e in f:\n ans *= combine(e+N-1, e) \n ans %= mod\n\nprint(ans)\n', 'A, B, C = map(int, input().split())\n\ndef ans1(): \n return max([\n 10*A + B + C, # 10*A + C + B, \n 10*B + A + C, # 10*B + C + A, \n 10*C + A + B, # 10*C + B + A, \n ])\n\ndef ans2():\n return A + B + C + 9*max([A, B, C])\n\n#print(ans1())\nprint(ans2())']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s147691046', 's340357805', 's405563532', 's435908141', 's769989955', 's453524336']
[3064.0, 3064.0, 3064.0, 11312.0, 3064.0, 3316.0]
[17.0, 17.0, 18.0, 1543.0, 17.0, 21.0]
[755, 704, 683, 855, 756, 311]
p03250
u129315407
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['s = list(map(int, input().split()))\ns.sort()\nprint((s[2] * 10 + s[1]) + s[1])\n', 's = list(map(int, input().split()))\ns.sort()\nprint((s[2] * 10 + s[1]) + s[0])\n']
['Wrong Answer', 'Accepted']
['s503246570', 's043643615']
[2940.0, 2940.0]
[18.0, 18.0]
[78, 78]
p03250
u129978636
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
["N, M, X, Y =map( int, input()split())\nx = list(map( int, input().split()))\ny = list(map( int, input().split()))\n \nx = sorted(x)\ny = sorted(y)\n \nfor i in range(X + 1, Y + 1):\n if( x[N-1] < i <= y[0]):\n print('No War')\n exit()\n \n else:\n print('War')\n break", 'N = list(map( int, input().splot()))\n\nN = sorted(N)\n\nNmax = int(N[2] * 10 + N[1] + N[0])\n\nprint(int(Nmax))', "N, M, X, Y =map( int, input().split())\nx = list(map( int, input().split()))\ny = list(map( int, input().split()))\n \nx = sorted(x)\ny = sorted(y)\n \nfor i in range(X + 1, Y + 1):\n if( x[N-1] < i <= y[0]):\n print('No War')\n exit()\n \nprint('War')", 'N = list(map( int, input().split()))\n\nN = sorted(N)\n\nNmax = int( N[2] * 10 + N[1] + N[0])\n\nprint(int(Nmax))']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s210477438', 's529532316', 's542657885', 's042315285']
[2940.0, 2940.0, 3064.0, 2940.0]
[18.0, 17.0, 20.0, 17.0]
[271, 106, 250, 107]
p03250
u131406572
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['a,b,c=map(int,input().split())\ns=[]\ns.append(a)\ns.append(b)\ns.append(c)\ns.sort\nprint(s[2]*10+s[1]+s[0])', 'a,b,c=map(int,input().split())\ns=[]\ns.append(a)\ns.append(b)\ns.append(c)\ns.sort()\n#print(s)\nprint(s[2]*10+s[1]+s[0])']
['Wrong Answer', 'Accepted']
['s676909620', 's436405589']
[3060.0, 3060.0]
[17.0, 17.0]
[103, 115]
p03250
u131625544
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['A, B, C = map(int, input().split())\nprint(sum([A, B, C]) - min([A, B, C]))', 'l = map(int, input().split())\nl.sort()\n\nprint(l[2] * 10 + sum(l[:2]))', 'A, B, C = map(int, input().split())\nprint(sum(A, B, C) - min(A, B, C))', 'l = list(map(int, input().split()))\nl.sort()\n\nprint(l[2] * 10 + sum(l[:2]))']
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s520427094', 's587705264', 's601216130', 's525057518']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[74, 69, 70, 75]
p03250
u135389999
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['a = list(map(int,input()))\n\nprint(max(a) * 9 + sum(a))\n', 'a = list(map(int,input().split()))\n \nprint(max(a) * 9 + sum(a))']
['Runtime Error', 'Accepted']
['s825916051', 's915108273']
[2940.0, 2940.0]
[17.0, 17.0]
[55, 63]
p03250
u136811344
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['s = [int x for x in input().split()]\nmax_int = s.pop(s.index(max(s)))\nprint(max_int * 10 + sum(s))', 's = [int(x) for x in input().split()]\nmax_int = s.pop(s.index(max(s)))\nprint(max_int * 10 + sum(s))']
['Runtime Error', 'Accepted']
['s193607605', 's924208880']
[2940.0, 2940.0]
[17.0, 17.0]
[98, 99]
p03250
u138486156
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['a = list(map(int, input().split()))\nd = max(a)\na.remove(d)\nans(d*10+sum(a))', 'a = map(int, input().split())\nd = max(a)\na.remove(d)\nans(d*10+sum(a))\n\n', 's = input()\nt = input()\ndict_s = ["_"]*26\ndict_t = ["_"]*26\nalphabet = [chr(i) for i in range(97, 97 + 26)]\nprint(alphabet)\nfor i in range(len(s)):\n if dict_s[alphabet.index(s[i])] == "_":\n dict_s[alphabet.index(s[i])] = t[i]\n elif dict_s[alphabet.index(s[i])] != t[i]:\n print("No")\n exit()\n if dict_t[alphabet.index(t[i])] == "_":\n dict_t[alphabet.index(t[i])] = s[i]\n elif dict_t[alphabet.index(t[i])] != s[i]:\n print("No")\n exit()\nprint("Yes")\n', 'a = list(map(int, input().split()))\nd = max(a)\na.remove(d)\nprint(d*10+sum(a))\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s045203578', 's821516852', 's892453749', 's441478183']
[2940.0, 2940.0, 3064.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[75, 71, 517, 78]
p03250
u139235669
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['panels = input().split()\npanels = [int(panel) for panel in panels]\npanels = sorted(panels,reverse=True)\n\nprint(panels)\n\nprint(panels[0]*10+panels[1]+panels[2])', 'panels = input().split()\npanels = [int(panel) for panel in panels]\npanels = sorted(panels,reverse=True)\n\nprint(panels[0]*10+panels[1]+panels[2])']
['Wrong Answer', 'Accepted']
['s111404699', 's671856863']
[2940.0, 2940.0]
[17.0, 17.0]
[159, 144]
p03250
u139880922
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['l = list(map(int,input().split()))\nl.sort\nprint(l[2]*10 + l[1] + l[0])', 'l = list(map(int,input().split()))\nl.sort()\nprint(l[2]*10 + l[1] + l[0])']
['Wrong Answer', 'Accepted']
['s616641928', 's939533555']
[2940.0, 2940.0]
[17.0, 17.0]
[70, 72]
p03250
u141410514
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['l = list(map(int,input().split()))\nl.sort()\nprint(l[0]*10+l[1]+l[2])', 'l = list(map(int,input().split()))\nl.sort()\nprint(l[2]*10+l[1]+l[0])']
['Wrong Answer', 'Accepted']
['s360414930', 's856183046']
[2940.0, 2940.0]
[17.0, 17.0]
[68, 68]
p03250
u143492911
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['a,b,c=map(int,input().split())\nans=[]\nans.append(a)\nans.append(b)\nans.append(c)\nans.sort(reverse=True)\ntemp=""\ntemp+=ans[0]\ntemp+=ans[1]\nprint(int(temp)+ans[2])\n', 'a,b,c=map(int,input().split())\nans=[]\nans.append(a)\nans.append(b)\nans.append(c)\nans.sort(reverse=True)\ntemp=""\ntemp+=str(ans[0])\ntemp+=str(ans[1])\nprint(int(temp)+ans[2])\n']
['Runtime Error', 'Accepted']
['s317614710', 's737697623']
[2940.0, 3060.0]
[17.0, 17.0]
[161, 171]
p03250
u144980750
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['a=int(input().split())\na.sort()\nprint(a[2]*10+a[1]+a[0])', 'a=list(map(int,input().split()))\na.sort()\nprint(a[2]*10+a[1]+a[0])']
['Runtime Error', 'Accepted']
['s320170540', 's382905962']
[2940.0, 2940.0]
[17.0, 17.0]
[56, 66]
p03250
u145600939
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['abc = list(map(int,input()))\nabc.sort()\nabc[2] *= 10\nprint(sum(abc))', 'abc = list(map(int,input().split()))\nabc.sort()\nabc[2] *= 10\nprint(sum(abc))\n']
['Runtime Error', 'Accepted']
['s487787692', 's984369962']
[3064.0, 2940.0]
[17.0, 17.0]
[68, 77]
p03250
u152638361
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['A =list(map(int, input().split()))\nA.sort()\nprint(A)\nprint(A[2]*10+A[1]+A[0])', 'A =list(map(int, input().split()))\nA.sort()\nprint(A[2]*10+A[1]+A[0])']
['Wrong Answer', 'Accepted']
['s654775945', 's759511240']
[2940.0, 2940.0]
[17.0, 17.0]
[77, 68]
p03250
u153419200
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['a,b,c=map(int,input().split())\nprint(max(a,b,c)*10 + sorted(nums)[-2] + min(a,b,c))', 'a,b,c=map(int,input().split())\nprint(a+b+c+max(a,b,c)*9)']
['Runtime Error', 'Accepted']
['s119042217', 's614497348']
[2940.0, 2940.0]
[17.0, 17.0]
[83, 56]
p03250
u155687575
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
["lst = list(map(int, input().split()))\nans = 0\n\nmax_ = -1\nargmax = None\nfor i in range(3):\n if lst[i] > max_:\n max_ = lst[i]\n argmax = i\n\nlst.pop(i)\nans = int(str(max_) + '0')\nfor l in lst:\n ans += l\nprint(ans)", 'A = list(map(int, input().split()))\nA.sort()\nprint(A[2]*10 + A[0] + A[1])']
['Wrong Answer', 'Accepted']
['s518280718', 's135250392']
[3064.0, 2940.0]
[17.0, 17.0]
[229, 73]
p03250
u157232135
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['n,m,X,Y=sorted(map(int,input().split()))\nx=max([X],max(map(int,input().split())))\ny=min([Y],min(map(int,input().split())))\nprint("No War" if x<y else "War")', 'def main():\n a=sorted(map(int,input().split()))\n print(a[2]*10+a[0]+a[1])\n \nif __name__ == "__main__":\n main()']
['Runtime Error', 'Accepted']
['s834939624', 's297836050']
[8992.0, 9136.0]
[24.0, 31.0]
[156, 122]
p03250
u159335277
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['a, b, c = list(map(int, input().split()))\n\nprint(10 * max([a, b, c]) + sum([a, b, c]))', 'a, b, c = list(map(int, input().split()))\n\nprint(10 * max([a, b, c]) + sum([a, b, c]) - max([a, b, c]))\n']
['Wrong Answer', 'Accepted']
['s794590860', 's261545100']
[2940.0, 2940.0]
[17.0, 18.0]
[86, 104]
p03250
u160659351
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['li = list(map(int,input().rstrip().split()))\n\n\nprint(li[2]*10 + li[1] + li[0])', '#110 Maximize the Formula\n\nli = list(map(int, input().rstrip().split()))\nli.sort()\n\nprint(li[2]*10 + li[1] + li[0])']
['Wrong Answer', 'Accepted']
['s778689237', 's268385542']
[2940.0, 2940.0]
[17.0, 18.0]
[78, 115]
p03250
u162911959
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['read = sys.stdin.read\nreadline = sys.stdin.readline\nreadlines = sys.stdin.readlines\nsys.setrecursionlimit(10 ** 7)\n\na,b,c = sorted(map(int,readline().split()))\nprint (10 * c + b + a)', 'import sys\nread = sys.stdin.read\nreadline = sys.stdin.readline\nreadlines = sys.stdin.readlines\nsys.setrecursionlimit(10 ** 7)\n \na,b,c = sorted(map(int,readline().split()))\nprint (10 * c + b + a)\n']
['Runtime Error', 'Accepted']
['s212276959', 's259937856']
[2940.0, 2940.0]
[17.0, 17.0]
[183, 196]
p03250
u163320134
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['a,b,c=map(int,input().split())\narr=[a,b,c]\narr=sorted(a,b,c)\nprint(10*arr[-1]+arr[1]+arr[0])', 'a,b,c=map(int,input().split())\narr=[a,b,c]\narr=sorted(arr)\nprint(10*arr[-1]+arr[1]+arr[0])']
['Runtime Error', 'Accepted']
['s620331306', 's809657222']
[2940.0, 2940.0]
[24.0, 17.0]
[92, 90]
p03250
u163449343
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['n = list(map(int, input().split()))\nn = n.sort()\nprint(n[2]* 10 + n[1] + n[0])', 'n = list(map(int, input().split()))\nn.sort()\nprint(n[2]* 10 + n[1] + n[0])']
['Runtime Error', 'Accepted']
['s593834549', 's339341573']
[3316.0, 2940.0]
[20.0, 17.0]
[78, 74]
p03250
u163543660
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['num = list(map(int, input().split()))\nnum.sort(reverse=True)\na = str(num[0])\nb = str(num[1])\nc = int(num[2])\nab = a + b\nab = int("ab")\nprint(ab + c)', 'num = list(map(int, input().split()))\nnum.sort(reverse=True)\na = str(num[0])\nb = str(num[1])\nc = int(num[2])\nab = a + b\nab = int(ab)\nprint(ab + c)']
['Runtime Error', 'Accepted']
['s901440406', 's694323626']
[3060.0, 3064.0]
[17.0, 17.0]
[148, 146]
p03250
u165268875
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['\nA, B, C = sorted(map(int, input().split()))\nprint(10*C + B + C)\n', '\nA, B, C = sorted(map(int, input().split()))\nprint(10*C + B + A)\n']
['Wrong Answer', 'Accepted']
['s224082849', 's431886849']
[2940.0, 2940.0]
[17.0, 17.0]
[65, 65]
p03250
u168416324
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['l=list(map(int,input().split()))\nl.sort(reverse=True)\nans=l[0]*9+sum(l)', 'l=list(map(int,input().split()))\nprint(max(l)*9+sum(l))']
['Wrong Answer', 'Accepted']
['s205571617', 's427827031']
[8832.0, 9100.0]
[24.0, 30.0]
[71, 55]
p03250
u169138653
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['abc=list(map(int,input().split()))\nprint(sum(abc)-min(abc))', 'abc=sorted(list(map(int,input().split())))\nprint(int(str(abc[2])+str(abc[1]))+abc[0])\n']
['Wrong Answer', 'Accepted']
['s089136714', 's342190994']
[2940.0, 2940.0]
[17.0, 17.0]
[59, 86]
p03250
u170324846
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['A = list(map(int, input().split()))\nA.sort()\nprint(int(A[2] + A[1]) + int(A[0]))', 'A = input().split()\nA.sort()\nprint(int(A[2] + A[1]) + int(A[0]))']
['Wrong Answer', 'Accepted']
['s720720913', 's216103189']
[2940.0, 2940.0]
[18.0, 17.0]
[80, 64]
p03250
u178192749
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['l = list(map(int,input().split()))\nl.sort()\nprint(sum(l[:2])+l[2]*100)', 'l = list(map(int,input().split()))\nl.sort()\nprint(sum(l[:2])+l[2]*10)\n']
['Wrong Answer', 'Accepted']
['s700160055', 's987417578']
[2940.0, 2940.0]
[18.0, 17.0]
[70, 70]
p03250
u178963077
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['ns = input().split()\n\ndef bSort(a):\n for i in range(len(a)):\n for j in range(len(a)-1, i, -1):\n if a[j] < a[j-1]:\n a[j], a[j-1] = a[j-1], a[j]\n\n return a', 'def bSort(a):\n for i in range(len(a)):\n for j in range(len(a)-1, i, -1):\n if a[j] < a[j-1]:\n a[j], a[j-1] = a[j-1], a[j]\n\n return a\n\nns = input().split()\ns = bSort(ns)\nprint(int(s[2]) * 10 + int(s[1]) + int(s[0]))']
['Wrong Answer', 'Accepted']
['s771356713', 's090273847']
[3060.0, 3060.0]
[17.0, 18.0]
[192, 252]
p03250
u181195295
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['A,B,C = sorted(map(int, input().split()))\nprint(C*10+B+C)', 'A,B,C = sorted(map(int, input().split()))\nprint(C*10+B+A)\n']
['Wrong Answer', 'Accepted']
['s345632762', 's984620053']
[2940.0, 2940.0]
[18.0, 17.0]
[57, 58]
p03250
u181937133
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['import numpy as np,math,itertools\n\na=[int(i) for i in input()]\nb=a[1]\nc=a[2]\nd=a[0]\nprint(max([10*d+b+c,d+10*b+c]))', 'import numpy as np,math,itertools\n\na,b,c=map(int,input().split())\n\nprint(max([10*a+b+c,a+10*b+c,a+b+10*c]))']
['Runtime Error', 'Accepted']
['s583061344', 's014635651']
[22144.0, 12388.0]
[1342.0, 149.0]
[115, 107]
p03250
u184339976
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['s=sorted(list(map(int,input().input())))[::-1]\nprint(s[0]*10+s[1]+s[2])\n', 's=sorted(list(map(int,input().split())))[::-1]\nprint(s[0]*10+s[1]+s[2])\n']
['Runtime Error', 'Accepted']
['s661555769', 's149541913']
[3064.0, 2940.0]
[18.0, 17.0]
[72, 72]
p03250
u187233527
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['a, b, c = sorted(map(int, input()))\nprint(a + b + c * 10)', 'a, b, c = sorted(map(int, input().split()))\nprint(a + b + c * 10)']
['Runtime Error', 'Accepted']
['s843067212', 's788025238']
[2940.0, 2940.0]
[17.0, 17.0]
[57, 65]
p03250
u201082459
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['l = [int(i) for i in input().split()]\nl.sort()\nprint(l[0] * 10 + l[1] + l[2])', 'l = [int(i) for i in input().split()]\nl.sort(reverse=True)\nprint(l[0] * 10 + l[1] + l[2])']
['Wrong Answer', 'Accepted']
['s095257712', 's802152834']
[2940.0, 2940.0]
[17.0, 17.0]
[77, 89]
p03250
u203995947
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['abc = list(map(int,input().split(" "))\nm = max(abc)\ns = sum(abc)\nans = s-m+(m*10)\nprint(ans)', 'abc =list(map(int,input().split(" "))) \nm = max(abc)\ns = sum(abc)\nans = s-m+(m*10)\nprint(ans)']
['Runtime Error', 'Accepted']
['s123175571', 's267741569']
[2940.0, 2940.0]
[19.0, 17.0]
[92, 93]
p03250
u207464563
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['A,B,C = map(int,input().split()\nmax(10*A + B + C,A+10*B+C,A+B+10*C)', 'A,B,C = map(int,input().split())\nmax(10 * A + B + C, A + 10*B + C,\u3000A + B + 10 * C)', 'A,B,C = map(int,input().split())\nans = max(10*A + B + C, A+ 10*B + C, A + B + 10*C)\nprint(ans)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s199358653', 's955326033', 's163546806']
[2940.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0]
[67, 84, 94]
p03250
u209620426
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['l = [int(input()) for i in range(3)]\nl.sort()\nprint(l[2]*10 + l[0] + l[1])', 'l = [int(i) for i in input().split()]\nl.sort()\nprint(l[2]*10 + l[0] + l[1])']
['Runtime Error', 'Accepted']
['s783913550', 's446482586']
[2940.0, 2940.0]
[17.0, 17.0]
[74, 75]
p03250
u213854484
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['A,B,C = map(int, input().split())\nL = sorted([A,B,C])\nprint(10*L[0]+L[1]+L[2])', 'A,B,C = map(int,input().split())\nL = sorted[A,B,C]\nprint(10*L[1]+L[2]+L[3])', 'A,B,C = map(int, input(),split())\nL = sorted([A,B,C])\nprint(10*L[0]+L[1]+L[2])', 'A,B,C = map(int, input().split())\nL = sorted([A,B,C])\nprint(10*L[2]+L[1]+L[0])']
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s180700391', 's478865404', 's667255438', 's084897694']
[2940.0, 2940.0, 2940.0, 2940.0]
[18.0, 18.0, 18.0, 18.0]
[78, 75, 78, 78]
p03250
u214215724
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['num = int(input()),int(input()),int(input())\n\nnum = list(num)\n\nnum.sort()\nnum.reverse()\n\nprint(int(str(num[0]) + str(num[1])) + num[2])\n', 'num = list(input())\n\nnum = num.sort().reverse()\n\nprint(int(num[0] + num[1]) + int(num[2]))\n', 'num = [0,0,0]\nnum[0] = int(input())\nnum[1] = int(input())\nnum[2] = int(input())\n\nnum.sort()\n\nprint(int(str(num[0]) + str(num[1])) + num[2])', 'a = int(input())\nb = int(input())\nc = int(input())\n\n\nif a < b:\n d = b\n another = a\nelse:\n d = a\n another = b\n\nif d < c:\n d2 = str(d)\n d = str(c)\n\nf = d + d2\n\nprint(int(f)+another)', 'num[0] = int(input())\nnum[1] = int(input())\nnum[2] = int(input())\n\nnum.sort()\n\nprint(int(str(num[0]) + str(num[1])) + num[2])', 'num = [0,0,0]\nnum[0] = int(input())\nnum[1] = int(input())\nnum[2] = int(input())\n\nnum.sort().reverse()\n\nprint(int(str(num[0]) + str(num[1])) + num[2])', 'num = [0,0,0]\nnum[0] = int(input())\nnum[1] = int(input())\nnum[2] = int(input())\n\nnum.sort()\nnum.reverse()\n\nprint(int(str(num[0]) + str(num[1])) + num[2])\n', 'num = list(input())\n\nnum.sort().reverse()\n\nprint(int(num[0] + num[1]) + int(num[2]))\n\n\n', 'num = [0,0,0]\nnum[0] = int(input())\nnum[1] = int(input())\nnum[2] = int(input())\n\nnum.sort()\nnum.reverse()\n\nprint(int(str(num[0]) + str(num[1])) + num[2])\n', 'num = [0,0,0]\nnum[0] = int(input())\nnum[1] = int(input())\nnum[2] = int(input())\n\nnum.sorted()\n\nprint(int(str(num[0]) + str(num[1])) + num[2])', 'num = [0,0,0]\nnum[0] = int(input())\nnum[1] = int(input())\nnum[2] = int(input())\n\nnum.reverse()\n\nprint(int(str(num[0]) + str(num[1])) + num[2])', 'num = []\nnum[0] = int(input())\nnum[1] = int(input())\nnum[2] = int(input())\n\nnum.sort()\n\nprint(int(str(num[0]) + str(num[1])) + num[2])', 'a = int(input())\nb = int(input())\nc = int(input())\n\n\nif a < b:\n d = b\n another = a\nelse:\n d = a\n another = b\n\nif d < c:\n d[0] = str(d)\n d[1] = str(c)\n\nf = d[1] + d[0]\n\nprint(int(f)+another)\n', 's = input()\n\nnum = list(s)\n\nnum.sort()\nnum.reverse()\n\nprint(int(num[0] + num[1]) + int(num[2]))\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']
['s095159426', 's190050706', 's206192183', 's285249591', 's361408591', 's467255237', 's478510100', 's556745529', 's585947617', 's865955278', 's881815423', 's917310572', 's978531597', 's348030225']
[2940.0, 2940.0, 3060.0, 3060.0, 3060.0, 3060.0, 3060.0, 2940.0, 3060.0, 2940.0, 3060.0, 2940.0, 3060.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]
[136, 91, 139, 197, 125, 149, 154, 87, 154, 141, 142, 134, 208, 97]
p03250
u218843509
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['a, b, c = map(int, input().split())\n[a, b, c] = sorted([a, b, c])\nprint(10 * a + b + c)', 'a, b, c = map(int, input().split())\n[a, b, c] = sorted([a, b, c], reverse=True)\nprint(10 * a + b + c)']
['Wrong Answer', 'Accepted']
['s376764618', 's475944979']
[3316.0, 2940.0]
[19.0, 17.0]
[87, 101]
p03250
u225053756
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['A = [int(i) for i in input().split()]\nA.sort()\nprint(A[0]*10+A[1] + A[2])', 'A = [int(i) for i in input().split()]\nA.sort()\nprint(A[2]*10+A[1] + A[0])']
['Wrong Answer', 'Accepted']
['s503309276', 's776626784']
[9164.0, 9168.0]
[27.0, 30.0]
[73, 73]
p03250
u225642513
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['n = map(int, input().split())\nn.sort()\nprint(n[2]*10 + n[1] + n[0])', 'n = [int(i) for i in input().split()]\nn.sort()\nprint(n[2]*10 + n[1] + n[0])']
['Runtime Error', 'Accepted']
['s361736536', 's529081330']
[2940.0, 2940.0]
[17.0, 17.0]
[67, 75]
p03250
u226873514
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['a = list(map(int, input().split()))\na.sort()\n\nprint(a[0]*10+a[1]+a[2])', 'a = list(map(int, input().split()))\na.sort()\n\nprint(a[2]*10+a[1]+a[0])\n']
['Wrong Answer', 'Accepted']
['s306320821', 's273807345']
[2940.0, 2940.0]
[17.0, 17.0]
[70, 71]
p03250
u227082700
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['a=list(map(int,input().split));print(sum(a)+max(a)*9)', 'a,b,c=map(int,input().split())\nprint(a+b+c+max(a,b,c)*9)']
['Runtime Error', 'Accepted']
['s610344902', 's646535866']
[2940.0, 2940.0]
[17.0, 17.0]
[53, 56]
p03250
u235210692
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['num=[int(i) for i in input().split()]\n\nnum.sort()\n\nprint(num[1]+num[2])', 'num=[int(i) for i in input().split()]\n\nnum.sort()\n\nprint(num[0]+num[1]+10*num[2])']
['Wrong Answer', 'Accepted']
['s726962680', 's870200537']
[3064.0, 2940.0]
[17.0, 17.0]
[71, 81]
p03250
u236127431
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['A,B,C=map(int,input().split())\nL=sorted([A,B,C])\nprint(int(str(L[0])+str(L[1]))+L[2])', 'A,B,C=map(int,input().split())\nL=sorted([A,B,C])\nprint(int(str(L[2])+str(L[1]))+L[0])\n']
['Wrong Answer', 'Accepted']
['s733628377', 's297795616']
[2940.0, 2940.0]
[18.0, 18.0]
[85, 86]
p03250
u238084414
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['N = list(map(int, input().split()))\n\nprint(int(str(N[2]) + str(N[1])) + N[0])', 'N = list(map(int, input().split()))\n\nprint(sum(N) + max(N) * 9)']
['Wrong Answer', 'Accepted']
['s308472018', 's138356191']
[2940.0, 2940.0]
[17.0, 17.0]
[77, 63]
p03250
u239342230
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
["x=sorted(input())\nprint(int(''.join(x[:-3:-1]))+int(x[0]))", "x=sorted(input().replace(' ',''))\nprint(int(''.join(x[:-3:-1]))+int(x[0]))"]
['Runtime Error', 'Accepted']
['s422050367', 's782216649']
[2940.0, 2940.0]
[18.0, 18.0]
[58, 74]
p03250
u242196904
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['a = list(map(int,input().split()))\n\nprint(np.max(a) * 9 + np.sum(a))', 'import numpy as np\n\na = list(map(int,input().split()))\nprint(np.max(a) * 9 + np.sum(a))']
['Runtime Error', 'Accepted']
['s541269905', 's720822231']
[3316.0, 21904.0]
[20.0, 1616.0]
[68, 87]
p03250
u243159381
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['a=list(map(int,input().split()))\nb=sorted(a)\nprint(b[2]*10+b[1]-b[0])\n', 'a=list(map(int,input().split()))\nb=sorted(a)\nprint(b[2]*10+b[1]+b[0])']
['Wrong Answer', 'Accepted']
['s041375051', 's922550788']
[9136.0, 9068.0]
[27.0, 24.0]
[70, 69]
p03250
u244836567
2,000
1,048,576
You have decided to give an allowance to your child depending on the outcome of the game that he will play now. The game is played as follows: * There are three "integer panels", each with a digit between 1 and 9 (inclusive) printed on it, and one "operator panel" with a `+` printed on it. * The player should construct a formula of the form X + Y, by arranging the four panels from left to right. (The operator panel should not be placed at either end of the formula.) * Then, the amount of the allowance will be equal to the resulting value of the formula. Given the values A, B and C printed on the integer panels used in the game, find the maximum possible amount of the allowance.
['a,b,c=input().split()\na=int(a)\nb=int(b)\nc=int(c)\nls=[a,b,c]\nls.sort()\nprint(ls[2]*10+ls[1]*ls[0])', 'a,b,c=input().split()\na=int(a)\nb=int(b)\nc=int(c)\nls=[a,b,c]\nls.sort()\nprint(ls[2]*10+ls[1]+ls[0])']
['Wrong Answer', 'Accepted']
['s823004735', 's288237557']
[9108.0, 9068.0]
[28.0, 30.0]
[97, 97]