coding5 [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. [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. [HackerRank] PlusMinus (python) Given an array of integers, calculate the ratios of its elements that are positive, negative, and zero. Print the decimal value of each fraction on a new line with places after the decimal. Note: This challenge introduces precision problems. The test cases are scaled to six decimal places, though answers with absolute error of up to are acceptable. Example There are elements, two positive, two n.. 2022. 4. 9. [LeetCode] 1046. Last Stone Weight 1 Day 1 Commit Challenge! 오늘은 리트코드의 last stone weight 를 풀어보았다. 아직 파이썬에 익숙하지 않아 다양한 함수를 불러오는 데에 어려움이 많다. Last Stone Weight - 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 리트 코드의 Easy 단계의 문제들을 계속 풀어나갈 예정이다. 해답은 이렇게 ... class Solution(object): def lastStoneWeight(self, stones): """ .. 2022. 4. 8. [HackerRank] Diagonal Difference (python) #!/bin/python3 import math import os import random import re import sys # # Complete the 'diagonalDifference' function below. # # The function is expected to return an INTEGER. # The function accepts 2D_INTEGER_ARRAY arr as parameter. # def diagonalDifference(arr): # Write your code here left = 0 right = 0 for i in range(len(arr)): left += arr[i][i] right += arr[i][len(arr)-i-1] return abs(left .. 2022. 4. 7. 이전 1 다음