Open hwangnk1004 opened 4 years ago
문제 http://59.23.150.58/30stair/dup/dup.php?pname=dup
import java.util.Scanner;
public class Main { public static void main(String args[]) {
Scanner scanner = new Scanner(System.in); int[] arr = new int[10]; for (int i = 0; i < arr.length; i++) { arr[i] = scanner.nextInt(); } int kk = 0; for (int i = 0; i < arr.length - 1; i++) { int count = 0; for (int j = i + 1; j < arr.length; j++) { if (arr[i] == arr[j]) { count++; arr[j] = 11; } } if (count > 0) { arr[i] = 11; } } for (int i = 0; i < arr.length; i++) { if (arr[i] < 11) { System.out.print(arr[i] + " "); } } }
}
문제 http://59.23.150.58/30stair/dup/dup.php?pname=dup
답
import java.util.Scanner;
public class Main { public static void main(String args[]) {
}