본문 바로가기
728x90
반응형

알고리즘138

[백준]2438_별 찍기 - 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.StringTokenizer; public class Main { public static void main(String args[]) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st; int N = Integer.. 2022. 2. 15.
[백준]3040_백설 공주와 일곱 난쟁이 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.io.StringReader;import java.util.Arrays;import java.util.StringTokenizer; public class Main { static int N, R, sum; static int[] input, numbers;// static String str = "8\r\n" + //.. 2022. 2. 15.
[백준10818_최소, 최대 12345678910111213141516171819202122232425import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.Arrays;import java.util.StringTokenizer; public class Main { public static void main(String args[]) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringBuilder sb = new StringBuilder(); StringTokenizer.. 2022. 2. 15.
st-> readLine() |vs| str->read() 1) st-> readLine() //테케의 값이 떨어져있는 경우 1 2 3 4 st = new StringTokenizer(br.readLine()); for(int i=0;iread()//테케의 값이 붙어있는 경우(문자열을 문자로 하나씩 읽고, 문자를 숫자로)-정수인 경우 1 2 3 4 5 for (int n = 0; n 2022. 2. 15.
[백준]8393_합 12345678910111213141516171819import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader; public class Main { public static void main(String args[]) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringBuilder sb = new StringBuilder(); int N = Integer.parseInt(br.readLine()); int sum = 0; for (int i = 1; i 2022. 2. 15.
[백준]2739_구구단 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String args[]) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringBuilder sb = new StringBuilder(); int N = Integer.parseInt(br.readLine()); for (int i = 1; i 2022. 2. 15.
[백준]2742_기찍 N 12345678910111213141516import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader; public class Main { public static void main(String args[]) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int N = Integer.parseInt(br.readLine()); for (int i = N; i > 0; i--) { System.out.println(i); } }} Colored by Color Scriptercs 2022. 2. 15.
[백준]2741_N 찍기 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String args[]) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int N= Integer.parseInt(br.readLine()); for(int i=0;i 2022. 2. 15.
[백준]11721_열 개씩 끊어 출력하기★ 12345678910111213141516171819import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader; public class Main { public static void main(String args[]) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str = br.readLine(); for (int i = 0; i 2022. 2. 15.
728x90
반응형