[SWEA][D2] 2007. 패턴 마디의 길이 Java
·
알고리즘 문제풀이
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
[SWEA][D2] 1926. 간단한 369게임 Java
·
알고리즘 문제풀이
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 i = 1; i 0){ if(j%10 == 3 || j%10 == 6 || j%10 == 9){ result.append("-"); } j = j /10; ..
[SWEA][D2] 1859. 백만 장자 프로젝트 Java
·
알고리즘 문제풀이
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 = 0 ; i--) { if(maxPrice 1. 자료형을 생각할것! long을 쓸수도있음2. 거꾸로 계산하는 방법으로 문제를 풀수 있다는 사실을 생각할것
[SWEA][D2] 21425. += Java
·
알고리즘 문제풀이
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
[SWEA][D1] 2070. 큰 놈, 작은 놈, 같은 놈 Java
·
알고리즘 문제풀이
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
·
알고리즘 문제풀이
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); } } }