문제 A fish-finder is a device used by anglers to find fish in a lake. If the fish-finder finds a fish, it will sound an alarm. It uses depth readings to determine whether to sound an alarm. For our purposes, the fish-finder will decide that a fish is swimming past if: there are four consecutive depth readings which form a strictly increasing sequence (such as 3 4 7 9) (which we will call “Fish Ri..
Python
문제 Many communities now have “radar” signs that tell drivers what their speed is, in the hope that they will slow down. You will output a message for a “radar” sign. The message will display information to a driver based on his/her speed according to the following table: km/h over the limit Fine 1 to 20 $100 21 to 30 $270 31 or above $500 https://www.acmicpc.net/problem/6763 6763번: Speed fines a..
문제 You know a family with three children. Their ages form an arithmetic sequence: the difference in ages between the middle child and youngest child is the same as the difference in ages between the oldest child and the middle child. For example, their ages could be 5, 10 and 15, since both adjacent pairs have a difference of 5 years. Given the ages of the youngest and middle children, what is t..
문제 Bessie the cow is getting bored of the milk production industry, and wants to switch to an exciting new career in computing. To improve her coding skills, she decides to compete in the on-ine USACO competitions. Since she notes that the contest starts on November 11, 2011 (11/11/11), she decides for fun to download the problems and begin coding at exactly 11:11 AM on 11/11/11. Unfortunately, ..
문제 The PLU football coach must submit to the NCAA officials the names of all players that will be competing in NCAA Division II championship game. Unfortunately his computer keyboard malfunctioned and interchanged the letters ‘i’ and ‘e’. Your job is to write a program that will read all the names and print the names with the correct spelling. https://www.acmicpc.net/problem/5358 5358번: Football..
문제 Captain Jack decides to to take over a rival’s ship. He needs to send his henchmen over on rowboats that can hold 6 pirates each. You will help him count out pirates in groups of 6. The last rowboat may have fewer than 6 pirates. To make your task easier each pirate has been assigned a number from 1 to N. https://www.acmicpc.net/problem/5300 5300번: Fill the Rowboats! The output will be the nu..
문제After several months struggling with a diet, Jack has become obsessed with the idea of weighing less. In an odd way, he finds it very comforting to think that, if he had simply had the luck to be born on a different planet, his weight could be considerably less.Of course, the planets are far out of reach, but even the Earth’s moon would yield a dramatic weight loss. Objects on the moon weight ..
문제 Redundancy in this world is pointless. Let’s get rid of all redundancy. For example AAABB is redundant. Why not just use AB? Given a string, remove all consecutive letters that are the same. https://www.acmicpc.net/problem/5357 5357번: Dedupe Redundancy in this world is pointless. Let’s get rid of all redundancy. For example AAABB is redundant. Why not just use AB? Given a string, remove all c..
문제 In the book All Creatures of Mythology, gnomes are kind, bearded creatures, while goblins tend to be bossy and simple-minded. The goblins like to harass the gnomes by making them line up in groups of three, ordered by the length of their beards. The gnomes, being of different physical heights, vary their arrangements to confuse the goblins. Therefore, the goblins must actually measure the bea..
문제 한국에서 나이는 총 3가지 종류가 있다. 만 나이: 국제적인 표준 방법이다. 한국에서도 법에서는 만 나이만을 사용한다. 세는 나이: 한국에서 보통 나이를 물어보면 세는 나이를 의미한다. 연 나이: 법률에서 일괄적으로 사람을 구분하기 위해서 사용하는 나이이다. 만 나이는 생일을 기준으로 계산한다. 어떤 사람이 태어났을 때, 그 사람의 나이는 0세이고, 생일이 지날 때마다 1세가 증가한다. 예를 들어, 생일이 2003년 3월 5일인 사람은 2004년 3월 4일까지 0세이고, 2004년 3월 5일부터 2005년 3월 4일까지 1세이다. 세는 나이는 생년을 기준으로 계산한다. 어떤 사람이 태어났을 때, 그 사람의 나이는 1세이고, 연도가 바뀔 때마다 1세가 증가한다. 예를 들어, 생일이 2003년 3월 5..