python10 [HackerRank] Find the Runner-Up Score! (Python3) Problem: https://www.hackerrank.com/challenges/find-second-maximum-number-in-a-list/problem?isFullScreen=true Find the Runner-Up Score! | HackerRank For a given list of numbers, find the second largest number. www.hackerrank.com 안녕하세요. 오랜만입니다. 오랜만이라는 얘기를 몇 번째 하는 건지.. 방학 때라도 코딩 공부를 열심히 했었어야 하는데 ㅠ 토플이니, 수업 준비니, 대학 행정 잡무 등등.. 많이 바쁘긴했습니다 (변명 아닌 변명.. 꾸벅) 사실 오늘도 이걸 하려고 들어온 건 아니긴 한데, 학생들 코딩 문제 좀 내볼까~? .. 2023. 9. 5. [BaekJoon] 2798번: 블랙잭 (Python3) Problem: https://www.acmicpc.net/problem/2798 2798번: 블랙잭 첫째 줄에 카드의 개수 N(3 ≤ N ≤ 100)과 M(10 ≤ M ≤ 300,000)이 주어진다. 둘째 줄에는 카드에 쓰여 있는 수가 주어지며, 이 값은 100,000을 넘지 않는 양의 정수이다. 합이 M을 넘지 않는 카드 3장 www.acmicpc.net 그 동안 학과 수업에 바빠서, 자바에 빠져 허우적 대던 차에 파이썬 1 day 1 commit을 지키지 못했다.. 모든 것은 핑계일 뿐, 내 자신 반성해 ㅠ 그래도 오랜만에 돌아왔으니 조금은 어려운 문제로 돌아왔다. 문제 자체는 어려운 것이 없다. 주어진 배열로 처리한 숫자들중에 가장 큰 합은 구하는데, 이것이 주어진 숫자보다 작아야 한다는 점. 알.. 2023. 4. 14. [HackerRank] Mini-Max Sum (Python3) Mini-Max Sum | HackerRank Find the maximum and minimum values obtained by summing four of five integers. www.hackerrank.com Given five positive integers, find the minimum and maximum values that can be calculated by summing exactly four of the five integers. Then print the respective minimum and maximum values as a single line of two space-separated long integers. 5개의 element를 가진 array를 받아서 그 중에.. 2023. 1. 26. [LeetCode] Longest Common Prefix (Python3) Longest Common Prefix - LeetCode Longest Common Prefix - Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string "". Example 1: Input: strs = ["flower","flow","flight"] Output: "fl" Example 2: Input: st leetcode.com Write a function to find the longest common prefix string amongst an array of strings. If there is.. 2023. 1. 25. [Programmers] 아이스아메리카노 (python3) 프로그래머스에 나온 level.0의 쉬운 문제. 쉬운 문제부터 정복해보자 하는 생각에 풀어보았다. 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 머쓱이는 추운 날에도 아이스 아메리카노만 마십니다. 아이스 아메리카노는 한잔에 5,500원입니다. 머쓱이가 가지고 있는 돈 money가 매개변수로 주어질 때, 머쓱이가 최대로 마실 수 있는 아메리카노의 잔 수와 남는 돈을 순서대로 담은 배열을 return 하도록 solution 함수를 완성해보세요. 제한사항 0 < money ≤ 1,000,000 입출력 예 moneyresult 5,500[1, 0] 15,000[.. 2023. 1. 20. [LeetCode] 13. Romans to Integer (Python) Problem Roman to Integer - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 말그대로 로마어를 숫자로 바꾸는 프로그램이다. 문제를 이해하는 것에는 어렵지 않았고 문자어로 쓰여있는 것을 각각 숫자로 변환하여 더해주면 되는 듯한 간단한 문제라고 생각이 되었다. -> 하지만 단순히 이런 방식을 꾀하면 VI(6)와 IV(4)의 차이가 없어진다. 따라서 뒤에 큰 숫자가 오면 (큰 수 - 작은 수)의 방법을 취해야 하는 것을 알 수 있다. 어떻게 풀어야 .. 2022. 4. 9. 이전 1 2 다음