[백준/Java] 2920번 음계
-Code import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] nums = new int[8]; int[] arr1 = {1, 2, 3, 4, 5, 6, 7, 8}; int[] arr2 = {8, 7, 6, 5, 4, 3, 2, 1}; for (int i = 0; i < nums.length; i++) { nums[i] = sc.nextInt(); } if (Arrays.equals(nums, arr1)){ System.out.println("ascending"); } else if..
2022. 4. 17.