ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Турниры > IMPC-2014-15 Questions > задача:


4th-1. 50491 - Brokers

IMPC-2014-15 Questions

Старт: 22.ноя.2014 в 15:00:00
Финиш: 22.ноя.2014 в 20:00:00
Турнир завершён!
• Турнирная таблица

Гость
• Вопросы к жюри (5)

Задачи турнира

• 2nd-3. 50533 - Contacts List
• 2nd-5. 50793 - Top M Customers
• 2nd-6. 50486 - Problems and Progr...
• 3rd-2. 50405 - Accounts Receivable
• 3rd-3. 50474 - Sum of Two Primes
• 3rd-4. 50406 - Draw Pattern 178
• 3rd-5. 50415 - The Scientist
• 3rd-6. 50695 - Longest link between...
• 4th-1. 50491 - Brokers
• 4th-2. 50524 - Elevator
• 4th-3. 50535 - Image Compression
• 4th-6. 50536 - Epoka Furgon Shpk
• Ind_01-10. 50752 - Student Groups
• Ind_01-20. 50416 - Placing Domino...
• Ind_01-30. 50764 - Fast Typing Co...
• Ind_01-50. 50718 - Elevator
• Ind_02-10. 50497 - Falling Bricks - ...

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Question by Urmat Ryskulov.

Brokers

Mr. Sinani works in a brokerage company. Essentially, he buys or sells shares from the stock market. In financial markets, equity valuation is the method of calculating theoretical values of companies and their stocks. He wants your support to choose the most profitable share.

Current price of an object is calculated as follows: if the dividends paid are same forever (which means the growth rate is zero), then, the price of the particular stock is P0 = D / R. If the dividends paid over the years are not constant and have certain growth, the price of particular stock is;
   P0 = D1 / (R-g) = D0 * (1+g) / (R - g)
where

  • P0 - current price
  • D0 - just paid dividend
  • D1 - payment for next period (D1= D0*(1+g))
  • R - Market required rate of return
  • g - growth rate

Question: You will be given information for n shares. Write a program to choose the most profitable share among the given.

Input specification
First, you will be given an integer n where n is between 0 and 2000. Then, in the following n lines, you will be given the information for n shares where every line contains the following information:

  • Stock market symbol - a string not greater than 8 characters
  • D0 - a floating point number between 0 and 1000
  • R - a floating point number between 0 and 1
  • g - a floating point number between 0 and 1

Output specification
Show the stock market symbol of the share which has the highest equity value. If there are several equity having the same price, show the first one.

Sample Input I
2
GOOG 5.5 0.06 0
HYMTF 5 0.08 0.04
Sample Output I
HYMTF

Explanation:
Current price for GOOG is 91.67 and for HYMTF 5 is 130. And so, the most profitable equity is HYMTF



Для отправки решений необходимо выполнить вход.

www.contester.ru