[SWEA][D1] 2070. 큰 놈, 작은 놈, 같은 놈 Java
·
Coding/알고리즘 문제풀이
import java.util.Scanner; class Solution { public static void main(String args[]) throws Exception { Scanner sc = new Scanner(System.in); int T; T=sc.nextInt(); for(int test_case = 1; test_case B){ result = ">"; } else if (A == B) { result = "="; }else{ result = "..
[SWEA][D1] 2068. 최대수 구하기 Java
·
Coding/알고리즘 문제풀이
import java.util.Scanner; class Solution { public static void main(String args[]) throws Exception { Scanner sc = new Scanner(System.in); int T; T=sc.nextInt(); for(int test_case = 1; test_case result) result = value; } System.out.println("#"+test_case +" "+ result); } } }
[SWEA][D1] 2063. 중간값 찾기 Java
·
Coding/알고리즘 문제풀이
import java.util.Arrays; import java.util.Scanner; class Solution { public static void main(String args[]) throws Exception { Scanner sc = new Scanner(System.in); int N; N = sc.nextInt(); int[] values = new int[N]; for (int i = 0; i
[SWEA][D1] 2058. 자릿수 더하기 Java
·
Coding/알고리즘 문제풀이
import java.util.Scanner; class Solution { public static void main(String args[]) throws Exception { Scanner sc = new Scanner(System.in); int N; N = sc.nextInt(); int sum = 0; while (N > 0){ sum = sum + (N % 10); N = N / 10; } System.out.print(sum); } }
[SWEA][D1] 2056. 연월일 달력
·
Coding/알고리즘 문제풀이
import java.util.Scanner; class Solution { public static void main(String args[]) throws Exception { Scanner sc = new Scanner(System.in); int T; T=sc.nextInt(); sc.nextLine(); for(int test_case = 1; test_case 12 ){ System.out.println("#"+test_case + " -1"); continue; } in..
[SWEA][D1] 2050. 알파벳을 숫자로 변환 Java
·
Coding/알고리즘 문제풀이
import java.util.Scanner; class Solution { public static void main(String args[]) throws Exception { Scanner sc = new Scanner(System.in); String input; input=sc.next(); for (int i = 0; i