TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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.

Submission attempts (in order):
a_1, a_2, a_3 = map(int, input().split())
a = [a_1, a_2, a_3]

ad = sorted(a, reverse=True)
ans = (ad[0]-ad[1] + (ad[1]-ad[2])
print(ans)

a_1, a_2, a_3 = map(int, input().split())

maxs = max(a_1, a_2, a_3)
mins = min(a_1, a_2, a_3)
ans = maxs-mins
print(ans)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
A = map(int, input().split())
print(max(A) - min(A))

A = map(int, input().split())
print(max(A) min(A))

A = list(map(int, input().split()))
print(max(A) - min(A))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
tasks = sorted(map(int, input().split()))
cost = sum([tasks[i+1] - tasks[i] for i in range(1, len(tasks) - 1)])
print(cost)


tasks = sorted(map(int, input().split()))
cost = sum([tasks[i+1] - tasks[i] for i in range(0, len(tasks) - 1)])
print(cost)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a = map(int, input().split())
print(max(a) - min(a))a = [int(i) for i in input().split()]
print(max(a) - min(a))

*a = map(int, input().split())
print(max(a) - min(a))

a = map(int, input().split())
print(max(a) - min(a))

*a = map(int, input().split())
print(max(a) - min(a))


a = [int(i) for i in input().split()]
print(max(a) - min(a))

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
a = list(map(int, input().split()))
print(abs(a[0]-a[1])+abs(a[1]-a[2]))


a = list(map(int, input().split()))
print(min(abs(a[0]-a[1])+abs(a[1]-a[2]), abs(a[0]-a[2])+abs(a[1]-a[0])))


a = list(map(int, input().split()))
print(min(abs(a[0]-a[1])+abs(a[1]-a[2]), abs(a[0]-a[2])+abs(a[1]-a[0])), abs(a[0]-a[2])+abs(a[1]-a[2])))


a = list(map(int, input().split()))
min(abs(a[0]-a[1])+abs(a[1]-a[2]), abs(a[0]-a[2])+abs(a[1]-a[0]))


a = list(map(int, input().split()))
print(min([abs(a[0]-a[1])+abs(a[1]-a[2]), abs(a[0]-a[2])+abs(a[1]-a[0])), abs(a[0]-a[2])+abs(a[1]-a[2])]))


a = list(map(int, input().split()))
print(
    min(
    [abs(a[0]-a[1])+abs(a[1]-a[2]), abs(a[0]-a[2])+abs(a[1]-a[0]), abs(a[0]-a[2])+abs(a[1]-a[2])]
    )
)


Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
#abc103 b
s=input()
t=input()
flag=False
for i in range(len(s)):
    new_t=t[-1]
    new_t+=t[:-1]
    if new_t==s:
        flag=True
        break
    t=new_t

print("Yes" if flag else "No" )
    

#abc103 a
a=list(map(int,input().split()))
a.sort()
ans=abs(a[0]-a[1])+abs(a[1]-a[2])
print(ans)


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N, K, L = input().split()
S=int(N)-int(K)
S=abs(S)
I=int(L)-int(K)
I=abs(I)
print(S+I)


N, K, L = input().split()
S=int(N)-int(K)
S=abs(S)
I=int(L)-int(K)
I=abs(I)
M=int(N)-int(L)
M=abs(M)
list=(S, I ,M)
print(S+I+M-max(list))


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a = list(map(int, input().split()))
a.sort
ans = (a[2]-a[1])+(a[1]-a[0])
print(ans)

a = list(map(int, input().split()))
a.sort()
#print(a)
ans = (a[2]-a[1])+(a[1]-a[0])
print(ans)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a,b,c=sorted(map(int, input().split()))
print(a+c)

a,b,c=sorted(map(int, input().split())
print(a+c)

a,b,c=sorted(map(int, input().split())
print(a-2*b+c)

a,b,c=sorted(map(int, input().split()))
print(c-a)

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
li = list(map(int, input().split()))
li.sort()
print(li[0]-li[2])

li = list(map(int, input().split()))
li.sort()
print(li[2]-li[0])

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
t = input()
for _ in range(len(s)):
    if s == t:
        print('Yes')
        break
    s = s[-1] + s[:-1]
else:
    print('No')

A = sorted(map(int, input().split()))
print(A[2] - A[0])

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
tmp = list(map(lambda n : int(n), input().split(" ")))
tmp.sort(reverse=True)

print(tmp[2] - tmp[0])

tmp = list(map(lambda n : int(n), input().split(" ")))
tmp.sort(reverse=True)
 
print(tmp[0] - tmp[2])

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
L=list(map(int, input().split()))
X=sorted([abs(L[3]-L[1]),abs(L[1]-L[2]),abs(L[2]-L[3])])
print(X[0]+X[1])

L=list(map(int, input().split()))
X=sorted([abs(L[2]-L[0]),abs(L[0]-L[1]),abs(L[1]-L[2])])
print(X[0]+X[1])

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
lis = list(map(int,input().split()))
a,b,c = sorted(lis,reverse = True)
print(abs(b-a)+(c-b))

lis = list(map(int,input().split()))
print(max(lis)-min(lis))


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a = list(map(int, input().split()))

cost = []
cost.append(a[0]-0)
cost.append(abs(a[1]-a[0]))
cost.append(abs(a[2]-a[1]))

print(sum(cost)-max(cost))

a = list(map(int, input().split()))
print(max(a)-min(a))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a,b,c = map(int, input().split())

L = [a,b,c]
L.sorted()

print(abs(L[2]-L[0]))

a,b,c = map(int, input().split())

print(abs(max(a,b,c) - min(a,b,c)))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
a = list(map(int,input().split()))
b = sorted(a)
print(a[2]-a[0])

A = list(map(int,input().split()))
print(max(A)-min(A))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S = input()
T = input()
X = 0
for i in range(len(S)):
  S = S[-1] + S[:-1] 
  print(S)
  if S == T:
    X = 1

if X == 0:
  print('No')
elif X == 1:
  print('Yes')

*a,= map(int, input().split( ))
print(max(*a)-min(*a))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
a_1,a_2,a_3 = map(int,input().split())
if a_1 > a_2:
    if a_1 > a_3:
        print(abs(a_2-a_3))
    elif a_1 == a_3:
        print(0)
    else:
        print(abs(a_1-a_2))
elif a_1 < a_2:
    if a_1 > a_3:
        print(abs(a_1-a_3))
    elif a_1 == a_3:
        print(0)
    else:
        if a_2 > a_3:
            print(abs(a_1-a_3))
        else:
            print(abs(a_1-a_3))
            


list = list(map(int,input().split()))
list.sort()
num1 = abs(list[1]-list[0])
num2 = abs(list[2]-list[1])
print(num1+num2)



Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a-sorted(list(map(int,input().split())))
print(a[-1]-a[0])

a=sorted(list(map(int,input().split())))
print(a[-1]-a[0])

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
a = list(map(int, input().split()))
print(a[2] - a[0])


a = sorted(list(map(int, input().split())))[:: 1]
print(a[2] - a[0])


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
t = input()

print("Yes" if t in s*2 else "No")

a = sorted(list(map(int, input().split())))
print(a[2]-a[0])

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
L=[int(i) for i in input().split()]
S=[L[1]+abs(L[2]-L[1]),L[2]+abs(L[2]-L[1]),L[2]+abs(L[2]-L[0]),L[0]+abs(L[2]-L[0]),L[0]+abs(L[0]-L[1]),L[1]+abs(L[0]-L[1])]
print(min(S))

N=int(input())
import fractions 
print(2*N//fractions.gcd(2,N))

L=[int(i) for i in input().split()]
A=abs(L[0]-L[1])
B=abs(L[1]-L[2])
C=abs(L[2]-L[0])
S=[A+B,A+C,B+C]
print(min(S))

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N_List = sorted(list(map(int,input().split())))
print(sum(N_List[1:]-N_List[:-1]))

import numpy as np
N_List = np.array([map(int,input().split())])
N_List_a = np.sort(N_List)
print(sum(N_List_a[1:]-N_List[:-1]))

import numpy as np
N_List = np.array(list(map(int,input().split())))
N_List_a = np.sort(N_List)
print(sum(N_List_a[1:]-N_List_a[:-1]))

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a, b, c = map(int, input().split())

if abs(a - b) < abs(a - c) and abs(a - b) < abs(b - c):
    print(abs(a - b) + abs(b - c))
elif abs(a - c) < abs(a - b) and abs(a - c) < abs(b - c)
    print(abs(a - c) + abs(b - c)
else:
    print(abs(a - c) + abs(a - b))


a, b, c = map(int, input().split())

if abs(a - b) < abs(a - c) and abs(a - b) < abs(b - c):
    print(abs(a - b) + abs(b - c))
elif abs(a - c) < abs(a - b) and abs(a - c) < abs(b - c):
    print(abs(a - c) + abs(c - b)
elif abs(b - c) < abs(a - b) and abs(b - c) < abs(a - c):
    print(abs(b - c) + abs(c - a))


a, b, c = map(int, input().split())

if abs(a - b) < abs(a - c) and abs(a - b) < abs(b - c):
    print(abs(a - b) + abs(b - c))
elif abs(a - c) < abs(a - b) and abs(a - c) < abs(b - c):
    print(abs(a - c) + abs(b - c)
else:
    print(abs(a - c) + abs(a - b))


a, b, c = map(int, input().split())

if abs(a - b) < abs(a - c) and abs(a - b) < abs(b - c):
    print(abs(a - b) + abs(b - c))
elif abs(a - c) < abs(a - b) and abs(a - c) < abs(b - c):
    print(abs(a - b) + abs(b - c)
else:
    print(abs(b - c) + abs(c - a))


a, b, c = map(int, input().split())

if b < c:
    tmp = b
    b = c
    c = tmp
if a < b:
    tmp = a
    a = b
    b = a

if abs(a - c) < abs(a - b):
    print(abs(a - c) + abs(c - b))
elif abs(a - c) > abs(a - b):
    print(abs(a - b) + abs(b - c))


a = list(map(int, input().split()))

a.sort()

print(a[2]-a[0])


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a = sorted([int(input()) for _ in range(3)])

print(abs(a[0] - a[1]) + abs(a[1] - a[2]))

a = map(int,input().split())

print(abs(a[0] - a[1]) + abs(a[1] - a[2]))


a = sorted(map(int,input().split()))

print(abs(a[0] - a[1]) + abs(a[1] - a[2]))


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
import sys

args = sys.argv
l = []

for i in range(0,3):
    l.append(int(args[i+1]))
l.sort()
print(abs(l[0]-l[1]) + abs(l[1]-l[2]))

a = list(int(i) for i in input().split())
a.sort()
print(abs(a[0]-a[1]) + abs(a[1]-a[2]))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
headData = [int(n) for n in input().split()]
islandNum = headData[0]
requestNum = headData[1]
requestList = []
count = 0
for n in range(requestNum):
    request = [int(elem) for elem in input().split()]
    requestList.append(request)


while (len(requestList) != 0):
    print(count)
    
    bridgePriority = islandNum * [0]
    for request in requestList:
        for j in range(request[0], request[1]):
            bridgePriority[j] += 1
    deleteBridgeList = []

    print(max(bridgePriority))
    
    for index in range(len(bridgePriority)):
        if (bridgePriority[index] == max(bridgePriority)):
            deleteBridgeList.append(index)

    print(deleteBridgeList)
    
    newRequestList = []
    for request in requestList:
        for bridge in deleteBridgeList:
            isUnsolvedBridge = True
            if (request[0]<=bridge and bridge<request[1]):
                isUnsolvedBridge=False
                break
        if isUnsolvedBridge:
            newRequestList.append(request)
    requestList = newRequestList
    print(requestList)
    count += len(deleteBridgeList)

print(count)

data = [int(n) for n in input().split()]
print(max(data)-min(data))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
a,b,c = map(int,input().split())

a = abs(a-b),b = abs(b-c),c = abs(c-a)

print(a+b+c-max(a,b,c))

a,b,c = map(int,input().split())

print(max(a,b,c)-min(a,b,c))


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
*a=map(int,input().split())
print(max(a)-min(a))

a=map(int,input().split())
print(max(a)-min(a))

*a,=map(int,input().split())
print(max(a)-min(a))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
S = input()
T = input()

for i in range(len(S)):
    s=S[-i:]+S[0:-i]
    if s==T:
        print('Yes')
        break
else:
    print('No')

A = list(map(int, input().split()))

A.sort()
A.reverse()

print(abs(A[0]-A[1])+abs(A[1]-A[2]))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
array = list(map(int, input().split()))
array.sort()
print(array)

count=0
for i in range(1, len(array)):
    count += array[i] - array[i-1]
print(count)
    

n = list(map(int, input().split()))
n.sort()
sa = 0
for i in range(1, len(n)):
    sa += n[i] - n[i-1]
print(sa)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a = input()
b = input()
c = len(a)
a_list = list(a)
b_list = list(b)
for i in range(101):
  tmp = a_list[0]
  for j in range(c-1):
    a_list[j] = a_list[j+1]
  a_list[c-1] = tmp
  if a_list == b_list:
    print("Yes")
    exit()
print("No")


a,b,c = map(int, input().split())
d = abs(a-b)
e = abs(a-c)
g = abs(b-c)
if d >= e and d >= g:
  print(e+g)
elif e >= d and e >= g:
  print(d+g)
else:
  print(d+e)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
A,B,C = list(map(int,input().split()))
list.sort()
print(list[2]-list[0])

A = list(map(int,input().split()))
A.sort()
print(A[2]-A[0])

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
11 5 5

a = [int(i) for i in input().split()]
a.sort()
print(sum([a[i+1]-a[i] for i in range(len(a)-1)]))


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
l = list(map(int,input().split()))
l.sort()

print((l[0]-l[1])+(l[1]-l[2])) 


l = list(map(int,input().split()))
l.sort()

print((l[2]-l[1])+(l[1]-l[0])) 


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a,b,c=map(int,input().split())
print(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())
print(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)))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import sys

w1 = sys.stdin.readline().strip()
w2 = sys.stdin.readline().strip()

for i in range(len(w1)):
    if w1 == w2:
        print("Yes")
        exit(0)
    w1 = w1[1:] + w1[0]

print("No")


import sys

line = sys.stdin.readline()
a = [ i for i in map(int, line.strip().split()) ]
b = abs(a[0] - a[1])
c = abs(a[1] - a[2])
d = abs(a[0] - a[2])
e = b + c
f = c + d
g = d + b
print(min(e,f,g))


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a=map(int,input().split())
print(max(a)-min(a))

a=list(map(int,input().split()))
print(max(a)-min(a))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
a,b,c=map(int,input().spliT())
d=abs(a-b)
e=abs(b-c)
f=abs(c-a)
L=list[d,e,f]
L.sort()
print(L[0]+L[1])




a,b,c=map(int,input().spliT())
d=abs(a-b)
e=abs(b-c)
f=abs(c-a)
L=[d,e,f]
L.sort()
print(L[0]+L[1])
 
 

a,b,c=map(int,input().split())
d=abs(a-b)
e=abs(b-c)
f=abs(c-a)
L=[d,e,f]
L.sort()
print(L[0]+L[1])
 
 

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
a = list(map(int, input().split()))
print(min(abs(a[2] - a[1]) + abs(a[1] - a[0]),
          abs(a[1] - a[0]) + abs(a[2] - a[0]),
          abs(a[0] - a[1]) + abs(a[2] - a[0])
))

a = list(map(int, input().split()))
print(min(abs(a[2] - a[1]) + abs(a[1] - a[0]),
          abs(a[1] - a[0]) + abs(a[2] - a[0]),
          abs(a[0] - a[1]) + abs(a[2] - a[0]),
          abs(a[2] - a[0]) + abs(a[1] - a[0])
))


a = list(map(int, input().split()))
print(min(abs(a[2] - a[1]) + abs(a[1] - a[0]),
          abs(a[1] - a[0]) + abs(a[2] - a[0]),
          abs(a[0] - a[1]) + abs(a[2] - a[0]),
          abs(a[2] - a[0]) + abs(a[1] - a[0]),
          abs(a[0] - a[1]) + abs(a[1] - a[2]),
          abs(a[0] - a[2]) + abs(a[2] - a[1])
))


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a = sorted(list(map(int, input().split())))
print(abs(a[1]-a[2])+(a[0]-a[1]))

a = sorted(list(map(int, input().split())))
print(abs(a[1]-a[2])+abs(a[0]-a[1]))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
A,B,C=map(int, input().split())
a=abs(A-B)
b=abs(A-C)
c=abs(B-C)


saidai=max(a,b,c)
kotae=a+b+c-saidai+1
print(kotae)

A,B,C=map(int, input().split())
a=abs(A-B)
b=abs(A-C)
c=abs(B-C)


saidai=max(a,b,c)
kotae=a+b+c-saidai
print(kotae)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
A_1 = int(input())
A_2 = int(input())
A_3 = int(input())

list = [A_1, A_2, A_3]
new_list = sorted(list)
print(new_list[2] - new_list[0])

A, B, C = sorted(map(int, input().split()))
print(C-A)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
costs = map(int,input().split())
costs.sort()
cnt = 0
for i in range(len(costs)-1):
  cnt += costs[i+1] - costs[i]
print(cnt)

costs = list(map(int,input().split()))
costs.sort()
cnt = 0
for i in range(len(costs)-1):
  cnt += costs[i+1] - costs[i]
print(cnt)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
num = input().split()
num = [int(i) for i in num]
ans = 0
for i in range(1, 3):
  ans += num[i]-num[i-1]
print(ans)

num = input().split()
num = sorted([int(i) for i in num])
ans = 0
for i in range(1, 3):
  ans += num[i]-num[i-1]
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a = sorted(list(map(int,input().split())))

print(a[2]-[0])

a = sorted(list(map(int,input().split())))

print(a[2]-a[0])

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
a=(int(i) for i in input().sprit(" "))
a.sorted()
print(a[2]-a[0])

a=[int(i) for i in input().split(" ")]
a.sort()
print(a[2]-a[0])

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
a,b,c=int(input())
print(max(a,b,c)-min(a,b,c))

a=input();print(eval(max(a)+"-"+min(a)))

a,b,c=map(int,input().split())
print(max(a,b,c)-min(a,b,c))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
tasks=sorted(list(map(int,input().split()))

cost=0                                   
             
for i in range(1,len(tasks)):                      
    cost+=tasks[i]-tasks[i-1]
                                    
print(cost)

tasks=sorted(list(map(int,input().split())))

cost=0                                   
             
for i in range(1,len(tasks)):                      
    cost+=tasks[i]-tasks[i-1]
                                    
print(cost)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
# -*- coding: utf-8 -*-

list = list(map(int,input().split()))

print(list)

list.sort()
sum = 0;
sum = list[2]-list[1]+list[1]-list[0]

print(sum)


# -*- coding: utf-8 -*-

list = list(map(int,input().split()))
list.sort()
sum = list[2]-list[0]

print(sum)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
tasks = sorted([int(v) for v in input.split()])
print(tasks[-1]-tasks[0])


tasks = sorted([int(v) for v in input().split()])
print(tasks[-1]-tasks[0])

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
old_list = list(map(int, input().split()))
n = old_list.sort()

print(n[3]-n[0])

l = list(map(int,input().split()))
task_list = sorted(l)

print(task_list[2]-task_list[0])

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
a1, a2, a3 = map(int, input().split())

totalCost = 0

Cost = [abs(a1 - a2), abs(a2 - a3), abs(a1 - a3)]
Cost.sort()

totalCost = Cost[0] + Cost[1]


a1, a2, a3 = map(int, input().split())

Cost = [abs(a1 - a2), abs(a2 - a3), abs(a1 - a3)]
Cost.sort()

print(Cost[0] + Cost[1])

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s=list(map(int,input().split()))
sorted(s)
print(s[-1]-s[0])

a,b,c=map(int,input().split())
Ma=max(a,b,c)
mi=min(a,b,c)
print(a+b+c-Ma-mi)

a,b,c=map(int,input().split())
Ma=max(a,b,c)
mi=max(a,b,c)
print(a+b+c-Ma-mi)

s=list(map(int,input().split()))
sorted(s)
print(s[-1]-s[0])

a=list(map(int,input().split()))
a.sort()
print(a[2]-a[0])

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
from fractions import gcd
N = int(input())
A = list(map(int,input().split()))

def lcm(a,b): return a*b//gcd(a,b)

l = A[0]
for i in range(1,N):
    l = lcm(l,A[i])
l -= 1

ans = 0
for a in A: ans += l % a
print(ans)

A = sorted(map(int,input().split()))
ans = 0
for i in range(2): ans += A[i+1] - A[i]
print(ans)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
A = [int(a) for a in input().split()]
A.sort()
print(A[0]-A[2])

A = [int(a) for a in input().split()]
A.sort()
print(A[2]-A[0])

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
print("YNeos"[input() not in input()*3::2])

A = list(map(int,input().split()))
print(max(A)-min(A))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
l = [int(x) for x in input().split()]
sort(l)
print(l[2]-l[1]+l[1]-l[0])

l = [int(x) for x in input().split()]
l.sort()
print(l[2]-l[1]+l[1]-l[0])

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
li=a,b,c=list(map(int,input().split()))
lis=sorted(li)
print(lis[2]-lis[0)


li=a,b,c=list(map(int,input().split()))
lis=sorted(li)
print(lis[2]-lis[0])


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
*a=map(int,input().split())
print(max(a)-min(a))

a=list(int(input().split()) for i in range(3))
print(max(a)-min(a))

a=[int(input().split())]
print(max(a)-min(a))

a=list(int(input().split()))
print(max(a)-min(a))

a=sorted(input().split())
print(-int(a[-1])+int(a[0]))

a=[int(input().split()) for i in range(3)]
print(max(a)-min(a))

*a,=map(int,input().split())
print(max(a)-min(a))

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
print(sum(sorted(list(map(int, input().split())))[:2]))

i = list(map(int, input().split()))
s = [abs(i[0]-i[1]), abs(i[1]-i[2]), abs(i[2]-i[0])]
print(sum(sorted(s)[:2]))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a,b,c=map(int,input().split())
print(abs(a-b)+abs(b-c))

a,b,c=map(int,input().split())
print(abs(a-b)+abs(b-c)+abs(a-c)-max(abs(a-b),abs(b-c),abs(a-c)))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
aa = map(int,input().split())
print(max(aa)-min(aa))

aa = list(map(int,input().split()))
print(max(aa)-min(aa))

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
a = [int(i) for i in input().split()]
a.sort()
b = [a[2]-a[1], a[1]-a[0], a[2]-[0]]
print(sum(b)-max(b))

a, b, c = map(int, input().split())

m = min(abs(a - b) + abs(b - c), abs(a - c) + abs(c - b), abs(b - a) + abs(a - c))
print(m)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
a = map(int, input.split())
a = sorted(a)
ans = 0
ans += a[1] - a[0]
ans += a[2] - a[1]
print(ans)

a = map(int, input().split())
a = sorted(a)
ans = 0
ans += a[1] - a[0]
ans += a[2] - a[1]
print(ans)


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
A = list(map(int, input().split()))

A = sorted(A)
ans = a[2] - a[0]
print(ans)

A = list(map(int, input().split()))

A = sorted(A)
ans = A[2] - A[0]
print(ans)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
li = list(map(int,input().split(" ")))
first =li[0]
el = li[1:]
el.sort()
s = 0
for i in el:
    s += i - first
    first = i


li = list(map(int,input().split(" ")))
li.sort()
print(li[2]-li[0])

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
*a = map(input().split())
print(max(a)-min(a))

*a = map(int,input().split())
print(max(a)-min(a))


#ABC103A
a = sorted(list(map(int,input().split())))
print((a[1]-a[0]) + (a[2]-a[1]))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
l = [int(i) for i in input().split()] 
ans = 0

for i in range(len(l) - 1):
	if l[i+1] < l[i]:
	tmp = l[i+1]
	l[i+1] = l[i]
	l[i] = tmp

for i in range(len(l) - 1):
	ans += l[i+1] - l[i]

print(ans)

l = [int(i) for i in input().split()] 
l_sort = np.sort(l)
l_diff = np.diff(l_sort)
 
print(np.sum(l_diff))

l = [int(i) for i in input().split()] 
ans = 0
 
for i in range(len(l) - 1):
	if l[i+1] < l[i]:
      tmp = l[i+1]
      l[i+1] = l[i]
      l[i] = tmp

for i in range(len(l) - 1):
	ans += l[i+1] - l[i]

print(ans)

l = [int(i) for i in input().split()] 
ans = 0
 
for i in range(len(l) - 1):
	if l[i+1] < l[i]:
	tmp = l[i+1]
	l[i+1] = l[i]
	l[i] = tmp
    
for i in range(len(l) - 1):
	ans += l[i+1] - l[i]
    
print(ans)

import numpy as np

l = [int(i) for i in input().split()] 
l_sort = np.sort(l)
l_diff = np.diff(l_sort)

print(np.sum(l_diff))

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
A=list(map(int,input().split()))
X=abs(A[0]-A[1])
Y=abs(A[2]-A[0])
Z=abs(A[1]-A[2])
print(min(Y+X,max(X+Z,Y+Z)))

A=list(map(int,input().split()))
X=abs(A[0]-A[1])
Y=abs(A[2]-A[0])
Z=abs(A[1]-A[2])
print(min(Y+X,max(X+Z,Y+Z)))

*a,=map(int,input().split())
print(max(a)-min(a))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a = map(int, input().split())
print(max(a) - min(a))

a = list(map(int, input().split()))
print(max(a) - min(a))


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
S = input()
T = input()

if S == T:
    print('Yes')
l = len(S)
L = list(S)
for i in range(l):
    a = L[0]
    del L[0]
    L.append(a)
    s = ''.join(L)
    if s == T:
        print('Yes')
        break
else:
    print('No')

a = list(map(int,input().split()))
A = a.sort()

print(A[2]-A[0])

a = list(map(int,input().split()))
a.sort()

print(a[2]-a[0])

Verdicts: Runtime Error

Runtime Error

Accepted