Problem:


Score : 100 points

Problem Statement

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.

Constraints

All values in input are integers.

1 \leq A_1, A_2, A_3 \leq 100

Input

Input is given from Standard Input in the following format:

A_1 A_2 A_3

Output

Print the minimum total cost required to complete all the task.

Sample Input 1

1 6 3

Sample Output 1

5

When the tasks are completed in the following order, the total cost will be 5, which is the minimum:

Complete the first task at cost 0.

Complete the third task at cost 2.

Complete the second task at cost 3.

Sample Input 2

11 5 5

Sample Output 2

6

Sample Input 3

100 100 100

Sample Output 3

0



Sample input:
1 6 3


Sample output:
5

Submission status: Wrong Answer

Solution code:
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]))

Submission status: Wrong Answer

Solution code:
a = [int(x) for x in input().split()]
a1 = abs(a[1] - a[0]) + abs(a[1] - a[2])
a2 = abs(a[2] - a[0]) + abs(a[2] - a[1])
print(min(a1,a2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a1,a2,a3=map(int,input().split())
print(abs((a3-a2)+(a2-a1)))

Submission status: Wrong Answer

Solution code:

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

Submission status: Wrong Answer

Solution code:

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

Submission status: Wrong Answer

Solution code:
l = sorted([int(x) for x in input().split()])
print(min(l[2] - l[1] - l[0], l[2] - (l[1] - l[0])))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
_,*l = [list(map(int,i.split())) for i in open(0)]
l.sort(key=lambda x:x[1])
A=S=0
for s,t in l:
    if S<=s:
        A+=1
        S=t
print(A)

Submission status: Wrong Answer

Solution code:
a1, a2, a3 = map(int, input().split())
if (a1 <= a2 and a2 <= a3) and (a3 <= a2 and a2 <= a1):
    print(abs(a2 - a1) + abs(a3 - a2))
elif (a2 <= a1 and a1 <= a3) and (a3 <= a1 and a1 <= a2):
    print(abs(a1 - a2) + abs(a3 - a1))
else:
    print(abs(a3 - a1) + abs(a2 - a3))

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
t=min(abs(b-a)+abs(c-b),abs(c-a)+abs(b-c),abs(b-c)+abs(a-b))
print(t)

Submission status: Wrong Answer

Solution code:
tmp = list(map(lambda n : int(n), input().split(" ")))
tmp.sort(reverse=True)

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

Submission status: Wrong Answer

Solution code:
a,b,c = map(int,input().split())
ans = min(abs(a-b)+abs(b-c),abs(a-c)+abs(b-c),abs(a-c)+abs(b-c))
print(ans)

Submission status: Wrong Answer

Solution code:
import itertools
a1, a2, a3 = map(int, input().split())
ans = 10 ** 9
for v in itertools.permutations([a1, a2, a3]):
    d = 0
    for i in range(1, 3):
        d += abs(v[i]-v[i-1])
    ans = min(ans, d)
    print(v, d)

print(ans)

Submission status: Wrong Answer

Solution code:
import itertools
a1, a2, a3 = map(int, input().split())
ans = 10 * 9
for v in itertools.permutations([a1, a2, a3]):
    d = 0
    for i in range(1, 3):
        d += abs(v[i]-v[i-1])
    ans = min(ans, d)
print(ans)

Submission status: Wrong Answer

Solution code:
a_lst = list(map(abs, map(int, input().split(" "))))

a_lst.sort()

total = 0
previous = a_lst[0]
for i in a_lst[1:]:
    total += (i - previous)

print(total)

Submission status: Wrong Answer

Solution code:
a_lst = list(map(int, input().split(" ")))

a_lst.sort()

total = 0
previous = a_lst[0]
for i in a_lst[1:]:
    total += (abs(i) - abs(previous))

print(total)

Submission status: Wrong Answer

Solution code:
l=list(map(int,input().split()))
l.sort(reverse=True)
ans=0
bef=l[0]
for i in l:
  ans+=abs(bef-i)
print(ans)

Submission status: Wrong Answer

Solution code:
A = list(map(int,input().split()))

A.sort()

import numpy as np

print(sum(np.cumsum(A) - np.array(A)))

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())
o, p, q = abs(a - b), abs(b - c), abs(c - a)
li = []
li += [o + q]
li += [p + q]
li += [o + q]
print(min(li))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B,C = map(int,input().split())
if abs(A-B)>=abs(A-C):
  print(abs(A-C)+abs(C-B))
else:
  print(abs(A-B)+abs(C-B))

Submission status: Wrong Answer

Solution code:
A,B,C = map(int,input().split())
if abs(A-B)>=abs(A-C):
  print(abs(A-C)+abs(C-B))
else:
  print(abs(A-B)+abs(B-C))

Submission status: Wrong Answer

Solution code:
A,B,C = map(int,input().split())
if abs(A-B)>abs(A-C):
  print(abs(A-C)+abs(C-B))
else:
  print(abs(A-B)+abs(B-C))

Submission status: Wrong Answer

Solution code:
lis = list(map(int,input().split()))
a,b,c = sorted(lis,reverse = True)
print(abs(b-a)+(c-b))

Submission status: Wrong Answer

Solution code:
ns=list(map(int,input().split()))
ns.sort()
print(ns[2]-ns[1])

Submission status: Wrong Answer

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

if a > max(b, c):
    print(a - max(b,c))
elif a < max(b, c):
    print(max(b, c))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a1,a2,a3=map(int,input().split())
l=[a1,a2,a3]
l.sort()
print(l[2]+l[0])

Submission status: Wrong Answer

Solution code:
a1,a2,a3=map(int,input().split())
l=[a1,a2,a3]
l.sort()
print(l[2]-l[1]*2+l[0])

Submission status: Wrong Answer

Solution code:
def ABC_103_A():
    A1,A2,A3 = map(int, input().split())

    cost1 = 0 + abs(A2-A1) + abs(A3-A2)
    cost2 = 0 + abs(A3-A1) + abs(A2-A3)
    cost3 = abs(A1-A2) + 0 + abs(A3-A1)
    cost4 = abs(A2-A3) + 0 + abs(A3-A2)
    cost5 = abs(A1-A3) + abs(A2-A1) + 0
    cost6 = abs(A1-A2) + abs(A2-A3) + 0

    print(min(cost1,cost2,cost3,cost4,cost5,cost6))

if __name__ == '__main__':

    ABC_103_A()

Submission status: Wrong Answer

Solution code:
def ABC_103_A():
    A1,A2,A3 = map(int, input().split())

    cost1 = 0 + abs(A2-A1) + abs(A3-A2)
    cost2 = 0 + abs(A3-A1) + abs(A2-A3)
    print(min(cost1,cost2))

if __name__ == '__main__':

    ABC_103_A()

Submission status: Wrong Answer

Solution code:
a1,a2,a3=map(int,input("A1,A2,A3を\"A1 A2 A3\"のようににゅうりょくしてね！").split())
list=[a1,a2,a3]
print(max(list)-min(list))

Submission status: Wrong Answer

Solution code:
A,B,C=map(int,input().split())
list1=[A,B,C]
sorted(list1,reverse=False)
answer=0
answer=list1[0]-list1[1]
answer=list1[1]-list1[2]+answer
print(answer)

Submission status: Wrong Answer

Solution code:
A,B,C=map(int,input().split())
list1=[A,B,C]
sorted(list1,reverse=False)
answer=0
for i in range(2):
  answer=answer+list1[i]-list1[i+1]
print(answer)

Submission status: Wrong Answer

Solution code:
p,q,r=map(int,input().split())
print(max([abs(p-q)+abs(q-r),abs(q-r)+abs(r-p),abs(p-q)+abs(p-r)]))

Submission status: Wrong Answer

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A = LIST()
print(min(abs(A[0]-A[1])+abs(A[1]-A[2]), abs(A[0]-A[2])+abs(A[2]-A[1])))

Submission status: Wrong Answer

Solution code:
list=[int(i) for i in input().split()]
list.sort()
print(list[2]-list[1])

Submission status: Wrong Answer

Solution code:
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))

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
d=c-a
g=b-c
s=d+g
print(s)

Submission status: Wrong Answer

Solution code:
a,b,c=sorted(map(int,input().split()))
if(a!=b and a!=c and b!=c):
    d=c-a
    g=b-a
    s=d+g
    print(s)
elif(a==b or b==c):
    print(c-a)
else:
    print(b-a)

Submission status: Wrong Answer

Solution code:
a1, a2, a3 = map(int, input().split())
lst = sorted([a1, a2, a3])
print(abs(a2 - a1) + abs(a3 - a2))

Submission status: Wrong Answer

Solution code:
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)))

Submission status: Wrong Answer

Solution code:
icase=0
if icase==0:
    a1,a2,a3=map(int,input().split())
    a=min(abs(a2-a1)+abs(a3-a2),abs(a3-a2)+abs(a1-a3),abs(a1-a3)+abs(a2-a3))
    print(a)

Submission status: Wrong Answer

Solution code:
import math
import collections
import sys

#input = sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]

AS=LI()
AS=sorted(AS)
ans=AS[2]-AS[1]+AS[1]-AS[0]
print(AS)

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))

a.sort()
print(a)
print(a[1]-a[0]+a[2]-a[1])

Submission status: Wrong Answer

Solution code:
a,b,c= input().split()
x,y,z=(int(a),int(b),int(c))
sample_list = [x,y,z]
abs_list = [abs(x-y),abs(x-z)]
abs_max = max(abs_list)
abs_min = min(abs_list)
if x == max(sample_list) or x == min(sample_list):
    print(abs_max)
else:
    print(abs_min*2 + abs_max)

Submission status: Wrong Answer

Solution code:
def Task(al):

    al.sort

    return (al[-1] - al[-2]) + (al[-2] - al[0])

def main():
    al = list(map(int , input().split()))
    print(Task(al))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
A1,A2,A3 = map(int,input().split())
 
x = abs(A1 - A2)
y = abs(A2 - A3)
z = abs(A3 - A1)
 
if x + y <= y + z and x <= z + x:
	print(x + y )
elif y + z <= x + y and  y + z <= z + x:
	print(y + z )
else:
	print(z + x)

Submission status: Wrong Answer

Solution code:
A1,A2,A3 = map(int,input().split())

x = abs(A1 - A2)
y = abs(A2 - A3)
z = abs(A3 - A1)

if x + y <= y + z and x <= z + x:
	print(x + y )
elif y + z <= x + y and  y<= z + x:
	print(y + z )
else:
	print(z + x)

Submission status: Wrong Answer

Solution code:
k=list(map(int,input().split()))
k.sort()
print( abs(k[2]-k[1]) + abs(k[1]-k[2]))

Submission status: Wrong Answer

Solution code:
A1,A2,A3=map(int,input().split())
print(A3-A1)

Submission status: Wrong Answer

Solution code:
A1,A2,A3=map(int,input().split())
if A1!=0 and (A2==0 or A3==0):
    print(abs(A2-A3))
elif abs(A1-A2)>abs(A1-A3):
    a=abs(A1-A3)
    print(a+abs(A3-A2)) 
else :
    a=abs(A1-A2)
    print(a+abs(A2-A3))

Submission status: Wrong Answer

Solution code:
A1,A2,A3=map(int,input().split())
if abs(A1-A2)>abs(A1-A3):
    a=abs(A1-A3)
    print(a+abs(A3-A2))
else :
    a=abs(A1-A2)
    print(a+abs(A2-A3))

Submission status: Wrong Answer

Solution code:
def main():
    a1, a2, a3 = map(int, input().split())
    ans = max(abs(a1 - a2), abs(a2 - a3))
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
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])))

Submission status: Wrong Answer

Solution code:
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]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
lis = map(int, input().split())

lis = sorted(lis)
print(lis[2]-lis[1])

Submission status: Wrong Answer

Solution code:
S=input().split()
A=sorted(S)
print(int(S[2])-int(S[0]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B,C = input().split()
print(A,B,C)

List = [A,B,C]
List.sort() 

cost1 = 0 
cost2 = int(List[1]) - int(List[0])
cost3 = int(List[2])- int(List[1])

print(abs(cost1+cost2+cost3))

Submission status: Wrong Answer

Solution code:
A,B,C = input().split()
print(A,B,C)

List = [A,B,C]
List.sort() 

cost1 = 0 
cost2 = int(List[1]) - int(List[0])
cost3 = int(List[2])- int(List[1])

print(abs(cost1+cost2+cost3))

Submission status: Wrong Answer

Solution code:
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))

Submission status: Wrong Answer

Solution code:
list = [i for i in input().split()]
list.sort()
a = int(list[1]) - int(list[0])
b = int(list[2]) - int(list[1])

print(a + b)

Submission status: Wrong Answer

Solution code:
l=list(map(int,input().split()))
l.sort()
print(l[1]+abs(l[1]-l[2]))

Submission status: Wrong Answer

Solution code:
A=list(map(int,input().split()))
A.sort()
for i in range(len(A)):
  if i==0:
    continue
  else:
    res=A[i]-A[i-1]
print(res)

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
print(min(abs(b-a)+abs(c-b),abs(c-a)+abs(b-c),abs(c-b)+abs(a-b)))

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))

s1 = 0
s2 = 0

s1 = abs(a[1] - a[0]) + abs(a[1] - a[2])
s2 = abs(a[2] - a[0]) + abs(a[2] - a[1])

print(min(s1,s2))

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))

s1 = 0
s2 = 0

s1 = abs(a[1] - a[0]) + abs(a[1] - a[2])
s2 = abs(a[2] - a[0]) + abs(a[2] - a[1])

print(max(s1,s2))

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))

s = 0

if a[1] > a[2]:
    s = abs(a[2] - a[0])
    s = s + abs(a[1] - a[2])
else:
    s = abs(a[1] - a[0])
    s = s + abs(a[1] - a[2])

print(s)

Submission status: Wrong Answer

Solution code:
A1, A2, A3 = map(int, input().split())

if A2 >= A3:
    print(abs(A3 - A1) + abs(A2 - A3))
else:
    print(abs(A2 - A1) + abs(A3 - A2))

Submission status: Wrong Answer

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

s=[abs(a-b),abs(a-c),abs(b-c)]
s.sort()
print(abs(s[0]-s[1]))

Submission status: Wrong Answer

Solution code:
S = list(input())
S.sort()
if S[0] == "a" and S[1] == "b" and S[2] == "c":
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
d=abs(a-b)
e=abs(b-c)
f=abs(c-a)
s1=d+e
s2=e+f
s3=f+d
l=[s1,s2,s3]
l.sort()
print(sum(l[:2]))

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
d=abs(a-b)
e=abs(b-c)
f=abs(c-a)
s1=d+e
s2=e+f
s3=f+d
l=[s1,s2,s3]
l.sort()
print(sum(l[1:]))

Submission status: Wrong Answer

Solution code:
lst = list(map(int, input().split()))
sor = sorted(lst)
cost = 0
for i in range(len(sor)):
    if i == 0:
        continue
    else:
        cost = abs(sor[i]-sor[i-1])
print(cost)

Submission status: Wrong Answer

Solution code:
a, b, c = map(lambda x: int(x), input().split())

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

Submission status: Wrong Answer

Solution code:
A = list(map(int, input().split()))
A.sort()
ans = abs(A[2]+A[1])+abs(A[1]+A[0])
print(ans)

Submission status: Wrong Answer

Solution code:
A = list(map(int, input().split()))
# print(A)
print(min(abs(A[0]-A[1])+abs(A[1]-A[2]), abs(A[0]-A[2])+abs(A[1]-A[2])))

Submission status: Wrong Answer

Solution code:
L = sorted(map(int, input().split()))
ans = max(L) - min(L)
print('ans')

Submission status: Wrong Answer

Solution code:
a1, a2, a3 = [int(x) for x in input().split()]
print(a3-a1)

Submission status: Wrong Answer

Solution code:
a1, a2, a3 = [int(x) for x in input().split()]
print(min(a1, a2, a3))

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
A,B,C=map(int, input().split())
saidai=max(A,B,C)
kotae=A+B+C-saidai+1
print(kotae)

Submission status: Wrong Answer

Solution code:
a_L = list(map(int,input().split()))
a_L = list(sorted(a_L))

cost = a_L[0]-a_L[1] + a_L[2]-a_L[1]
print(cost)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a1, a2, a3 = map(int, input().split())
cost1 = abs(a2 - a1) + abs(a3 - a2)
cost2 = abs(a3 - a1) + abs(a2 - a3)
costs = [cost1, cost2]
print(min(costs))

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))

ans = 10**5
for i in range(3):
    for j in range(3):
        for k in range(3):
            if i != j and j != k and i != k:
                cost = abs(a[j] - a[i]) + abs(a[k] - a[j])
                print(cost, i, j, k)
                if ans > cost:
                    ans = cost
print(ans)

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())
if abs(a-b) > abs(a-c):
    print(abs(a-c) + abs(c-b))
else:
    print(abs(a-b) + abs(b-c))

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
a = a[::-1]
cost = 0
for i in range(len(a)-1):
  print(a[i+1],a[i])
  cost += a[i+1]-a[i]
print(cost)

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
cost = 0
for i in range(len(a)-1):
  cost += a[i+1]-a[i]
print(cost)

Submission status: Wrong Answer

Solution code:
N = list(map(int,input().split()))
N.sort()

A = abs(abs(N[0]-N[1])-N[2])
print(A)

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
print(min(abs(a-b)+abs(b-c),abs(a-c)+abs(b-c)))

Submission status: Wrong Answer

Solution code:
a = sorted(map(int,input().split()))
a[0]=0
cost = 0
for i in range(len(a)-1):
  cost += a[i+1]-a[i]
print(cost)

Submission status: Wrong Answer

Solution code:
a = sorted(map(int,input().split()))
a[0]=0
cost = 0
for i in range(1,len(a)-1):
  cost += a[i+1]-a[i]
print(cost)

Submission status: Wrong Answer

Solution code:
a = sorted(map(int,input().split()))

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

Submission status: Wrong Answer

Solution code:
a1, a2, a3=map(int, input().split())
temp=[a1, a2, a3]
print(a3-a1)

Submission status: Wrong Answer

Solution code:
a = input().split()
max = max(a)
a1, a2, a3 = map(int, a)
print((a3-a1) + (a2-a3) if (a3-a1) + (a2-a3) > 0 else ((a3-a1) + (a2-a3)) * -1)

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
d,e,f=abs(a-b),abs(a-c),abs(b-c)
print(d+e+f-min(d,e,f))

Submission status: Wrong Answer

Solution code:
A,B,C=map(int,input().split())

D=abs(A-B)
E=abs(B-C)
F=abs(C-A)

if D>=E and D>=F:
  print(E+F)
elif E>=D and E>=F:
  print(D+F)
elif F>=D and F>=E:
  print(E+F)

Submission status: Wrong Answer

Solution code:
A,B,C=map(int,input().split())

D=abs(A-B)
E=abs(B-C)
F=abs(C-A)

if D>E and D>F:
  print(E+F)
elif E>D and E>F:
  print(D+F)
else:
  print(E+F)

Submission status: Wrong Answer

Solution code:
A,B,C=map(int,input().split())

D=abs(A-B)
E=abs(B-C)
F=abs(C-A)

if D<E and D<F:
  print(E+F)
elif E<D and E<F:
  print(D+F)
else:
  print(E+F)

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())
ab = abs(a-b)
bc = abs(b-c)
ca = abs(c-a)
if ab + bc <= bc + ca:
    if ab + bc <= ab + ca:
        print(ab+bc)
elif bc + ca <= ab + ca:
    print(bc + ca)
else:
    print(ab + ca)

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())
ab = abs(a-b)
bc = abs(b-c)
ca = abs(c-a)
if ab + bc < bc + ca:
    if ab + bc <= ab + ca:
        print(ab+bc)
elif bc + ca < ab + ca:
    print(bc + ca)
else:
    print(ab + ca)

Submission status: Wrong Answer

Solution code:
A = list(map(int, input().split()))
ans = min(A)
for a in sorted(A):
    ans = abs(ans-a)
print(ans)

Submission status: Wrong Answer

Solution code:
a1,a2,a3 = map(int,input().split())
if abs(a1-a2) < abs(a1-a3):
    print(abs(a2-a1)+abs(a3-a2))
else:
    print(abs(a3-a1)+abs(a3-a2))

Submission status: Wrong Answer

Solution code:
a1,a2,a3 = map(int,input().split())
if abs(a1-a2) < abs(a1-a3):
    print(abs(a2-a1)+abs(a3-a2))
else:
    print(abs(a3-a1)+abs(a1-a2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b, c = map(int, input().split())
print(c-a)

Submission status: Wrong Answer

Solution code:
cost=list(map(int,input().split()))
cost.sort()
print(cost[2] + cost[1])

Submission status: Wrong Answer

Solution code:
A1,A2,A3 = map(int,input().split())

dif = [abs(A1-A2),abs(A2-A3),abs(A3-A1)]
print(sum(dif[1:3]))

Submission status: Wrong Answer

Solution code:
*a,=map(int,input().split())
print(type(a))
print(max(a)-min(a))

Submission status: Wrong Answer

Solution code:
a,b,c=map(int,input().split())
print(c-a)

Submission status: Wrong Answer

Solution code:
L=list(map(int,input().split()))
L.sort()
a=0
for i in range(len(L)-1):
    a+=L[i]-L[i-1]
    #print(i)
print(a)

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
cost = 0
if abs(a[0] - a[1]) <= abs(a[0] - a[2]):
    cost += abs(a[0] - a[1])
    cost += abs(a[1] - a[2])
else:
    cost += abs(a[0] - a[2])
    cost += abs(a[2] - a[1])
print(cost)

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
cost = 0
if abs(a[0] - a[1]) <= abs(a[0] - a[2]):
    cost += abs(a[0] - a[1])
    cost += abs(a[1] - a[2])
else:
    cost += abs(a[0] - a[2])
    cost += abs(a[1] - a[2])
print(cost)

Submission status: Wrong Answer

Solution code:
a0, a1, a2 = list(map(int, input().split()))
print(
    min(
        abs(a0 - a1) + abs(a1 - a2),
        abs(a0 - a2) + abs(a2 - a1),
        abs(a1 - a2) + abs(a2 - a0)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
task = list(map(int,input().split()))
task.sort(reverse = True)
print(2*task[1]-task[2])

Submission status: Wrong Answer

Solution code:
s=list(input().split())
s.sort()
total=int(s[2])-int(s[0])
print(total)

Submission status: Wrong Answer

Solution code:
def main(a: list):
    a = sorted(a)

    cost = 0

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

    return cost


if __name__ == '__main__':
    print(main(list(map(int, input().split(' ')))))

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

Solution code:
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])
))

Submission status: Wrong Answer

Solution code:
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])
))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import numpy as np
a = list(map(int, input().split()))
a.sort
np_a = np.array(a)
temp = np_a - np_a[0]
print(np.max(np.abs(temp)))

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
print(max(a[0] - a[1] + a[1] - a[2],
          a[1] - a[2] + a[2] - a[0],
          a[2] - a[0] + a[0] - a[1]))

Submission status: Wrong Answer

Solution code:
As = sorted(list(map(int, input().split())), reverse=True)

cost = 0
for a, b in zip(As[:-1], As[1:]):
  cost = abs(a-b)
  
cost -= As[0]
print(cost)

Submission status: Wrong Answer

Solution code:
def main():
    A = list(map(int, input().split()))

    sort_A = sorted(A)
    print(sort_A[2] + sort_A[1] - 2*sort_A[0])

main()

Submission status: Wrong Answer

Solution code:
def main():
    A = list(map(int, input().split()))

    sort_A = sorted(A)
    print(A[2] + A[1] - 2*A[0])

main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=sorted(input().split())
print(int(a[-1])-int(a[0]))

Submission status: Wrong Answer

Solution code:
a1, a2, a3 = map(int,input().split())
print(min(abs(a1 - a2), abs(a2 - a3), abs(a3 - a1)))

Submission status: Wrong Answer

Solution code:
A1,A2,A3=map(int,input().split())

if abs(A1-A2)==abs(A2-A3):
    print(abs(A1-A2)+abs(A2-A3)+abs(A3-A1)-abs(A1-A2))
elif abs(A2-A3)==abs(A3-A1):
    print(abs(A1-A2)+abs(A2-A3)+abs(A3-A1)-abs(A2-A3))
elif abs(A3-A1)==abs(A1-A2):
    print(abs(A1-A2)+abs(A2-A3)+abs(A3-A1)-abs(A3-A1))
else :
    print(abs(A1-A2)+abs(A2-A3)+abs(A3-A1)-max(A1-A2,A2-A3,A3-A1))

Submission status: Wrong Answer

Solution code:
A1,A2,A3=map(int,input().split())

print(abs(A1-A2)+abs(A2-A3)+abs(A3-A1)-max(A1-A2,A2-A3,A3-A1))

Submission status: Wrong Answer

Solution code:
a,b,c=sorted(map(int,input().split()))
s=(b-a)+(c-b)
s

Submission status: Wrong Answer

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

if min(b, c) < a < max(b, c):
    print(min(abs(a - b), abs(a - c)) + abs(b - c))
else:
    print(max(abs(a - b), abs(a - c)))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a1,a2,a3 = map(int, input().split())
print(min(abs(a1-a2),abs(a1-a3),abs(a2-a3)))

Submission status: Wrong Answer

Solution code:
Tmp = []
Tmp = input().rstrip().split(' ')

Ans = []

for i in range(3):
  nTmp = int(Tmp[i])
  
  Ans.append(nTmp)

Ans.sort()

nAns = (Ans[1]-Ans[0])
nAns += Ans[2]-Ans[1]

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    a, b, c = LI()
    ans = 10 ** 5
    ans = min(ans, abs(a - b) + abs(b - c))
    ans = min(ans, abs(a - c) + abs(b - c))
    print(ans)
    

    return

#B
def B():
    return

#C
def C():
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    A()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
As = input().split()
print(int(max(As))-int(min(As)))

Submission status: Wrong Answer

Solution code:
a = input().split()
sort_a = sorted(a)
ans = int(sort_a[-1])-int(sort_a[0])
print(ans)

Submission status: Wrong Answer

Solution code:
a = input(int()).split()
sort_a = sorted(a)
ans = int(sort_a[-1])-int(sort_a[0])
print(ans)

Submission status: Wrong Answer

Solution code:
line = input()
words = line.split()
num_list = []
for word in words:
    num_list.append(int(word))
ans = 0
for num in num_list:
    ans = ans + num-1

print(ans)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
 
 
def solve(A: "List[int]"):
    print(abs(A[0] - A[1]) + abs(A[1] - A[2]))
    return
 
 
# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = [ int(next(tokens)) for _ in range(3) ]  # type: "List[int]"
    solve(A)
 
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
a.sort()
print(a[1] - a[0])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
tsk=list(map(int,input().split()))
tsk.sort(reverse=True)
ans=0
for i in range(2):
  ans+=tsk[i]-tsk[i+1]

Submission status: Wrong Answer

Solution code:
a = [int(x) for x in input().split()]
a.sort(reverse=True)
a[0] = 0
a[2] = a[1] - a[2]
print(sum(a))

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
a.sort()
t = a[0]
count = 0
for i in range(1,2):
  count += abs(a[i] - t)
  t = a[i]
print(count)

Submission status: Wrong Answer

Solution code:
a, b, c = (int(_) for _ in input().split())  
print(abs(a - b)+abs(b - c))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
	A1, A2, A3 = map(int, input().split())
	print(min(abs(A2-A1), abs(A3-A1))+abs(A3-A2))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
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))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
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))