본문 바로가기

분류 전체보기

(154)
1654 랜선 자르기 https://www.acmicpc.net/board/view/67789 글 읽기 - 자바) 두가지 방법의 이분탐색 차이점 댓글을 작성하려면 로그인해야 합니다. www.acmicpc.net import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.StringTokenizer; public class Main { static long []arr; static int N; public static void main(String[] args) throws IOException { BufferedReader br = new Buf..
10869 사칙연산 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; 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 a = Integer.parseInt(st.nextToken()); int b = Integ..
5585 거스름돈 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; 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()); int remain = 1000 - N; int []coin = {500,100,50,10,5,1}; int cnt = 0; int in..
2475 검증수 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; 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 sum = 0; for(int i =0; i
1546 평균 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; 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()); StringTokenizer st = new StringTokenizer(br.readLine(), " "); int score[] = ..
2438 별찍기 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 = 1; i
1918 후위 표기식 https://www.acmicpc.net/board/view/75399 글 읽기 - 이거 문제가 이상해요 36%를 넘길 수 없어요.[내공100 댓글을 작성하려면 로그인해야 합니다. www.acmicpc.net https://www.acmicpc.net/board/view/63719 글 읽기 - emptystack 런타임 에러궁금합니다 댓글을 작성하려면 로그인해야 합니다. www.acmicpc.net https://summer-story.tistory.com/13 [Stack] 백준 1918번: 후위 표기식 이번에는 백준 스택 문제를 풀면서 꽤 중요하다고 생각한 1918번 후위표기식에 대해 알아보자! (ت) 후위 표기식이란? 문제에 나와있지만, 한번 더 설명을 하자면 우리는 a+b나 a*b+(c-d)와 ..
2609 최대공약수와 최소공배수 https://st-lab.tistory.com/154 [백준] 2609번 : 최대공약수와 최소공배수 - JAVA [자바] www.acmicpc.net/problem/2609 2609번: 최대공약수와 최소공배수 첫째 줄에는 입력으로 주어진 두 수의 최대공약수를, 둘째 줄에는 입력으로 주어진 두 수의 최소 공배수를 출력한다. www.acmicpc.net 문제 알 st-lab.tistory.com import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main { static boolean arr[]; public ..