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(); // ์ž์—ฐ์ˆ˜
sc.close();
for(int i=0; i<N; i++){ // 0๋ถ€ํ„ฐ ๋ถ„ํ•ดํ•ฉ ๊ฒ€์‚ฌ
int decompos=i; // ๋ถ„ํ•ดํ•ฉ์ด ๋  ๋ณ€์ˆ˜
String numtoString = Integer.toString(i); // ๊ฐ ์ž๋ฆฌ์ˆ˜๋ฅผ ๋”ํ•˜๊ธฐ ์œ„ํ•ด N์„ ๋ฌธ์ž์—ด๋กœ ๋ฐ”๊ฟˆ
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int [][]a = new int[3][2];
for(int i=0; i<a.length; i++)
for(int j=0; j<a[0].length; j++)
a[i][j] = sc.nextInt();
if (a[0][0] == a[1][0]) { // 30 == 10
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
sc.close();
int count=1; // ๋ช‡ ๋ฒˆ์งธ ์ˆซ์ž์ธ์ง€ ์„ธ๋Š” ๋ณ€์ˆ˜
for(int i=666; ;i++){
String numToString = Integer.toString(i);
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
StringBuilder sb = new StringBuilder(); // ์ถœ๋ ฅ์ด ๋งŽ์œผ๋ฏ€๋กœ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
int N = sc.nextInt();
int [][]pos = new int[N][2];
for(int i=0; i<N; i++){
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
StringBuilder sb = new StringBuilder(); // ์ถœ๋ ฅ์ด ๋งŽ์œผ๋ฏ€๋กœ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
int N = sc.nextInt();
int [][]pos = new int[N][2];
for(int i=0; i<N; i++){
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
StringBuilder sb = new StringBuilder(); // ์ถœ๋ ฅ์ด ๋งŽ์œผ๋ฏ€๋กœ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
int N = sc.nextInt();
TreeSet<String> treeWords = new TreeSet<String>(); // ํŠธ๋ฆฌ์…‹์„ ์‚ฌ์šฉํ•˜์—ฌ ์ž๋™์ค‘๋ณต ์ œ๊ฑฐ
for (int i=0; i<N; i++)
treeWords.add(sc.next());
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int []A = new int[N];
int []B = new int[N];
int S=0;
for(int i=0; i<N; i++)
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
StringBuilder sb = new StringBuilder();
int N = sc.nextInt();
String [][]member = new String[N][2];
for(int i=0; i<N; i++){
member[i][0] = sc.next(); // ๋‚˜์ด
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int K = sc.nextInt();
Stack<Integer> stack = new Stack<>();
for(int i=0; i<K; i++){
int input = sc.nextInt();
if(input==0) stack.pop();
import java.util.*;
public class Main {
static char field[][];
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
sc.close();
field = new char[N][N];
StringBuilder sb = new StringBuilder();