code
-
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..
[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.04.09 -
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): """ ..
[LeetCode] 1046. Last Stone Weight1 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.04.08