import java.util.Arrays;import java.util.Scanner;public class Main{public static void main(String[] args){int output=0;Scanner scanner=new Scanner(System.in);String s=scanner.nextLine();scanner.close();String[] str=s.split(" ",0);int[] input=new int[str.length];for(int i=0;i<str.length;i++){input[i]=Integer.parseInt(str[i]);}Arrays.sort(input);for(int i=0;i<input.length-1;i++){output+=input[i+1]-input[i];}System.out.println(output);}} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main{public static void main(String[] args){int output=0;Scanner scanner=new Scanner(System.in);String s=scanner.nextLine();scanner.close();String[] str=s.split(" ",0);int[] input=new int[str.length];for(int i=0;i<str.length;i++){input[i]=Integer.parseInt(str[i]);}Arrays.sort(input);for(int i=0;i<input.length-1;i++){output+=input[i+1]-input[i];}System.out.println(output);}} Main public static void main(String[] args){int output=0;Scanner scanner=new Scanner(System.in);String s=scanner.nextLine();scanner.close();String[] str=s.split(" ",0);int[] input=new int[str.length];for(int i=0;i<str.length;i++){input[i]=Integer.parseInt(str[i]);}Arrays.sort(input);for(int i=0;i<input.length-1;i++){output+=input[i+1]-input[i];}System.out.println(output);} main {int output=0;Scanner scanner=new Scanner(System.in);String s=scanner.nextLine();scanner.close();String[] str=s.split(" ",0);int[] input=new int[str.length];for(int i=0;i<str.length;i++){input[i]=Integer.parseInt(str[i]);}Arrays.sort(input);for(int i=0;i<input.length-1;i++){output+=input[i+1]-input[i];}System.out.println(output);} int output=0; output 0 Scanner scanner=new Scanner(System.in); scanner new Scanner(System.in) String s=scanner.nextLine(); s scanner.nextLine() scanner.nextLine scanner scanner.close() scanner.close scanner String[] str=s.split(" ",0); str s.split(" ",0) s.split s " " 0 int[] input=new int[str.length]; input new int[str.length] str.length str str.length for(int i=0;i<str.length;i++){input[i]=Integer.parseInt(str[i]);} int i=0; int i=0; i 0 i<str.length i str.length str str.length i++ i++ i {input[i]=Integer.parseInt(str[i]);} {input[i]=Integer.parseInt(str[i]);} input[i]=Integer.parseInt(str[i]) input[i] input i Integer.parseInt(str[i]) Integer.parseInt Integer str[i] str i Arrays.sort(input) Arrays.sort Arrays input for(int i=0;i<input.length-1;i++){output+=input[i+1]-input[i];} int i=0; int i=0; i 0 i<input.length-1 i input.length-1 input.length input input.length 1 i++ i++ i {output+=input[i+1]-input[i];} {output+=input[i+1]-input[i];} output+=input[i+1]-input[i] output input[i+1]-input[i] input[i+1] input i+1 i 1 input[i] input i System.out.println(output) System.out.println System.out System System.out output String[] args args public class Main{public static void main(String[] args){int output=0;Scanner scanner=new Scanner(System.in);String s=scanner.nextLine();scanner.close();String[] str=s.split(" ",0);int[] input=new int[str.length];for(int i=0;i<str.length;i++){input[i]=Integer.parseInt(str[i]);}Arrays.sort(input);for(int i=0;i<input.length-1;i++){output+=input[i+1]-input[i];}System.out.println(output);}} public class Main{public static void main(String[] args){int output=0;Scanner scanner=new Scanner(System.in);String s=scanner.nextLine();scanner.close();String[] str=s.split(" ",0);int[] input=new int[str.length];for(int i=0;i<str.length;i++){input[i]=Integer.parseInt(str[i]);}Arrays.sort(input);for(int i=0;i<input.length-1;i++){output+=input[i+1]-input[i];}System.out.println(output);}} Main
import java.util.Arrays;import java.util.Scanner;public class Main{public static void main(String[] args){int output=0;Scanner scanner=new Scanner(System.in);String s=scanner.nextLine();scanner.close();String[] str=s.split(" ",0);int[] input=new int[str.length];for(int i=0;i<str.length;i++){input[i]=Integer.parseInt(str[i]);}Arrays.sort(input);for(int i=0;i<input.length-1;i++){output+=input[i+1]-input[i];}System.out.println(output);}}