Skip to content

Instantly share code, notes, and snippets.

View dalcon10028's full-sized avatar
๐ŸŸ

dalcon dalcon10028

๐ŸŸ
View GitHub Profile
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(" ");
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("*");
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];
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){
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)
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++){
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++)
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++){
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++)
import java.util.*;
class Solution {
static boolean[] notPrime, visited, result;
static String[] num, papers;
public int solution(String numbers) {
papers = numbers.split("");
// ๋งŒ๋“ค ์ˆ˜ ์žˆ๋Š” ์ œ์ผ ํฐ ์ˆซ์ž๋ฅผ ๋งŒ๋“ค์–ด ์ตœ๋Œ€๋ฒ”์œ„๋ฅผ ํ• ๋‹นํ•ด์ค๋‹ˆ๋‹ค.
String temp="";