전체 글
-
boj)1911 - 흙길 보수하기PS/boj 2020. 8. 31. 16:42
import java.io.*; import java.util.Arrays; import java.util.Comparator; 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 = new StringTokenizer(br.readLine()); int N = Integer.parseInt(st.nextToken()); // 웅덩이 갯수 int L = Integer.parseInt(st.n..
-
LinkedListAlgorithm 2020. 8. 31. 16:36
public class Node { public T data; public Node next; public Node(T data) { this.data = data; this.next = null; } } public class MySingleLinkedList { public Node head = null; public int size = 0; public MySingleLinkedList() {} public void addFirst(T item) { Node newNode = new Node(item); newNode.next = head; head = newNode; size++; } public void addAfter(Node before, T item) { Node newNode = new ..
-
boj)8958PS/boj 2020. 8. 29. 21:19
import java.io.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); int N = Integer.parseInt(br.readLine()); for (int i = 0; i < N; i++) { String str = br.readLine(); int point = 0; int ans = 0; for (int j = 0; j < str..
-
boj)4344PS/boj 2020. 8. 29. 20:55
import java.io.*; import java.util.StringTokenizer; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); int N = Integer.parseInt(br.readLine()); for (int i = 0; i < N; i++) { StringTokenizer st = new StringTokenizer(br.r..
-
boj)10996PS/boj 2020. 8. 29. 19:10
import java.io.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); int N = Integer.parseInt(br.readLine()); for (int i = 1; i
-
boj)2446PS/boj 2020. 8. 29. 18:27
import java.io.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); int N = Integer.parseInt(br.readLine()); int line = (2*N)-1; for (int i = 1; i
-
boj)2523PS/boj 2020. 8. 29. 18:06
import java.io.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); int N = Integer.parseInt(br.readLine()); int line = (2*N)-1; for (int i = 1; i 감소 bw.append('*'); } } bw.newLine(); } br.close(); bw.flush(); bw.close..
-
boj)1110PS/boj 2020. 8. 29. 16:02
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()); getSum(n, n, 1); } static void getSum(int num, int n, int ans) { int num1, num2, sum, result; if (num < 10) { ..