🐍Python/Python_알고리즘

    [알고리즘] 09. Time Conversion

    Given a time in -hour AM/PM format, convert it to military (24-hour) time.Note: Midnight is 12:00:00AM on a 12-hour clock, and 00:00:00 on a 24-hour clock. Noon is 12:00:00PM on a 12-hour clock, and 12:00:00 on a 24-hour clock.Function DescriptionComplete the timeConversion function in the editor below. It should return a new string representing the input time in 24 hour format.timeConversion ha..

    [알고리즘] 08. Birthday Cake Candles

    You are in charge of the cake for your niece's birthday and have decided the cake will have one candle for each year of her total age. When she blows out the candles, she’ll only be able to blow out the tallest ones. Your task is to find out how many candles she can successfully blow out.For example, if your niece is turning years old, and the cake will have candles of height , , , , she will be..

    [알고리즘] 07. Mini-Max Sum

    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 ..

    [알고리즘] 06. Staircase

    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..

    [알고리즘] 05. Plus Minus

    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..

    [알고리즘] 04. Diagonal Difference

    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..