본문 바로가기

Problem Solving/Baekjoon1338

[백준] 13908 비밀번호 - Brute Force / Java • 문제 링크 13908번: 비밀번호 첫 번째 예제의 경우 가능한 비밀번호의 조합은 07, 17, 27, 37, 47, 57, 67, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 87, 97이다. 두 번째 예제의 경우 가능한 비밀번호의 조합은 34, 43이다. www.acmicpc.net • 풀이 코드 import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStreamWriter; public class Main { static int n, m, res; static boolean[] visit = new boolean[10]; public static void main(String[] ar.. 2024. 1. 24.
[백준] 1977 완전제곱수 - Brute Force / Java • 문제 링크 1977번: 완전제곱수 M과 N이 주어질 때 M이상 N이하의 자연수 중 완전제곱수인 것을 모두 골라 그 합을 구하고 그 중 최솟값을 찾는 프로그램을 작성하시오. 예를 들어 M=60, N=100인 경우 60이상 100이하의 자연수 중 완 www.acmicpc.net • 풀이 코드 import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStreamWriter; public class Main { public static void main(String[] args) throws IOException { BufferedWriter bw = new BufferedWriter(new OutputStreamWrite.. 2024. 1. 23.
[백준] 6193 Hungry Cows - Dynamic Programming / Java • 문제 링크 6193번: Hungry Cows Each of Farmer John's N (1 2024. 1. 22.
[백준] 15841 Virus Outbreak - Dynamic Programming / Java • 문제 링크 15841번: Virus Outbreak For each input value, the output contains a line in the format: Hour X: Y cow(s) affected, where X is the hour, and Y is the total affected cows that need to be euthanized based on the hour given by X. www.acmicpc.net • 풀이 코드 import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStreamWriter; import java.math.BigInteger; public class Main .. 2024. 1. 21.
[백준] 6221 The Bale Tower - Dynamic Programming / Java • 문제 링크 6221번: The Bale Tower Always bored with cud-chewing, the cows have invented a new game. One cow retrieves a set of N (3 32) n = (n 2024. 1. 20.
[백준] 10752 Cow Hopscotch - Dynamic Programming / Java • 문제 링크 10752번: Cow Hopscotch Just like humans enjoy playing the game of Hopscotch, Farmer John's cows have invented a variant of the game for themselves to play. Being played by clumsy animals weighing nearly a ton, Cow Hopscotch almost always ends in disaster, but this has surprising www.acmicpc.net • 풀이 코드 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOExceptio.. 2024. 1. 19.