public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int[] array = new int[m]; LinkedList<Integer> list =new LinkedList<Integer>(); if(n>0 && m<=n){ for(Integer i=1;i<=n;i++){...