HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Economics & Finance > problem:


50491 - Brokers

Guest
• Review clarifications (5)

Section problems

• 51040 - Annual profit
• 51038 - Simple interest
• 51039 - Automated billing system
• 50958 - ATM
• 50482 - Bank Charges
• 50491 - Brokers
• 50806 - TVSH
• 50514 - Bookkeeping
• 50523 - Total Tax to Pay
• 50534 - Top Trading Company
• 50405 - Accounts Receivable

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
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