🐍Python/Python_알고리즘

    [알고리즘] 33. Beautiful Days at the Movies

    Lily likes to play games with integers. She has created a new game where she determines the difference between a number and its reverse. For instance, given the number , its reverse is . Their difference is . The number reversed is , and their difference is .She decides to apply her game to decision making. She will look at a numbered range of days and will only go to a movie on a beautiful day...

    [알고리즘] 32. Angry Professor

    A Discrete Mathematics professor has a class of students. Frustrated with their lack of discipline, he decides to cancel class if fewer than some number of students are present when class starts. Arrival times go from on time () to arrived late ().Given the arrival time of each student and a threshhold number of attendees, determine if the class is canceled.Input FormatThe first line of input co..

    [알고리즘] 31. Utopian Tree

    The Utopian Tree goes through 2 cycles of growth every year. Each spring, it doubles in height. Each summer, its height increases by 1 meter.Laura plants a Utopian Tree sapling with a height of 1 meter at the onset of spring. How tall will her tree be after growth cycles?For example, if the number of growth cycles is , the calculations are as follows:Period Height 0 1 1 2 2 3 3 6 4 7 5 14 Functi..

    [알고리즘] 30. Designer PDF Viewer

    When you select a contiguous block of text in a PDF viewer, the selection is highlighted with a blue rectangle. In this PDF viewer, each word is highlighted independently. For example:In this challenge, you will be given a list of letter heights in the alphabet and a string. Using the letter heights given, determine the area of the rectangle highlight in assuming all letters are wide.For example..

    [알고리즘] 29. The Hurdle Race

    Dan is playing a video game in which his character competes in a hurdle race. Hurdles are of varying heights, and Dan has a maximum height he can jump. There is a magic potion he can take that will increase his maximum height by unit for each dose. How many doses of the potion must he take to be able to jump all of the hurdles.Given an array of hurdle heights , and an initial maximum height Dan ..

    [알고리즘] 28. Climbing the Leaderboard

    Alice is playing an arcade game and wants to climb to the top of the leaderboard and wants to track her ranking. The game uses Dense Ranking, so its leaderboard works like this:The player with the highest score is ranked number on the leaderboard.Players who have equal scores receive the same ranking number, and the next player(s) receive the immediately following ranking number.For example, the..