목록BaekJoon (54)
개발도생's Blog

[백준] 15726_이칙연산 문제 15726번: 이칙연산 첫째 줄에 세 개 정수 A, B, C(1 ≤ A, B, C ≤ 1,000,000)가 주어진다. 답은 int범위를 벗어나지 않는다. www.acmicpc.net (A * B) / C와 (A / B) * C 중 더 큰 값을 출력하면 되는 문제다. import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.nio.Buffer; import java.util.StringTokenizer; /** * L4_15726 */ public class Main { public static void main(String[] args) th..

[백준] 15700_타일 채우기 4 문제 15700번: 타일 채우기 4 첫째 줄에 N과 M이 주어진다. (1 ≤ N, M ≤ 1,000,000,000) www.acmicpc.net 간단하게 풀어볼 수 있는 문제다. 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))..

[백준] 15680_연세대학교 문제 15680번: 연세대학교 연세대학교의 영문명은 YONSEI, 슬로건은 Leading the Way to the Future이다. 이를 출력하는 프로그램을 작성해보도록 하자. www.acmicpc.net 간단한 출력 문제다. import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; /** * L4_15680 */ public class Main { public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(Sy..

[백준] 15610_Abbey Courtyard 문제 15610번: Abbey Courtyard Bath’s annual Christmas market runs from the 23rd of November 2017 until the 10th of December 2017. During this time, the market will occupy the entire square courtyard of Bath Abbey. To brighten things up at night, a single long strand of cheerful festi www.acmicpc.net 크리스마스 행사 때 행사장에 조명을 설치해야 한다고 한다. 조명을 설치하기 위해서 행사장 평방미터를 구하는 문제인 거 같다. imp..

[백준] 15552_빠른 A+B 문제 15552번: 빠른 A+B 첫 줄에 테스트케이스의 개수 T가 주어진다. T는 최대 1,000,000이다. 다음 T줄에는 각각 두 정수 A와 B가 주어진다. A와 B는 1 이상, 1,000 이하이다. www.acmicpc.net 문제 자체는 어렵지 않지만, 시간제한이 있는 문제다. 문제에서 최대 100만 개의 테스트 케이스가 주어지는데, 케이스가 늘어나면 print함수로는 한계가 있다. 때문에 BufferedReader Class를 사용해도 시간 초과가 될 수 있다. 그래서 다른 방법으로 문제를 풀어보았다. import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader..