This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.*; | |
| public class Main { | |
| public static void main(String[] args) { | |
| Scanner sc = new Scanner(System.in); | |
| int n = sc.nextInt(); | |
| for (int i=0; i<2*n-1; i++){ | |
| if (i<n){ | |
| for (int j=0; j<i; j++) | |
| System.out.print(" "); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.*; | |
| public class Main { | |
| public static void main(String[] args) { | |
| Scanner sc = new Scanner(System.in); | |
| int n = sc.nextInt(); | |
| for (int i=1; i<=2*n-1; i++){ | |
| if (i<=n){ | |
| for(int j=0; j<i; j++) | |
| System.out.print("*"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.*; | |
| public class Main { | |
| static LinkedList<Integer> queue = new LinkedList<>(); | |
| public static void main(String[] args) { | |
| Scanner sc = new Scanner(System.in); | |
| int n = sc.nextInt(); | |
| int m = sc.nextInt(); | |
| int result = 0; | |
| int[] input = new int[m]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.*; | |
| public class Main { | |
| public static void main(String[] args) { | |
| Scanner sc = new Scanner(System.in); | |
| int n = sc.nextInt(); | |
| int[] num = new int[2]; // 2์ ๋ฐฐ์๋ 0, 5์ ๋ฐฐ์๋ 1 | |
| for(int i=1; i<=n; i++){ | |
| int tmp=i; | |
| while(tmp%2==0){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static String solution(String[] participant, String[] completion) { | |
| HashMap<String, Integer> map = new HashMap<>(); | |
| for (String str : participant){ | |
| if (map.containsKey(str)) | |
| map.put(str, map.get(str)+1); | |
| else map.put(str, 1); | |
| } | |
| for (String str : completion) | |
| map.put(str, map.get(str)-1); | |
| for (String str : participant) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.*; | |
| public class Main { | |
| public static void main(String[] args) { | |
| Scanner sc = new Scanner(System.in); | |
| int t =sc.nextInt(); | |
| for(int i=0; i<t; i++){ | |
| HashMap<String, Integer> map = new HashMap<>(); | |
| int n=sc.nextInt(); | |
| for(int j=0; j<n; j++){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.*; | |
| public class Main { | |
| static int[][] field; | |
| static int[] count = new int[3]; // 0: -1, 1: 0, 2: 1 | |
| public static void main(String[] args) { | |
| Scanner sc = new Scanner(System.in); | |
| int n = sc.nextInt(); | |
| field = new int[n][n]; | |
| for(int i=0; i<n; i++) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.*; | |
| public class Main { | |
| static int[][] field; | |
| static StringBuilder sb = new StringBuilder(); | |
| public static void main(String[] args) { | |
| Scanner sc = new Scanner(System.in); | |
| int n = sc.nextInt(); | |
| field = new int[n][n]; | |
| for(int i=0; i<n; i++){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.*; | |
| public class Main { | |
| static int[][] field; | |
| static int white = 0, blue = 0; | |
| public static void main(String[] args) { | |
| Scanner sc = new Scanner(System.in); | |
| int n = sc.nextInt(); | |
| field = new int[n][n]; | |
| for(int i=0; i<n; i++) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.*; | |
| class Solution { | |
| static boolean[] notPrime, visited, result; | |
| static String[] num, papers; | |
| public int solution(String numbers) { | |
| papers = numbers.split(""); | |
| // ๋ง๋ค ์ ์๋ ์ ์ผ ํฐ ์ซ์๋ฅผ ๋ง๋ค์ด ์ต๋๋ฒ์๋ฅผ ํ ๋นํด์ค๋๋ค. | |
| String temp=""; |