목록YJ (375)
코딩로그

[문제] When I was at school, many, many years ago, we used to play a simple game involving tossing a coin. The first player would call "heads" or "tails", the second would toss the coin. The first player gained a point for every correct call, the second player gained one for every incorrect call. When we got bored, we added up the scores! [입력] Input for this problem will consist of a number of gam..

[문제] Today it is 4th August. If you were born before 4th August (in whatever year you were born) then you have already had your 2007 birthday. If you were born after 4th August, you have not yet had your 2007 birthday. If you were born on 4th August, happy birthday! If you were born on 29th February unlucky, you do not have a birthday this year, as 2007 is not a leap year! [입력] Input will consis..

[문제] My young son is struggling with his maths homework, can you help him please? He is working on the area of a rectangle – you know, area = length x width. His teacher has given him a table of lengths, widths and areas. Each row on the table has one of the 3 values missing; my son has to work out the missing value and write it in the table such that the values on each line represent the length..

[문제] Like many families with small children, my family’s refrigerator is adorned with a set of alphabet magnets: 26 separate magnets, each containing one letter of the alphabet. These magnets can be rearranged to create words and phrases. I feel it is my parental duty to use these magnets to create messages that are witty and insightful, yet at the same time caring and supportive. Unfortunately,..

[문제] Pirates talk a funny way. They say word where the letters are repeated more than they need to be. We would like know which letter appears the most frequently in a Pirate word. For example: In the word “arrrrrghh”, the letter “r” appears 5 times while “h” appears twice. Write a program that reads a pirate word from the terminal and writes the letter that occurs most frequently. It is guarant..

[문제] 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 b..

[문제] The Bloggs family keep getting invited to birthday parties, and they feel they must buy the person who invites them a present. The trouble is they do not have much money! The family has come up with a strategy. Whenever they go to a shop to buy a present, they will not buy the cheapest present (that would seem mean!), so they buy the second cheapest gift they can find. Your task here is to ..

[문제] Back in the old days before the creation of the mighty Centauri Republic, the planet Centauri Prime was split into several independent kingdoms. The kingdom of Mollaristan was ruled by king Loatold, while the kingdom of Auritania was under the rule of queen Elana. In fact, it just so happened that every kingdom whose name ended in a consonant was ruled by a king, while every kingdom whose n..