본문 바로가기

Algorithm/Implementation

(750)
(C++) - 백준(BOJ) 9622 : Cabin Baggage https://www.acmicpc.net/problem/9622 9622번: Cabin Baggage The first line contains an integer t (1≤ t ≤ 300) which determines the number of test cases (i.e. cabin baggage to verify). The following t lines contain the measurement of cabin baggage. Each line contains 4 values which are length, width, depth and w www.acmicpc.net 구현 문제였습니다. 📕 풀이방법 📔 입력 및 초기화 test case t, 길이 정보 l, wi, d, 무게 we, 정답을 출력..
(Rust) - 백준(BOJ) 5087 : Card Cutting https://www.acmicpc.net/problem/5087 5087번: Card Cutting Cheryl scores 6 points for A, 3, A, 3, A and 5, Tania scores 3 points for 2, 8 and 10. Cheryl scores 4 points for 9, 3, 3 and 7, Tania also scores 4 points for 2, 4, 6 and 8. www.acmicpc.net 구현 문제였습니다. 📕 풀이방법 📔 입력 및 초기화 줄 정보를 저장할 mut line, cheryl의 점수 cheryl_point, tania점수 tania_point를 선언 해줍니다. 공백으로 구분된 한 줄의 정보를 line에 저장하고 해당 부분으로 구분된 vecto..
(C++) - 백준(BOJ) 18698 : The Walking Adam https://www.acmicpc.net/problem/18698 18698번: The Walking Adam Adam has just started learning how to walk (with some help from his brother Omar), and he falls down a lot. In order to balance himself, he raises his hands up in the air (that’s a true story), and once he puts his hands down, he falls. You are given a s www.acmicpc.net 간단 구현 문제였습니다. 📕 풀이방법 📔 입력 및 초기화 test case t, 정답 ans, 문자열 s를 선언 후..
(C++) - 백준(BOJ) 8806 : Papier kamień nożyczki https://www.acmicpc.net/problem/8806 8806번: Papier kamień nożyczki W pierwszej linii wejścia znajduje się liczba zestawów testowych Z ( 1 adam[0] >> adam[1] >> adam[2]; cin >> gosia[0] >> gosia[1] >> gosia[2]; a = adam[0] * gosia[1] + adam[1] * gosia[2] + adam[2] * gosia[0]; g = gosia[0] * adam[1] + gosia[1] * adam[2] + gosia[2] * adam[0]; if(a > g) cout
(C++) - 백준(BOJ) 9664 : NASLJEDSTVO https://www.acmicpc.net/problem/9664 9664번: NASLJEDSTVO Clarification of the first example: There are two daughters, so that means the youngest daughter took half of the medallions. If there were initially 9 medallions, the youngest took 4, so 5 are remaining. If, by any chance, there were initially 10 medallio www.acmicpc.net 간단 구현 문제였습니다. 📕 풀이방법 📔 입력 및 초기화 전체 딸의 명 수 daughter, 남은 medal, 한명의 딸이 ..
(Python3) - 백준(BOJ) 14782 : Bedtime Reading, I https://www.acmicpc.net/problem/14782
(C++) - 백준(BOJ) 25285 : 심준의 병역판정검사 https://www.acmicpc.net/problem/25285 25285번: 심준의 병역판정검사 병역판정검사는 병역의무자들의 상태를 검사해 징병 여부와 징병 시 어느 방향으로 복무를 시키는 게 좋을지 판정하는 검사로, 남성들은 만 19세가 되는 해에 모두 병역판정검사를 받는다. 신체 www.acmicpc.net 간단 구현 문제였습니다. 📕 풀이방법 📔 입력 및 초기화 test case 수 t, 키 cm, 몸무게 kg을 선언 후 입력받습니다. 📔 풀이과정 bmi 계산 후 신체 등급을 나눠 반환해주는 함수 getBodyClass를 사용합니다. 📔 정답출력 함수의 결과값을 출력합니다. 📕 Code #include using namespace std; double t, cm, kg, bmi; int get..
(C++) - 백준(BOJ) 4696 : St. lves https://www.acmicpc.net/problem/4696 4696번: St. Ives Input consists of multiple data sets. Each data set consists of a line with a single floating point number number representing the numbers of wives, sacks per wife, cats per sack, and kittens per cat that Robert encountered that year. End of input is indic www.acmicpc.net 간단 구현문제였습니다. 📕 풀이방법 📔 입력 및 초기화 공식을 적용할 a를 선언 후 입력받습니다. 📔 정답출력 공식을 적용한 결과..