본문 바로가기
728x90
반응형

알고리즘/알고리즘 기초문제(백준-입출력)23

[백준]2442_별 찍기 - 5 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; 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 i; j--) { System.out.print(" "); } .. 2022. 2. 15.
[백준]2441_별 찍기 - 4 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; 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.
[백준]2440_별 찍기 - 3 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 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 i; j--) { System.out.print("*"); } System.ou.. 2022. 2. 15.
[백준]2439_별 찍기 - 2 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; 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 i; j--) { System.out.print(" "); } .. 2022. 2. 15.
[백준]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.
[백준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.
728x90
반응형