목록분류 전체보기 (498)
규도자 블로그
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.For example, . Our minimum sum is and our maximum sum is . We would print16 24 Function DescriptionComplete the miniMaxSum function in the editor below. It ..
Consider a staircase of size : # ## ### #### Observe that its base and height are both equal to , and the image is drawn using # symbols and spaces. The last line is not preceded by any spaces.Write a program that prints a staircase of size .Function DescriptionComplete the staircase function in the editor below. It should print a staircase as described above.staircase has the following paramete..
Given an array of integers, calculate the fractions of its elements that are positive, negative, and are zeros. Print the decimal value of each fraction on a new line.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.For example, given the array there are elements, two positive, two nega..
Given a square matrix, calculate the absolute difference between the sums of its diagonals.For example, the square matrix is shown below:1 2 3 4 5 6 9 8 9 The left-to-right diagonal = . The right to left diagonal = . Their absolute difference is .Function descriptionComplete the function in the editor below. It must return an integer representing the absolute diagonal difference.diagonalDifferen..
Calculate and print the sum of the elements in an array, keeping in mind that some of those integers may be quite large.Function DescriptionComplete the aVeryBigSum function in the editor below. It must return the sum of all array elements.aVeryBigSum has the following parameter(s):ar: an array of integers .Input FormatThe first line of the input consists of an integer . The next line contains s..
Alice and Bob each created one problem for HackerRank. A reviewer rates the two challenges, awarding points on a scale from to for three categories: problem clarity, originality, and difficulty.We define the rating for Alice's challenge to be the triplet , and the rating for Bob's challenge to be the triplet .Your task is to find their comparison points by comparing with , with , and with .If , ..
Given an array of integers, find the sum of its elements.For example, if the array , , so return .Function DescriptionComplete the simpleArraySum function in the editor below. It must return the sum of the array elements as an integer.simpleArraySum has the following parameter(s):ar: an array of integersInput FormatThe first line contains an integer, , denoting the size of the array. The second ..
Complete the function solveMeFirst to compute the sum of two integers.Function prototype:int solveMeFirst(int a, int b);where,a is the first integer input.b is the second integer inputReturn valuessum of the above two integersSample Inputa = 2 b = 3 Sample Output5 ExplanationThe sum of the two integers and is computed as: . 풀이 def solveMeFirst(a,b): return a + b num1 = int(input()) num2 = int(in..
군더더기 없는 책이란 이런 책을 두고 하는 말일 것이다. 정말 군더더기 없다. 더할 것도 없고 뺄 것도 없다. 간단명료하다. 확실하다. 간단하다. 저자가 말했듯이 모든 학문 분야에 걸쳐서 쌓인 지식 또한 사람들의 경험에 의해 쌓이고 정리된 것이므로 User Experience라고 했는데 이것 또한 아주 훌륭한 UX를 포함한 책이다. 물론 이것은 이래야한다, 저것은 저래야한다는 식의 단호한 어투지만 어떠한 말이든 모든 경우에 통용되지 않는다는 사실은 조금만 공부를 해보고 직접 디자인을 해본 사람은 알 것이다. 그런 요소들은 스스로 감안해서 적용하는 것이고 그것이 바로 지혜라는 것이다. 그런 면에 있어서 이 책은 정말 간단명료하게 아주 잘 명확하게 UX Design이란 무엇이고 어떻게 해야하는 건지 잘 보여..
학교가 아닌 학원에서 개발을 접한 사람들의 공감을 살 수 있는 책이다. 그 중엔 물론 나도 껴있다. 이분은 심지어 대학교를 넘어 직장까지 다니던 분이었는데 퇴직하고 개발학원에 들어가 개발을 배웠다. 국가전략산업직종으로 배울 수 있는 그런 학원 말이다. 나도 다녔고 지금도 수많은 사람들이 정부에서 주는 혜택을 받으며 다니고 있을 것이다. 아무튼 그런, 컴공과를 나와서 IT회사에 취직하는 일반적인 루트가 아닌 이런 루트로 꽤나 많은 스타트업을 전전하며 개발자로 자리를 잡아갔던 사람이었기 때문일까, 많은 내용들이 공감이 갔다. 다소 좋지 않게 들릴 수도 있지만 단순히 먹고 살기 위해 개발을 시작하는 사람이 아니라 개발 자체에 흥미를 갖고 만들고 싶은 게 있는 사람에게나 개발이 잘 맞을 거라는 얘기도 말이다. ..