🐍Python/Python_알고리즘

    [알고리즘] 15. Breaking the Records

    Maria plays college basketball and wants to go pro. Each season she maintains a record of her play. She tabulates the number of times she breaks her season record for most points and least points in a game. Points scored in the first game establish her record for the season, and she begins counting from there.For example, assume her scores for the season are represented in the array . Scores are..

    [알고리즘] 14. Between Two Sets

    You will be given two arrays of integers and asked to determine all integers that satisfy the following two conditions:The elements of the first array are all factors of the integer being consideredThe integer being considered is a factor of all elements of the second arrayThese numbers are referred to as being between the two arrays. You must determine how many such numbers exist.For example, g..

    [알고리즘] 13. Kangaroo

    You are choreographing a circus show with various animals. For one act, you are given two kangaroos on a number line ready to jump in the positive direction (i.e, toward positive infinity).The first kangaroo starts at location and moves at a rate of meters per jump.The second kangaroo starts at location and moves at a rate of meters per jump.You have to figure out a way to get both kangaroos at ..

    [알고리즘] 12. Apple and Orange

    Sam's house has an apple tree and an orange tree that yield an abundance of fruit. In the diagram below, the red region denotes his house, where is the start point, and is the endpoint. The apple tree is to the left of his house, and the orange tree is to its right. You can assume the trees are located on a single point, where the apple tree is at point , and the orange tree is at point .When a ..

    [알고리즘] 11. Grading Students

    HackerLand University has the following grading policy:Every student receives a in the inclusive range from to .Any less than is a failing grade.Sam is a professor at the university and likes to round each student's according to these rules:If the difference between the and the next multiple of is less than , round up to the next multiple of .If the value of is less than , no rounding occurs as ..

    [알고리즘] 10. Sam and Substrings

    Samantha and Sam are playing a numbers game. Given a number as a string, no leading zeros, determine the sum of all integer values of substrings of the string. For example, if the string is , the substrings are and . Their sum is .Given an integer as a string, sum all of its substrings cast as integers. As the number may become large, return the value modulo .Function DescriptionComplete the sub..