[SWEA][D2] 1946. 간단한 압축 풀기 Java
·
알고리즘 문제풀이
import java.util.Scanner; public class simpleDecode { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int T; T = sc.nextInt(); for (int test_case = 1; test_case
[SWEA][D2] 1948. 날짜 계산기 Java
·
알고리즘 문제풀이
import java.util.Scanner; public class dateCal { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int T; T=sc.nextInt(); int[] dateArray = {0 , 0 , 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365}; for(int test_case = 1; test_case
[SWEA][D2] 1954. 달팽이 숫자 Java
·
알고리즘 문제풀이
import java.util.Scanner; public class snailQuiz { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int T; T=sc.nextInt(); for(int test_case = 1; test_case = N || ny = N || snailArray[nx][ny] != 0){ d = (d + 1) % 4; //방향바꿈 nx = xIndex + dx[d]; ny = yI..
[SWEA][D2] 1959. 두 개의 숫자열 Java
·
알고리즘 문제풀이
import java.util.Scanner; import java.io.FileInputStream; public class twoArray { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int T; T = sc.nextInt(); for (int test_case = 1; test_case M) { // A가 더클경우 for (int i = 0; i
[SWEA][D2] 1989. 초심자의 회문 검사 Java
·
알고리즘 문제풀이
import java.util.Scanner; public class palindrome { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int T; T=sc.nextInt(); sc.nextLine(); for(int test_case = 1; test_case
[SWEA][D2] 1961. 숫자 배열 회전 Java
·
알고리즘 문제풀이
import java.util.Scanner; public class numberArrayRotation { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int T; T=sc.nextInt(); sc.nextLine(); for(int test_case = 1; test_case = 0; j--) { System.out.print(numArray[j][i]); } System.out.print(" "); ..