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
p03292
u798316285
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['*a=map(int,input().split())\nprint(max(a)-min(a))', 'a=map(int,input().split())\nprint(max(a)-min(a))', '*a,=map(int,input().split())\nprint(max(a)-min(a))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s506724623', 's755600589', 's303917866']
[2940.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0]
[48, 47, 49]
p03292
u801512570
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
["S = input()\nT = input()\n\nfor i in range(len(S)):\n s=S[-i:]+S[0:-i]\n if s==T:\n print('Yes')\n break\nelse:\n print('No')", 'A = list(map(int, input().split()))\n\nA.sort()\nA.reverse()\n\nprint(abs(A[0]-A[1])+abs(A[1]-A[2]))']
['Runtime Error', 'Accepted']
['s046484017', 's354569910']
[2940.0, 2940.0]
[17.0, 17.0]
[139, 95]
p03292
u804085889
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['array = list(map(int, input().split()))\narray.sort()\nprint(array)\n\ncount=0\nfor i in range(1, len(array)):\n count += array[i] - array[i-1]\nprint(count)\n ', 'n = list(map(int, input().split()))\nn.sort()\nsa = 0\nfor i in range(1, len(n)):\n sa += n[i] - n[i-1]\nprint(sa)']
['Wrong Answer', 'Accepted']
['s697169175', 's662138289']
[2940.0, 2940.0]
[17.0, 17.0]
[158, 112]
p03292
u809690311
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['a = input()\nb = input()\nc = len(a)\na_list = list(a)\nb_list = list(b)\nfor i in range(101):\n tmp = a_list[0]\n for j in range(c-1):\n a_list[j] = a_list[j+1]\n a_list[c-1] = tmp\n if a_list == b_list:\n print("Yes")\n exit()\nprint("No")\n', 'a,b,c = map(int, input().split())\nd = abs(a-b)\ne = abs(a-c)\ng = abs(b-c)\nif d >= e and d >= g:\n print(e+g)\nelif e >= d and e >= g:\n print(d+g)\nelse:\n print(d+e)']
['Runtime Error', 'Accepted']
['s711432509', 's568399163']
[3060.0, 3060.0]
[17.0, 17.0]
[242, 163]
p03292
u811000506
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['A,B,C = list(map(int,input().split()))\nlist.sort()\nprint(list[2]-list[0])', 'A = list(map(int,input().split()))\nA.sort()\nprint(A[2]-A[0])']
['Runtime Error', 'Accepted']
['s253137943', 's548322412']
[2940.0, 2940.0]
[18.0, 18.0]
[73, 60]
p03292
u814265211
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['11 5 5', 'a = [int(i) for i in input().split()]\na.sort()\nprint(sum([a[i+1]-a[i] for i in range(len(a)-1)]))\n']
['Runtime Error', 'Accepted']
['s833967804', 's052216642']
[2940.0, 2940.0]
[17.0, 17.0]
[6, 98]
p03292
u818213347
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['l = list(map(int,input().split()))\nl.sort()\n\nprint((l[0]-l[1])+(l[1]-l[2])) \n', 'l = list(map(int,input().split()))\nl.sort()\n\nprint((l[2]-l[1])+(l[1]-l[0])) \n']
['Wrong Answer', 'Accepted']
['s630594608', 's100737980']
[9148.0, 9172.0]
[25.0, 29.0]
[77, 77]
p03292
u819529201
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['a,b,c=map(int,input().split())\nprint(min(a+abs(b-a)+abs(c-b),a+abs(c-a)+abs(b-c),b+abs(a-b)+abs(c-a),b+abs(c-b)+abs(a-c),c+abs(a-c)+abs(b-a),c+abs(b-c)+abs(a-b)))', 'a,b,c=map(int,input().split())\nprint(min(abs(b-a)+abs(c-b),abs(c-a)+abs(b-c),abs(a-b)+abs(c-a),abs(c-b)+abs(a-c),abs(a-c)+abs(b-a),abs(b-c)+abs(a-b)))']
['Wrong Answer', 'Accepted']
['s652282206', 's904167747']
[3060.0, 3064.0]
[18.0, 17.0]
[162, 150]
p03292
u826570725
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['import sys\n\nw1 = sys.stdin.readline().strip()\nw2 = sys.stdin.readline().strip()\n\nfor i in range(len(w1)):\n if w1 == w2:\n print("Yes")\n exit(0)\n w1 = w1[1:] + w1[0]\n\nprint("No")\n', 'import sys\n\nline = sys.stdin.readline()\na = [ i for i in map(int, line.strip().split()) ]\nb = abs(a[0] - a[1])\nc = abs(a[1] - a[2])\nd = abs(a[0] - a[2])\ne = b + c\nf = c + d\ng = d + b\nprint(min(e,f,g))\n']
['Wrong Answer', 'Accepted']
['s897920652', 's346008924']
[2940.0, 3060.0]
[18.0, 17.0]
[197, 201]
p03292
u827141374
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['a=map(int,input().split())\nprint(max(a)-min(a))', 'a=list(map(int,input().split()))\nprint(max(a)-min(a))']
['Runtime Error', 'Accepted']
['s183403988', 's366865123']
[2940.0, 2940.0]
[18.0, 17.0]
[47, 53]
p03292
u830162518
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['a,b,c=map(int,input().spliT())\nd=abs(a-b)\ne=abs(b-c)\nf=abs(c-a)\nL=list[d,e,f]\nL.sort()\nprint(L[0]+L[1])\n\n\n', 'a,b,c=map(int,input().spliT())\nd=abs(a-b)\ne=abs(b-c)\nf=abs(c-a)\nL=[d,e,f]\nL.sort()\nprint(L[0]+L[1])\n \n ', 'a,b,c=map(int,input().split())\nd=abs(a-b)\ne=abs(b-c)\nf=abs(c-a)\nL=[d,e,f]\nL.sort()\nprint(L[0]+L[1])\n \n ']
['Runtime Error', 'Runtime Error', 'Accepted']
['s024455035', 's050207625', 's966460248']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[106, 103, 103]
p03292
u835482198
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['a = list(map(int, input().split()))\nprint(min(abs(a[2] - a[1]) + abs(a[1] - a[0]),\n abs(a[1] - a[0]) + abs(a[2] - a[0]),\n abs(a[0] - a[1]) + abs(a[2] - a[0])\n))', 'a = list(map(int, input().split()))\nprint(min(abs(a[2] - a[1]) + abs(a[1] - a[0]),\n abs(a[1] - a[0]) + abs(a[2] - a[0]),\n abs(a[0] - a[1]) + abs(a[2] - a[0]),\n abs(a[2] - a[0]) + abs(a[1] - a[0])\n))\n', 'a = list(map(int, input().split()))\nprint(min(abs(a[2] - a[1]) + abs(a[1] - a[0]),\n abs(a[1] - a[0]) + abs(a[2] - a[0]),\n abs(a[0] - a[1]) + abs(a[2] - a[0]),\n abs(a[2] - a[0]) + abs(a[1] - a[0]),\n abs(a[0] - a[1]) + abs(a[1] - a[2]),\n abs(a[0] - a[2]) + abs(a[2] - a[1])\n))\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s508395669', 's942496640', 's940894835']
[3064.0, 3060.0, 3064.0]
[17.0, 17.0, 17.0]
[178, 226, 320]
p03292
u836737505
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['a = sorted(list(map(int, input().split())))\nprint(abs(a[1]-a[2])+(a[0]-a[1]))', 'a = sorted(list(map(int, input().split())))\nprint(abs(a[1]-a[2])+abs(a[0]-a[1]))']
['Wrong Answer', 'Accepted']
['s673381401', 's721165869']
[2940.0, 3064.0]
[17.0, 17.0]
[77, 80]
p03292
u840988663
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['A,B,C=map(int, input().split())\na=abs(A-B)\nb=abs(A-C)\nc=abs(B-C)\n\n\nsaidai=max(a,b,c)\nkotae=a+b+c-saidai+1\nprint(kotae)', 'A,B,C=map(int, input().split())\na=abs(A-B)\nb=abs(A-C)\nc=abs(B-C)\n\n\nsaidai=max(a,b,c)\nkotae=a+b+c-saidai\nprint(kotae)']
['Wrong Answer', 'Accepted']
['s263770731', 's940727453']
[3060.0, 3060.0]
[17.0, 17.0]
[118, 116]
p03292
u841568901
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['A_1 = int(input())\nA_2 = int(input())\nA_3 = int(input())\n\nlist = [A_1, A_2, A_3]\nnew_list = sorted(list)\nprint(new_list[2] - new_list[0])', 'A, B, C = sorted(map(int, input().split()))\nprint(C-A)']
['Runtime Error', 'Accepted']
['s619325430', 's740211377']
[3060.0, 3064.0]
[19.0, 17.0]
[137, 54]
p03292
u842388336
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['costs = map(int,input().split())\ncosts.sort()\ncnt = 0\nfor i in range(len(costs)-1):\n cnt += costs[i+1] - costs[i]\nprint(cnt)', 'costs = list(map(int,input().split()))\ncosts.sort()\ncnt = 0\nfor i in range(len(costs)-1):\n cnt += costs[i+1] - costs[i]\nprint(cnt)']
['Runtime Error', 'Accepted']
['s987625005', 's641768312']
[2940.0, 2940.0]
[17.0, 17.0]
[125, 131]
p03292
u844123804
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['num = input().split()\nnum = [int(i) for i in num]\nans = 0\nfor i in range(1, 3):\n ans += num[i]-num[i-1]\nprint(ans)', 'num = input().split()\nnum = sorted([int(i) for i in num])\nans = 0\nfor i in range(1, 3):\n ans += num[i]-num[i-1]\nprint(ans)']
['Wrong Answer', 'Accepted']
['s507572054', 's711520842']
[2940.0, 2940.0]
[17.0, 17.0]
[115, 123]
p03292
u853900545
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['a = sorted(list(map(int,input().split())))\n\nprint(a[2]-[0])', 'a = sorted(list(map(int,input().split())))\n\nprint(a[2]-a[0])']
['Runtime Error', 'Accepted']
['s173381207', 's163974624']
[2940.0, 2940.0]
[17.0, 17.0]
[59, 60]
p03292
u855985627
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['a=(int(i) for i in input().sprit(" "))\na.sorted()\nprint(a[2]-a[0])', 'a=[int(i) for i in input().split(" ")]\na.sort()\nprint(a[2]-a[0])']
['Runtime Error', 'Accepted']
['s704920848', 's136852011']
[2940.0, 2940.0]
[17.0, 17.0]
[66, 64]
p03292
u859897687
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['a,b,c=int(input())\nprint(max(a,b,c)-min(a,b,c))', 'a=input();print(eval(max(a)+"-"+min(a)))', 'a,b,c=map(int,input().split())\nprint(max(a,b,c)-min(a,b,c))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s090658569', 's925106558', 's033125615']
[2940.0, 2940.0, 2940.0]
[18.0, 18.0, 18.0]
[47, 40, 59]
p03292
u859968552
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['tasks=sorted(list(map(int,input().split()))\n\ncost=0 \n \nfor i in range(1,len(tasks)): \n cost+=tasks[i]-tasks[i-1]\n \nprint(cost)', 'tasks=sorted(list(map(int,input().split())))\n\ncost=0 \n \nfor i in range(1,len(tasks)): \n cost+=tasks[i]-tasks[i-1]\n \nprint(cost)']
['Runtime Error', 'Accepted']
['s564993057', 's651855586']
[2940.0, 2940.0]
[18.0, 18.0]
[231, 232]
p03292
u860312915
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['# -*- coding: utf-8 -*-\n\nlist = list(map(int,input().split()))\n\nprint(list)\n\nlist.sort()\nsum = 0;\nsum = list[2]-list[1]+list[1]-list[0]\n\nprint(sum)\n', '# -*- coding: utf-8 -*-\n\nlist = list(map(int,input().split()))\nlist.sort()\nsum = list[2]-list[0]\n\nprint(sum)\n']
['Wrong Answer', 'Accepted']
['s417602486', 's891103763']
[2940.0, 2940.0]
[17.0, 17.0]
[148, 109]
p03292
u862296914
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['tasks = sorted([int(v) for v in input.split()])\nprint(tasks[-1]-tasks[0])\n', 'tasks = sorted([int(v) for v in input().split()])\nprint(tasks[-1]-tasks[0])']
['Runtime Error', 'Accepted']
['s118909492', 's078599351']
[2940.0, 2940.0]
[17.0, 17.0]
[74, 75]
p03292
u863397945
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['old_list = list(map(int, input().split()))\nn = old_list.sort()\n\nprint(n[3]-n[0])', 'l = list(map(int,input().split()))\ntask_list = sorted(l)\n\nprint(task_list[2]-task_list[0])']
['Runtime Error', 'Accepted']
['s728478295', 's039456696']
[3060.0, 9132.0]
[19.0, 26.0]
[80, 90]
p03292
u865413330
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['a1, a2, a3 = map(int, input().split())\n\ntotalCost = 0\n\nCost = [abs(a1 - a2), abs(a2 - a3), abs(a1 - a3)]\nCost.sort()\n\ntotalCost = Cost[0] + Cost[1]\n', 'a1, a2, a3 = map(int, input().split())\n\nCost = [abs(a1 - a2), abs(a2 - a3), abs(a1 - a3)]\nCost.sort()\n\nprint(Cost[0] + Cost[1])']
['Wrong Answer', 'Accepted']
['s740754910', 's724935561']
[3064.0, 2940.0]
[18.0, 20.0]
[148, 127]
p03292
u867848444
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['s=list(map(int,input().split()))\nsorted(s)\nprint(s[-1]-s[0])', 'a,b,c=map(int,input().split())\nMa=max(a,b,c)\nmi=min(a,b,c)\nprint(a+b+c-Ma-mi)', 'a,b,c=map(int,input().split())\nMa=max(a,b,c)\nmi=max(a,b,c)\nprint(a+b+c-Ma-mi)', 's=list(map(int,input().split()))\nsorted(s)\nprint(s[-1]-s[0])', 'a=list(map(int,input().split()))\na.sort()\nprint(a[2]-a[0])']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s115429661', 's155199058', 's280564501', 's459052588', 's389179804']
[2940.0, 3060.0, 3060.0, 2940.0, 2940.0]
[17.0, 18.0, 18.0, 17.0, 18.0]
[60, 77, 77, 60, 58]
p03292
u882209234
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['from fractions import gcd\nN = int(input())\nA = list(map(int,input().split()))\n\ndef lcm(a,b): return a*b//gcd(a,b)\n\nl = A[0]\nfor i in range(1,N):\n l = lcm(l,A[i])\nl -= 1\n\nans = 0\nfor a in A: ans += l % a\nprint(ans)', 'A = sorted(map(int,input().split()))\nans = 0\nfor i in range(2): ans += A[i+1] - A[i]\nprint(ans)']
['Runtime Error', 'Accepted']
['s701732714', 's420302192']
[5176.0, 2940.0]
[37.0, 17.0]
[216, 95]
p03292
u882359130
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['A = [int(a) for a in input().split()]\nA.sort()\nprint(A[0]-A[2])', 'A = [int(a) for a in input().split()]\nA.sort()\nprint(A[2]-A[0])']
['Wrong Answer', 'Accepted']
['s731068998', 's218098542']
[2940.0, 2940.0]
[22.0, 17.0]
[63, 63]
p03292
u883040023
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['print("YNeos"[input() not in input()*3::2])', 'A = list(map(int,input().split()))\nprint(max(A)-min(A))']
['Runtime Error', 'Accepted']
['s759900907', 's365500911']
[2940.0, 2940.0]
[18.0, 17.0]
[43, 55]
p03292
u884531978
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['l = [int(x) for x in input().split()]\nsort(l)\nprint(l[2]-l[1]+l[1]-l[0])', 'l = [int(x) for x in input().split()]\nl.sort()\nprint(l[2]-l[1]+l[1]-l[0])']
['Runtime Error', 'Accepted']
['s287664477', 's949996967']
[2940.0, 2940.0]
[17.0, 17.0]
[72, 73]
p03292
u886902015
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['li=a,b,c=list(map(int,input().split()))\nlis=sorted(li)\nprint(lis[2]-lis[0)\n', 'li=a,b,c=list(map(int,input().split()))\nlis=sorted(li)\nprint(lis[2]-lis[0])\n']
['Runtime Error', 'Accepted']
['s364047490', 's471485719']
[8780.0, 9060.0]
[24.0, 30.0]
[75, 76]
p03292
u896741788
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['*a=map(int,input().split())\nprint(max(a)-min(a))', 'a=list(int(input().split()) for i in range(3))\nprint(max(a)-min(a))', 'a=[int(input().split())]\nprint(max(a)-min(a))', 'a=list(int(input().split()))\nprint(max(a)-min(a))', 'a=sorted(input().split())\nprint(-int(a[-1])+int(a[0]))', 'a=[int(input().split()) for i in range(3)]\nprint(max(a)-min(a))', '*a,=map(int,input().split())\nprint(max(a)-min(a))']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s016394135', 's191074485', 's307276778', 's311239106', 's594794464', 's817947234', 's938245203']
[2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0]
[18.0, 18.0, 17.0, 18.0, 18.0, 17.0, 17.0]
[48, 67, 45, 49, 54, 63, 49]
p03292
u897302879
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['print(sum(sorted(list(map(int, input().split())))[:2]))', 'i = list(map(int, input().split()))\ns = [abs(i[0]-i[1]), abs(i[1]-i[2]), abs(i[2]-i[0])]\nprint(sum(sorted(s)[:2]))']
['Wrong Answer', 'Accepted']
['s915104393', 's417516195']
[2940.0, 3060.0]
[17.0, 17.0]
[55, 114]
p03292
u898058223
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['a,b,c=map(int,input().split())\nprint(abs(a-b)+abs(b-c))', 'a,b,c=map(int,input().split())\nprint(abs(a-b)+abs(b-c)+abs(a-c)-max(abs(a-b),abs(b-c),abs(a-c)))']
['Wrong Answer', 'Accepted']
['s717265647', 's684272337']
[2940.0, 2940.0]
[17.0, 17.0]
[55, 96]
p03292
u898967808
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['aa = map(int,input().split())\nprint(max(aa)-min(aa))', 'aa = list(map(int,input().split()))\nprint(max(aa)-min(aa))']
['Runtime Error', 'Accepted']
['s175271810', 's400705540']
[2940.0, 2940.0]
[17.0, 17.0]
[52, 58]
p03292
u899421906
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['a = [int(i) for i in input().split()]\na.sort()\nb = [a[2]-a[1], a[1]-a[0], a[2]-[0]]\nprint(sum(b)-max(b))', 'a, b, c = map(int, input().split())\n\nm = min(abs(a - b) + abs(b - c), abs(a - c) + abs(c - b), abs(b - a) + abs(a - c))\nprint(m)']
['Runtime Error', 'Accepted']
['s460768834', 's103008019']
[3060.0, 2940.0]
[17.0, 17.0]
[104, 128]
p03292
u899645116
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['a = map(int, input.split())\na = sorted(a)\nans = 0\nans += a[1] - a[0]\nans += a[2] - a[1]\nprint(ans)', 'a = map(int, input().split())\na = sorted(a)\nans = 0\nans += a[1] - a[0]\nans += a[2] - a[1]\nprint(ans)\n']
['Runtime Error', 'Accepted']
['s047624115', 's393560086']
[2940.0, 2940.0]
[17.0, 17.0]
[98, 101]
p03292
u903948194
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['A = list(map(int, input().split()))\n\nA = sorted(A)\nans = a[2] - a[0]\nprint(ans)', 'A = list(map(int, input().split()))\n\nA = sorted(A)\nans = A[2] - A[0]\nprint(ans)']
['Runtime Error', 'Accepted']
['s645386262', 's594323761']
[2940.0, 2940.0]
[17.0, 18.0]
[79, 79]
p03292
u904804404
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['li = list(map(int,input().split(" ")))\nfirst =li[0]\nel = li[1:]\nel.sort()\ns = 0\nfor i in el:\n s += i - first\n first = i\n', 'li = list(map(int,input().split(" ")))\nli.sort()\nprint(li[2]-li[0])']
['Wrong Answer', 'Accepted']
['s593356945', 's081082695']
[2940.0, 2940.0]
[17.0, 17.0]
[126, 67]
p03292
u904995051
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['*a = map(input().split())\nprint(max(a)-min(a))', '*a = map(int,input().split())\nprint(max(a)-min(a))\n', '#ABC103A\na = sorted(list(map(int,input().split())))\nprint((a[1]-a[0]) + (a[2]-a[1]))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s477122324', 's551859873', 's978864061']
[2940.0, 2940.0, 9048.0]
[17.0, 17.0, 25.0]
[46, 51, 84]
p03292
u909991537
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['l = [int(i) for i in input().split()] \nans = 0\n\nfor i in range(len(l) - 1):\n\tif l[i+1] < l[i]:\n\ttmp = l[i+1]\n\tl[i+1] = l[i]\n\tl[i] = tmp\n\nfor i in range(len(l) - 1):\n\tans += l[i+1] - l[i]\n\nprint(ans)', 'l = [int(i) for i in input().split()] \nl_sort = np.sort(l)\nl_diff = np.diff(l_sort)\n \nprint(np.sum(l_diff))', 'l = [int(i) for i in input().split()] \nans = 0\n \nfor i in range(len(l) - 1):\n\tif l[i+1] < l[i]:\n tmp = l[i+1]\n l[i+1] = l[i]\n l[i] = tmp\n\nfor i in range(len(l) - 1):\n\tans += l[i+1] - l[i]\n\nprint(ans)', 'l = [int(i) for i in input().split()] \nans = 0\n \nfor i in range(len(l) - 1):\n\tif l[i+1] < l[i]:\n\ttmp = l[i+1]\n\tl[i+1] = l[i]\n\tl[i] = tmp\n \nfor i in range(len(l) - 1):\n\tans += l[i+1] - l[i]\n \nprint(ans)', 'import numpy as np\n\nl = [int(i) for i in input().split()] \nl_sort = np.sort(l)\nl_diff = np.diff(l_sort)\n\nprint(np.sum(l_diff))']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s389373054', 's486957601', 's957739899', 's973603789', 's932697426']
[2940.0, 2940.0, 2940.0, 2940.0, 21660.0]
[17.0, 17.0, 17.0, 18.0, 324.0]
[198, 107, 214, 207, 126]
p03292
u910295650
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['A=list(map(int,input().split()))\nX=abs(A[0]-A[1])\nY=abs(A[2]-A[0])\nZ=abs(A[1]-A[2])\nprint(min(Y+X,max(X+Z,Y+Z)))', 'A=list(map(int,input().split()))\nX=abs(A[0]-A[1])\nY=abs(A[2]-A[0])\nZ=abs(A[1]-A[2])\nprint(min(Y+X,max(X+Z,Y+Z)))', '*a,=map(int,input().split())\nprint(max(a)-min(a))']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s844586010', 's929418501', 's862166469']
[3060.0, 3060.0, 2940.0]
[17.0, 17.0, 17.0]
[112, 112, 49]
p03292
u910756197
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['a = map(int, input().split())\nprint(max(a) - min(a))', 'a = list(map(int, input().split()))\nprint(max(a) - min(a))\n']
['Runtime Error', 'Accepted']
['s230281198', 's694335112']
[2940.0, 2940.0]
[17.0, 17.0]
[52, 59]
p03292
u911438260
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
["S = input()\nT = input()\n\nif S == T:\n print('Yes')\nl = len(S)\nL = list(S)\nfor i in range(l):\n a = L[0]\n del L[0]\n L.append(a)\n s = ''.join(L)\n if s == T:\n print('Yes')\n break\nelse:\n print('No')", 'a = list(map(int,input().split()))\nA = a.sort()\n\nprint(A[2]-A[0])', 'a = list(map(int,input().split()))\na.sort()\n\nprint(a[2]-a[0])']
['Runtime Error', 'Runtime Error', 'Accepted']
['s003051701', 's123371855', 's042514565']
[3060.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[227, 65, 61]
p03292
u914762730
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['a=map(int,input().split())\nprint(max(a)-min(a))', 'a=list(map(int,input().split()))\nprint(max(a)-min(a))']
['Runtime Error', 'Accepted']
['s018201425', 's227068672']
[2940.0, 2940.0]
[18.0, 17.0]
[47, 53]
p03292
u916806287
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['a, b, c = sorted(map(int, input().split()))\nprint(a - c + b - c)\n\n', 'a, b, c = sorted(map(int, input().split()), reverse=True)\nprint(a - c + b - c)\n', 'a, b, c = sorted(map(int, input().split()), reverse=True)\nprint(a - c)\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s625192104', 's806156874', 's443111207']
[2940.0, 2940.0, 2940.0]
[18.0, 18.0, 17.0]
[66, 79, 71]
p03292
u921773161
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['l = list(map(int,input().split()))\nl.sort()\nans = []\nfor i in range(N-1):\n ans.append(l[i+1] - l[i])\nprint(sum(ans))', 'l = list(map(int,input().split()))\nl.sort()\nans = []\nfor i in range(len(l)-1):\n ans.append(l[i+1] - l[i])\nprint(sum(ans))']
['Runtime Error', 'Accepted']
['s300767737', 's194549832']
[2940.0, 2940.0]
[17.0, 18.0]
[117, 122]
p03292
u923279197
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['a_list=list(int,input().split())\nans=abs(a[0]-a[1])+abs(a[0]-a[2])\nans=min(ans,abs(a[1]-a[0])+abs(a[1]-a[2]))\nans=min(ans,abs(a[2]-a[1])+abs(a[0]-a[2]))\nprint(ans)', 'a_list=list(map(int,input().split()))\nans=abs(a[0]-a[1])+abs(a[0]-a[2])\nans=min(ans,abs(a[1]-a[0])+abs(a[1]-a[2]))\nans=min(ans,abs(a[2]-a[1])+abs(a[0]-a[2]))\nprint(ans)', 'a=list(map(int,input().split()))\nans=abs(a[0]-a[1])+abs(a[0]-a[2])\nans=min(ans,abs(a[1]-a[0])+abs(a[1]-a[2]))\nans=min(ans,abs(a[2]-a[1])+abs(a[0]-a[2]))\nprint(ans)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s062255697', 's790038835', 's222820789']
[3060.0, 3064.0, 3064.0]
[19.0, 17.0, 17.0]
[163, 168, 163]
p03292
u928784113
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['# -*- coding: utf-8 -*-\na,b,c = map(int,input().split())\nprint("{}".format(min(abs(a-b),abs(b-c),abs(c-a)))) ', 'A = list(map(int,input().split()))\nA.sort()\nprint(abs(A[2]-A[1])+abs(A[1]-A[0]))']
['Wrong Answer', 'Accepted']
['s737847076', 's272497179']
[2940.0, 2940.0]
[18.0, 17.0]
[144, 80]
p03292
u929582923
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['a,b,c = map(int,input())\nprint(c-a)', 'a,b,c = sorted(map(int,input().split()))\nprint(c-a)']
['Runtime Error', 'Accepted']
['s583622803', 's718806236']
[2940.0, 2940.0]
[18.0, 18.0]
[35, 51]
p03292
u931462344
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['a = map(int,input().split())\nMin = min(a)\nMax = max(a)\nMid = sum(a) - Max - Min\n\nans = Mid-Min + Max-Mid\nprint(ans)', 'a = list(map(int,input().split()))\nMin = min(a)\nMax = max(a)\nMid = sum(a) - Max - Min\n \nans = Mid-Min + Max-Mid\nprint(ans)']
['Runtime Error', 'Accepted']
['s718450198', 's678273605']
[2940.0, 2940.0]
[20.0, 17.0]
[115, 122]
p03292
u932465688
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['A = list(map(int,input().split))\nA.sort()\nprint(A[2]-A[0])', 'A = list(map(int,input().split))\nA.sort\nprint(A[2]-A[0])', 'A = list(map(int,input().split()))\nA.sort()\nprint(A[2]-A[0])']
['Runtime Error', 'Runtime Error', 'Accepted']
['s693394190', 's735100957', 's273309198']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 19.0]
[58, 56, 60]
p03292
u936378263
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['a = map(int, input().split())\nprint(max(a)-min(a))', 'a = list(map(int, input().split()))\nprint(max(a)-min(a))']
['Runtime Error', 'Accepted']
['s810692058', 's106019165']
[2940.0, 2940.0]
[17.0, 18.0]
[50, 56]
p03292
u937529125
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['s = input()\nt = input()\nans=0\nfor i in range(0,len(s)):\n a=s[i:]\n b=s[:i]\n ss=a+b\n print(ss)\n if ss == t:\n ans = 1\nif ans == 1:\n print("Yes")\nelse:\n print("No")', 'li = list(map(int,input().split()))\nli.sort()\n#li\nli[2]-li[1]+li[1]-li[0]', 'li = list(map(int,input().split()))\nli.sort()\n#li\nprint(li[2]-li[1]+li[1]-li[0])']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s085164913', 's197472947', 's101068019']
[3060.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0]
[188, 73, 80]
p03292
u937994490
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['a = input().split()\n\na.sort()\n\nprint(a[-1] - a[0])', 'a = input().split()\nb =[]\nfor i in a:\n b.append(int(i))\nb.sort()\n\nprint(b[-1] - b[0])']
['Runtime Error', 'Accepted']
['s363616586', 's479503278']
[2940.0, 2940.0]
[17.0, 18.0]
[50, 88]
p03292
u938486382
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
["N, M = list(map(int, input().split(' ')))\nedges = []\nfor i in range(M):\n a, b = list(map(int, input().split(' ')))\n edges.append([v for v in range(a, b)])\n\nans = 0\nwhile any(edges):\n hit_index = 0\n max_hit = 0\n edge = []\n for i in range(len(edges)):\n if edges[i]:\n edge = edges[i]\n break\n for v in edge[::-1]:\n hit = 0\n for i in range(M):\n if edges[i] and v in edges[i]:\n hit += 1\n if hit > max_hit:\n max_hit = hit\n hit_index = v\n # print('max_hit')\n # print(max_hit)\n # print('cut here')\n # print(hit_index)\n for i in range(len(edges)):\n if edges[i] and hit_index in edges[i]:\n edges[i] = False\n ans += 1\n # print('cutted')\n # print(edges)\nprint(ans)\n", "nums = sorted(list(map(int, input().split(' '))))\nprint(sum([abs(nums[i+1] - nums[i]) for i in range(len(nums) - 1)]))"]
['Runtime Error', 'Accepted']
['s076799385', 's419604891']
[3064.0, 2940.0]
[17.0, 18.0]
[825, 118]
p03292
u946424121
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['l= list(map(int, input()))\nl.sort()\nprint(l[2] - l[1])\n', 'l= list(map(int, input().split()))\nl.sort()\nprint(l[2] - l[0])']
['Runtime Error', 'Accepted']
['s285190324', 's815815085']
[3060.0, 2940.0]
[17.0, 17.0]
[55, 62]
p03292
u951601135
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
["S=input()\nT=input()\nT_0_equal=[]\nfor i in range(len(S)):\n if(T[0]==S[i]):\n T_0_equal.append(i)\n#print(T_0_equal)\nfor i in range(len(T_0_equal)):\n count=0\n for j in range(len(S)):\n if(T[j]!=S[(j+T_0_equal[i])%len(S)]):\n break\n else:\n count+=1\n if(count==len(S)):\n \tprint('Yes')\n \texit()\nprint('No') ", 'l=sorted(list(map(int,input().split())))\nprint(max(l)-min(l))']
['Runtime Error', 'Accepted']
['s442228102', 's604442062']
[3064.0, 2940.0]
[18.0, 18.0]
[324, 61]
p03292
u952656646
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['A = list(map(int, input().split()))\nans = min(A)\nfor a in sorted(A):\n ans = abs(ans-a)\nprint(ans)', "from itertools import permutations\nA = list(map(int, input().split()))\nans = float('inf')\nfor p in permutations(A):\n ans = min(ans, abs(p[0]-p[1])+abs(p[1]-p[2]))\nprint(ans)"]
['Wrong Answer', 'Accepted']
['s293200499', 's086076821']
[2940.0, 3060.0]
[17.0, 17.0]
[100, 176]
p03292
u961674365
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['a,b,c=map(int,input().split())\nprint(c-a)\n', 'a,b,c=map(int,input().split())\nprint(max(a,b,c)-min(a,b,c))']
['Wrong Answer', 'Accepted']
['s322112891', 's786281977']
[2940.0, 2940.0]
[17.0, 17.0]
[42, 59]
p03292
u963343620
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['x,y,z = sorted(map(int, input().split()))\nprint((b-a)+(c-b))', 'x,y,z = sorted(map(int, input().split()))\nprint((y-x)+(z-y))']
['Runtime Error', 'Accepted']
['s378130071', 's174145573']
[2940.0, 2940.0]
[19.0, 18.0]
[60, 60]
p03292
u964040466
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['task = [int (i) for i in input.split(" ")]\nans=5000\nif abs(task[0]-task[1])+abs(task[2]-task[0]) < ans:\n\tans = abs(task[0]-task[1])+abs(task[2]-task[0])\nif abs(task[0]-task[2])+abs(task[1]-task[0]) < ans:\n\tans = abs(task[0]-task[2])+abs(task[1]-task[0])\nif abs(task[1]-task[0])+abs(task[2]-task[1]) < ans:\n\tans = abs(task[1]-task[0])+abs(task[2]-task[1])\nif abs(task[1]-task[2])+abs(task[0]-task[1]) < ans:\n\tans = abs(task[1]-task[2])+abs(task[0]-task[1])\nif abs(task[2]-task[0])+abs(task[1]-task[2]) < ans:\n\tans = abs(task[2]-task[0])+abs(task[1]-task[2])\nif abs(task[2]-task[1])+abs(task[0]-task[2]) < ans:\n\tans = abs(task[2]-task[1])+abs(task[0]-task[2])\nprint(ans)', 'task = [int (i) for i in "100 100 100".split(" ")]\nans=5000\nif abs(task[0]-task[1])+abs(task[2]-task[0]) < ans:\n\tans = abs(task[0]-task[1])+abs(task[2]-task[0])\nif abs(task[0]-task[2])+abs(task[1]-task[0]) < ans:\n\tans = abs(task[0]-task[2])+abs(task[1]-task[0])\nif abs(task[1]-task[0])+abs(task[2]-task[1]) < ans:\n\tans = abs(task[1]-task[0])+abs(task[2]-task[1])\nif abs(task[1]-task[2])+abs(task[0]-task[1]) < ans:\n\tans = abs(task[1]-task[2])+abs(task[0]-task[1])\nif abs(task[2]-task[0])+abs(task[1]-task[2]) < ans:\n\tans = abs(task[2]-task[0])+abs(task[1]-task[2])\nif abs(task[2]-task[1])+abs(task[0]-task[2]) < ans:\n\tans = abs(task[2]-task[1])+abs(task[0]-task[2])\nprint(ans)', 'Source code\nCopy\ntask = [int (i) for i in input.split(" ")]\nans=5000\nif abs(task[0]-task[1])+abs(task[2]-task[0]) < ans:\n\tans = abs(task[0]-task[1])+abs(task[2]-task[0])\nif abs(task[0]-task[2])+abs(task[1]-task[0]) < ans:\n\tans = abs(task[0]-task[2])+abs(task[1]-task[0])\nif abs(task[1]-task[0])+abs(task[2]-task[1]) < ans:\n\tans = abs(task[1]-task[0])+abs(task[2]-task[1])\nif abs(task[1]-task[2])+abs(task[0]-task[1]) < ans:\n\tans = abs(task[1]-task[2])+abs(task[0]-task[1])\nif abs(task[2]-task[0])+abs(task[1]-task[2]) < ans:\n\tans = abs(task[2]-task[0])+abs(task[1]-task[2])\nif abs(task[2]-task[1])+abs(task[0]-task[2]) < ans:\n\tans = abs(task[2]-task[1])+abs(task[0]-task[2])\nprint(ans)', 'task = input().split(" ")\nans = 5000\nif abs ( int(task [ 0 ]) - int(task [ 1 ])) + abs ( int(task [ 2 ]) - int(task [ 0 ])) < ans : \n\tans = abs ( int(task [ 0 ]) - int(task [ 1 ])) + abs ( int(task [ 2 ]) - int(task [ 0 ]))\nif abs ( int(task [ 0 ]) - int(task [ 2 ])) + abs ( int(task [ 1 ]) - int(task [ 0 ])) < ans : \n\tans = abs ( int(task [ 0 ]) - int(task [ 2 ])) + abs ( int(task [ 1 ]) - int(task [ 0 ]))\nif abs ( int(task [ 1 ]) - int(task [ 0 ])) + abs ( int(task [ 2 ]) - int(task [ 1 ])) < ans : \n\tans = abs ( int(task [ 1 ]) - int(task [ 0 ])) + abs ( int(task [ 2 ]) - int(task [ 1 ]))\nif abs ( int(task [ 1 ]) - int(task [ 2 ])) + abs ( int(task [ 0 ]) - int(task [ 1 ])) < ans : \n\tans = abs ( int(task [ 1 ]) - int(task [ 2 ])) + abs ( int(task [ 0 ]) - int(task [ 1 ]))\nif abs ( int(task [ 2 ]) - int(task [ 0 ])) + abs ( int(task [ 1 ]) - int(task [ 2 ])) < ans : \n\tans = abs ( int(task [ 2 ]) - int(task [ 0 ])) + abs ( int(task [ 1 ]) - int(task [ 2 ]))\nif abs ( int(task [ 2 ]) - int(task [ 1 ])) + abs ( int(task [ 0 ]) - int(task [ 2 ])) < ans : \n\tans = abs ( int(task [ 2 ]) - int(task [ 1 ])) + abs ( int(task [ 0 ]) - int(task [ 2 ]))\nprint ( ans )']
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s096218774', 's658077894', 's741680659', 's462670801']
[3064.0, 3064.0, 2940.0, 3192.0]
[17.0, 17.0, 17.0, 20.0]
[669, 677, 686, 1172]
p03292
u965033073
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['a, b, c = map(int, input().split())\nk = max(a, b, c)\nl = min(a, b, c)\n\nprint(int(k - l)', 'a,b,c=sorted(map(int,input().split()));print(c-a)']
['Runtime Error', 'Accepted']
['s015926981', 's158093659']
[2940.0, 2940.0]
[19.0, 17.0]
[87, 49]
p03292
u967835038
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['a=map(int,input().split())\na.sort()\nprint(min((abs(a[0]-a[1])+abs(a[1]-a[2])),(abs(a[2]-a[1])+abs(a[1]-a[0]))))', 'a=list(map(int,input().split()))\na.sort()\nprint(min((abs(a[0]-a[1])+abs(a[1]-a[2])),(abs(a[2]-a[1])+abs(a[1]-a[0]))))']
['Runtime Error', 'Accepted']
['s957703643', 's896951743']
[3060.0, 3060.0]
[17.0, 17.0]
[111, 117]
p03292
u969848070
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['a =list(map(int, input().split()))\na.sort\nprint(a[2]-a[0])', 'a =list(map(int, input().split()))\na.sort()\nprint(a[2]-a[0])']
['Wrong Answer', 'Accepted']
['s351237633', 's620927947']
[2940.0, 2940.0]
[20.0, 18.0]
[58, 60]
p03292
u970107703
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['task = input()\ntask = task.split()\ncosts = []\nfor i in range(len(task)):\n costs.append(int(task[i]))\ntask.sort()\ncost = 0\nfor i in range(len(costs)-1):\n cost += costs[i+1]-costs[i]\n \nprint(cost)', 'task = input()\ntask = task.split()\ncosts = []\nfor i in range(len(task)):\n costs.append(int(task[i]))\ncosts.sort()\ncost = 0\nfor i in range(len(costs)-1):\n cost += costs[i+1]-costs[i]\n \nprint(cost)\n']
['Wrong Answer', 'Accepted']
['s590648580', 's715703039']
[3060.0, 3064.0]
[17.0, 18.0]
[203, 205]
p03292
u972416428
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['data = lists(map(int, input().split()))\nprint (max(data) - min(data))', 'data = list(map(int, input().split()))\nprint (max(data) - min(data))']
['Runtime Error', 'Accepted']
['s814166528', 's244749094']
[2940.0, 3060.0]
[17.0, 19.0]
[69, 68]
p03292
u977642052
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
["def main(a: list):\n a = sorted(a)\n\n cost = 0\n\n cost += abs(a[0] - a[1])\n print(cost)\n cost += abs(a[1] - a[2])\n print(cost)\n\n return cost\n\n\nif __name__ == '__main__':\n print(main(list(map(int, input().split(' ')))))\n", "def main(a: list):\n a = sorted(a)\n\n cost = 0\n\n cost += abs(a[0] - a[1])\n cost += abs(a[1] - a[2])\n\n return cost\n\n\nif __name__ == '__main__':\n print(main(list(map(int, input().split(' ')))))\n"]
['Wrong Answer', 'Accepted']
['s440437438', 's674967720']
[2940.0, 2940.0]
[18.0, 17.0]
[240, 208]
p03292
u978313283
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['A=int(input())\nA.sort()\nprint(A[2]-A[0])', 'A=list(map(int,input().split()))\nprint(max(A)-min(A))']
['Runtime Error', 'Accepted']
['s755892571', 's815367666']
[2940.0, 2940.0]
[18.0, 17.0]
[40, 53]
p03292
u979078704
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['*a = map(int,input.split())\nprint(max(a) - min(a))\n', '*a = map(int,input().split())\nprint(max(a) - min(a))\n', '*a, = map(int,input().split())\nprint(max(a) - min(a))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s511159683', 's633433794', 's988636729']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 20.0]
[51, 53, 53]
p03292
u980492406
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['n = input()\nn.sort()\nprint(int(n[2])-int(n[0]))', 'n = list(input())\nn.sort()\nprint(int(n[2])-int(n[0]))', 'n = list(map(input().split()))\nn.sort()\nprint(int(n[2])-int(n[0]))', 'n = list(map(int,input().split()))\nn.sort()\nprint(n[2]-n[0])']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s135368012', 's633908075', 's915126638', 's310688091']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 18.0, 17.0]
[47, 53, 66, 60]
p03292
u992910889
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['A=sorted(list(map(int,input.split())))\nprint(A[2]-A[0])', 'A=sorted(list(map(int,input.split())))\nprint(A[2]-A[0]+1)', 'A=sorted(list(map(int,input().split())))\nprint(A[2]-A[0])']
['Runtime Error', 'Runtime Error', 'Accepted']
['s616090252', 's863250423', 's527629390']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[55, 57, 57]
p03292
u993435350
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['S = input()\nT = input()\n\ncur = T.find(S[0])\ni = 0\ncon = len(S)\n\nwhile con != 0:\n if S[i] == T[cur]:\n con -= 1\n \n if con == 0:\n print("Yes")\n \n i += 1\n if cur == (len(S) - 1):\n cur = 0\n else:\n cur += 1\n else:\n print("No")\n break\n\n', 'A = list(map(int,input().split()))\n\nans = (max(A) - min(A))\n\nprint(ans)']
['Runtime Error', 'Accepted']
['s449358074', 's957664520']
[3060.0, 2940.0]
[18.0, 17.0]
[273, 71]
p03292
u994064513
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['def LI():\n\treturn [ int(s) for s in input().split() ]\n\nA = LI()\n\nA12 = abs(A[0]-A[1])\nA23 = abs(A[1]-A[2])\nA31 = abs(A[3]-A[1])\n\nprint(min(A12+A23,A23+A31,A31+A12))\n\n', 'def LI():\n\treturn [ int(s) for s in input().split() ]\n \nA = LI()\n \nA12 = abs(A[0]-A[1])\nA23 = abs(A[1]-A[2])\nA31 = abs(A[2]-A[0])\n \nprint(min(A12+A23,A23+A31,A31+A12))']
['Runtime Error', 'Accepted']
['s666734778', 's109338281']
[2940.0, 3060.0]
[18.0, 17.0]
[166, 167]
p03292
u995102075
2,000
1,048,576
You have three tasks, all of which need to be completed. First, you can complete any one task at cost 0. Then, just after completing the i-th task, you can complete the j-th task at cost |A_j - A_i|. Here, |x| denotes the absolute value of x. Find the minimum total cost required to complete all the task.
['A = [map(int, input().split())]\n\nprint(max(A) - min(A))\n', 'A = [int(x) for x in input().split()]\n\nprint(max(A) - min(A))\n']
['Runtime Error', 'Accepted']
['s076740739', 's681293658']
[2940.0, 2940.0]
[17.0, 18.0]
[56, 62]
p03293
u002459665
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['def main():\n x = input()\n y = input()\n\n l = []\n for i in range(len(x)):\n s = x[-i - 1:] + x[:-i - 1]\n l.append(s)\n\n if y in l:\n print("Yes")\n else:\n print("No")\n\n\ndef main2():\n x = input()\n y = input()\n ans = False\n\n s = x\n for i in range(len(x)):\n if s == y:\n ans = True\n break\n s = s[-1] + s[:-1]\n\n if ans:\n print("Yes")\n else:\n print("No")\n\n\nif __name__ == \'__main__\':\n pass\n', 'def main():\n x = input()\n y = input()\n\n l = []\n for i in range(len(x)):\n s = x[-i - 1:] + x[:-i - 1]\n l.append(s)\n\n if y in l:\n print("Yes")\n else:\n print("No")\n\n\ndef main2():\n x = input()\n y = input()\n ans = False\n\n s = x\n for i in range(len(x)):\n if s == y:\n ans = True\n break\n s = s[-1] + s[:-1]\n\n if ans:\n print("Yes")\n else:\n print("No")\n\n\nif __name__ == \'__main__\':\n main2()\n']
['Wrong Answer', 'Accepted']
['s245575757', 's399353149']
[3064.0, 3064.0]
[18.0, 18.0]
[498, 501]
p03293
u007424125
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['S = input()\nT = input()\n\nans = False\nfor i in range(len(S)):\n if S == T:\n ans = True\n break\n S = S[1:] + S[0:1]\n print(S)\n\n\nif ans:\n print("Yes")\nelse:\n print("No")', 'S = input()\nT = input()\n\nans = False\nfor i in range(len(S)):\n if S == T:\n ans = True\n break\n S = S[1:] + S[0:1]\n\n\nif ans:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s930728323', 's540393879']
[3060.0, 2940.0]
[19.0, 17.0]
[193, 180]
p03293
u009348313
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["S = input()\nT = input()\nfor i in range(len(S)):\n U = S[-i: ] + S[: len(S) - i]\n print(S[-i: ], S[: len(S) - i], U)\n if U == T or S == T:\n print('Yes')\n exit()\nprint('No')", "S = input()\nT = input()\nfor i in range(len(S)):\n U = S[-i: ] + S[: len(S) - i]\n if U == T or S == T:\n print('Yes')\n exit()\nprint('No')\n"]
['Wrong Answer', 'Accepted']
['s702366347', 's170540163']
[3060.0, 3060.0]
[18.0, 17.0]
[179, 143]
p03293
u013408661
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['import deque from collections\ns=list(input())\ns=deque(s)\nt=input()\nfot i in range(len(s)):\n if \'\'.join(s)==t:\n print("Yes")\n exit()\n s.append(s.popleft())\nprint("No")', 'from collections import deque\ns=list(input())\ns=deque(s)\nt=input()\nfor i in range(len(s)):\n if \'\'.join(s)==t:\n print("Yes")\n exit()\n s.append(s.popleft())\nprint("No")']
['Runtime Error', 'Accepted']
['s682983251', 's101611179']
[2940.0, 3316.0]
[26.0, 20.0]
[174, 174]
p03293
u018123481
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['s = input()\nt = input()\n\n\ndef rotation(s):\n for x in range(len(s)):\n s = s[-1] + s[:-1]\n if s == t:\n return "YES"\n return "NO"\n\nprint(rotation(s))', 's = input()\nt = input()\n\n\ndef rotation(s):\n for x in range(len(s)):\n s = s[-1] + s[:-1]\n if s == t:\n return "Yes"\n return "No"\n\nprint(rotation(s))\n']
['Wrong Answer', 'Accepted']
['s688403180', 's789145171']
[2940.0, 2940.0]
[17.0, 17.0]
[177, 178]
p03293
u018679195
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['S = input()\nT = input()\n\nfor _ in range(len(S)):\n if S == T:\n return True\n else:\n S = S[-1] + S[:-1]\n\nreturn False', 'p=input()\nq=input()\ns=len(p)\nu=0\nl=len(q)\nfor i in range(l):\n if p==q[i:s+i]:\n print("Yes")\n u=1\n break\nif u==0:\n print("No")', 'p=input()\nq=input()\nq=2*q\ns=len(p)\nu=0\nl=len(q)\nfor i in range(l):\n if p==q[i:s+i]:\n print("Yes")\n u=1\n break\nif u==0:\n print("No")']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s167658256', 's503185642', 's598114285']
[2940.0, 9080.0, 9000.0]
[17.0, 26.0, 29.0]
[134, 152, 158]
p03293
u020373088
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['s = list(input())\nt = list(input())\n\nok = False\nfor i in range(len(s)):\n s = s[-1] + s[:-1]\n if s == t:\n ok = True\n break\nif ok:\n print("Yes")\nelse:\n print("No")', 's = input()\nt = input()\n\nok = False\nfor i in range(len(s)):\n s = s[-1] + s[:-1]\n if s == t:\n ok = True\n break\nif ok:\n print("Yes")\nelse:\n print("No")']
['Runtime Error', 'Accepted']
['s392490061', 's860689641']
[2940.0, 3060.0]
[17.0, 18.0]
[171, 159]
p03293
u022488946
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["S = input()\nT = input()\nans = 'No'\nfor i in range(len(S)):\n if S == T:\n ans = 'Yes'\n break\n S = S[-1] + S[1:]\nprint(ans)", "S = input()\nT = input()\nans = 'No'\nfor i in range(len(S)):\n print(S, T)\n if S == T:\n ans = 'Yes'\n break\n S = S[-1] + S[:-1]\nprint(ans)", "S = input()\nT = input()\nans = 'No'\nfor i in range(len(S)):\n if S == T:\n ans = 'Yes'\n break\n S = S[-1] + S[:-1]\nprint(ans)"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s576267799', 's663641170', 's513185338']
[8984.0, 9048.0, 9040.0]
[31.0, 28.0, 29.0]
[140, 157, 141]
p03293
u023229441
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['a=input()\nb=input()\nA=a*2\nd= b in A\nif d=="True"\n print("Yes")\nelse:\n print("No")\n', 'a=input()\nb=input()\nA=a*2\nd= b in A\nif d="True"\n print("Yes")\nelse:\n print("No")', 'a=input()\nb=input()\nA=a*2\nd= b in A\nif d=="True":\n print("Yes")\nelse:\n print("No")\n', 'from collections import deque\ns=deque(list(input()))\nt=deque(list(input()))\nfor i in range(120):\n s.rotate(1)\n if s==t:\n print("Yes")\n exit()\nprint("No")']
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s212027162', 's451066111', 's791813968', 's622081207']
[2940.0, 2940.0, 2940.0, 3316.0]
[17.0, 17.0, 17.0, 21.0]
[88, 86, 89, 161]
p03293
u036340997
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["s = input()\nif s in t = input() * 2:\n print('Yes')\nelse:\n print('No')", "s = input()\nif s in input() * 2:\n print('Yes')\nelse:\n print('No')\n"]
['Runtime Error', 'Accepted']
['s343485871', 's323550443']
[2940.0, 2940.0]
[17.0, 17.0]
[71, 68]
p03293
u038027079
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['s = list(input())\nt = input()\nflag = False\nfor i in range(len(s)-1):\n if "".join(s) == t:\n flag = True\n break\n else:\n flag = False\n w = s[0]\n for j in range(len(s)-1):\n s[j] = s[j+1]\n s[-1] = w\n print(s)\nif flag:\n print("Yes")\nelse:\n print("No")', 's = list(input())\nt = input()\nflag = False\nfor i in range(len(s)):\n if "".join(s) == t:\n flag = True\n break\n else:\n flag = False\n w = s[0]\n for j in range(len(s)-1):\n s[j] = s[j+1]\n s[-1] = w\nif flag:\n print("Yes")\nelse:\n print("No")']
['Wrong Answer', 'Accepted']
['s574911756', 's612397741']
[3060.0, 3060.0]
[19.0, 18.0]
[297, 282]
p03293
u044459372
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["s=input()\nt=input()\nif t in [s[i:]+s[:i] for i in range(len(s)]:\n\tprint('Yes')\nelse:\n\tprint('No')", "s=input()\nt=input()\nif t in [s[i:]+s[:i] for i in range(len(s))]:\n\tprint('Yes')\nelse:\n\tprint('No')"]
['Runtime Error', 'Accepted']
['s581271518', 's079429952']
[2940.0, 2940.0]
[17.0, 17.0]
[97, 98]
p03293
u047535298
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['N = int(input())\nA = list(map(int, input().split()))\nprint(max(A)-min(A))\n', 'S = input()\nT = input()\n\nans = False\nfor i in range(len(S)):\n R = S[i:] + S[:i]\n if T == R:\n ans = True\n break\n\nprint("Yes" if ans else "No")']
['Runtime Error', 'Accepted']
['s868130405', 's398525176']
[2940.0, 3060.0]
[19.0, 17.0]
[74, 161]
p03293
u048925477
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['S = input()\nT = input()\n\nn = len(S)\ne = 0\nfor i in range(n):\n R = S[i:n] + S[0:i]\n if T == R:\n print("yes")\n e = 1\n break\n\nif e == 0:\n print("no")\n', 'S = input()\nT = input()\n\nn = len(S)\ne = 0\nfor i in range(n):\n R = S[i:n] + S[0:i]\n if T == R:\n print("Yes")\n e = 1\n break\n\nif e == 0:\n print("No")']
['Wrong Answer', 'Accepted']
['s335486616', 's087804485']
[2940.0, 2940.0]
[17.0, 17.0]
[177, 176]
p03293
u048945791
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['s = input()\nt = input()\n\nfor i in range(len(s)):\n\tif s == t:\n\t\tprint("Yes")\n\t\tbreak\n\telse:\n\t\ts = s[:-1] + s[-1]\nelse:\n\tprint("No")', 's = input()\nt = input()\n\nfor i in range(len(s)):\n\tif s == t:\n\t\tprint("Yes")\n\t\tbreak\n\telse:\n\t\ts = s[-1] + s[:-1]\nelse:\n\tprint("No")']
['Wrong Answer', 'Accepted']
['s960556892', 's135750048']
[2940.0, 2940.0]
[17.0, 17.0]
[130, 130]
p03293
u050698451
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["S = input()\nT = input()\n\nfor i in range(len(S)-1):\n if S[i:] + S[:i] == T:\n print('Yes')\n break\n else:\n print(S[i:] + S[:i])\n if i == len(S)-2:\n print('No')\n break\n ", "S = input()\nT = input()\nif S == T:\n print('Yes')\n exit()\n\nfor i in range(len(S)):\n S = S[1:]+S[0]\n if S == T:\n print('Yes')\n exit()\nprint('No')\n"]
['Wrong Answer', 'Accepted']
['s061890128', 's538285146']
[3060.0, 2940.0]
[18.0, 18.0]
[190, 170]
p03293
u055687574
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['S = set(input())\nT = set(input())\n\nprint(S == T)', 'S = input()\nT = input()\n\nfor i in range(len(S)):\n s = S[i:] + S[:i]\n if s == T:\n print("Yes")\n exit()\n\nprint("No")']
['Wrong Answer', 'Accepted']
['s714218233', 's502280446']
[2940.0, 2940.0]
[17.0, 17.0]
[48, 134]
p03293
u059628848
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["S=input()\nT=input()\nif(S[0:-2]==T[1:-1]):\n \n if(S[-1]==T[0]):\n print('Yes')\n else:\n print('No')\nelse:\n print('No')\n", "S=input()\nT=input()\nD=S[-1]+S\nT=T+T[0]\nif D==T:\n print('Yes')\nelse :\n print('No')", "S=input()\nT=input()\nif(len(S)==len(T)):\n length=len(S)\n i=0\n while(i<length):\n if(S==T):\n print('Yes')\n break\n S=S[-1]+S[0:-1]\n i+=1\n if i==length:\n print('No')\nelse:\n print('No')\n "]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s345714357', 's519770332', 's829982336']
[2940.0, 2940.0, 3060.0]
[17.0, 19.0, 20.0]
[138, 87, 249]
p03293
u060588488
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['a=input()\nb=input()\nh=0\nt=False\nwhile h<len(a):\n if a==b:\n print("YES")\n t=True\n break\n a=a[len(a)-1]+a[:len(a)-1]\n \n h+=1\nif t==False:\n print("NO")\n', 'a=input()\nb=input()\nh=0\nt=False\nwhile h<len(a):\n if a==b:\n print("Yes")\n t=True\n break\n a=a[len(a)-1]+a[:len(a)-1]\n \n h+=1\nif t==False:\n print("No")\n']
['Wrong Answer', 'Accepted']
['s411759596', 's067554847']
[3060.0, 3060.0]
[19.0, 17.0]
[185, 185]
p03293
u063073794
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['a=input()\nt=input()\nfor i in range(len(a)):\n S=a[-i:]+a[:-i]\n if S==t:\n print("YES")\n break\nelse:\n print("No")', 'a=input()\nt=input()\nfor i in range(len(a)):\n S=a[-i:]+a[:-i]\n if S==t:\n print("Yes")\n break\nelse:\n print("No")\n']
['Wrong Answer', 'Accepted']
['s908372975', 's151597487']
[2940.0, 2940.0]
[17.0, 17.0]
[119, 120]
p03293
u067983636
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['\ndef f(S):\n sets = {}\n for s in S:\n sets[s] = sets.setdefault(s, 0) + 1\n return sets\nS = input()\nT = input()\nsetS = f(S)\nsetT = f(T)\n\nfor k, v in setS.items():\n if setT.setdefault(k, 0) != v:\n print("No")\n break\nelse:\n N = len(S)\n for n in range(N):\n if S == T:\n print("Yes")\n break\n S = S[N-1] + S[0:N-1]\n print(S)\n else:\n print("No")', 'def f(S):\n sets = {}\n for s in S:\n sets[s] = sets.setdefault(s, 0) + 1\n return sets\nS = input()\nT = input()\nsetS = f(S)\nsetT = f(T)\n\nfor k, v in setS.items():\n if setT.setdefault(k, 0) != v:\n print("No")\n break\nelse:\n N = len(S)\n for n in range(N):\n if S == T:\n print("Yes")\n break\n S = S[N-1] + S[0:N-1]\n else:\n print("No")']
['Wrong Answer', 'Accepted']
['s844248117', 's176825830']
[3064.0, 3064.0]
[17.0, 17.0]
[427, 409]
p03293
u069925317
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["import sys\n\nmoji_S=list(input())\nmoji_T=list(input())\n\n\nfor i in range(len(moji_S)):\n\tcut=moji_S.pop()\n\tmoji_S.insert(0,cut)\n\tprint(moji_S)\n\tif moji_S==moji_T:\n\t\tprint('Yes')\n\t\tsys.exit()\n\nprint('NO')\t\t", 'moji_S=input()\nmoji_T=input()\n\nflag=0\nfor i in range(len(moji_S)):\n\tif moji_S==moji_T:\n\t\tflag =1\n\t\tbreak\n\ts=s[-1]+s[0:len-1]\nif flag:\n\tprint("Yes")\nelse:\n\tprint("No")\n\n', "import sys\n\nmoji_S=list(input())\nmoji_T=list(input())\n\n\nfor i in range(len(moji_S)):\n\tcut=moji_S.pop()\n\tmoji_S.insert(0,cut)\n\tprint(moji_S)\n\tif moji_S==moji_T:\n\t\tprint('Yes')\n\t\tsys.exit()\n\nprint('NO')\t\t", '#! python3\n\nmoji_S=input()\nmoji_T=input()\n\nflag=0\nfor i in range(len(moji_S)):\n\tif moji_S==moji_T:\n\t\tflag =1\n\t\tbreak\n\tmoji_S=moji_S[-1]+moji_S[0:-1]\nif flag:\n\tprint("Yes")\nelse:\n\tprint("No")']
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s009271375', 's215757960', 's781689593', 's743845423']
[3060.0, 2940.0, 3060.0, 3060.0]
[20.0, 17.0, 18.0, 17.0]
[202, 168, 202, 190]
p03293
u076306174
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["S=input()\nT=input()\nfor i in range(len(S)):\n if S!=T:\n S=S[-1]+S[:-1]\n print(S)\n else:\n print('Yes')\n sys.exit()\n \nprint('No')", "import math\nimport heapq\nimport sys\nimport re\nfrom collections import Counter\nimport datetime\nfrom decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN\n\n\n\n\nS=input()\nT=input()\nfor i in range(len(S)):\n if S!=T:\n S=S[-1]+S[:-1]\n else:\n print('Yes')\n sys.exit()\n \nprint('No')\n "]
['Runtime Error', 'Accepted']
['s761426040', 's239893131']
[3060.0, 5204.0]
[17.0, 36.0]
[167, 540]
p03293
u086503932
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
["S = input()\nT = input()\nflag = False\ntmp_S = S\n\nfor i in range(len(S)):\n tmp_S = tmp_S[-1]+tmp_S[:-1]\n print(tmp_S)\n if tmp_S == T:\n flag = True\n\nif flag:\n print('Yes')\nelse:\n print('No')", "S = input()\nT = input()\nflag = False\ntmp_S = S\n\nfor i in range(len(S)):\n tmp_S = tmp_S[-1]+tmp_S[:-1]\n if tmp_S == T:\n flag = True\n\nif flag:\n print('Yes')\nelse:\n print('No')"]
['Wrong Answer', 'Accepted']
['s730672272', 's003280283']
[3060.0, 3064.0]
[17.0, 19.0]
[195, 180]
p03293
u089142196
2,000
1,048,576
You are given string S and T consisting of lowercase English letters. Determine if S equals T after _rotation_. That is, determine if S equals T after the following operation is performed some number of times: Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}. Here, |X| denotes the length of the string X.
['S=input()\nT=input()\n\nfor i in range(100):\n if S[-1-i:-1]+S[0:100-i] ==T:\n print("Yes")\n break\nelse:\n print("No")', 'S=input()\nT=input()\n\nfor i in range(100):\n if S[-1-i:-1:-1]+S[0:100-i] ==T:\n print("Yes")\n break\nelse:\n print("No")', 'S=input()\nT=input()\n\nfor i in range(100):\n if S[-i:]+S[0:len(S)-i] ==T:\n print("Yes")\n break\nelse:\n print("No")']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s429493809', 's767575429', 's427300639']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 18.0]
[120, 123, 119]