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

Турниры > CEN109/111_2016_Questions > задача:


PE11. 51038 - Simple interest

CEN109/111_2016_Questions

Старт: 07.дек.2016 в 12:37:00
Финиш: 07.дек.2016 в 13:42:00
Турнир завершён!
• Турнирная таблица

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

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

• PE03. 51029 - Buy Three Items
• PE04. 51030 - Number of Right Tria...
• PE05. 51031 - Convert from Hex to...
• PE06. 51032 - Triangle Property
• PE07. 51033 - Sum of the series
• PE08. 51034 - Area of 3 Shapes
• PE09. 51040 - Annual profit
• PE10. 51041 - Plane Segmentation
• PE11. 51038 - Simple interest
• PE12. 51039 - Automated billing system
• RE1. 51077 - Grades Histogram
• RE2. 51078 - Max trade
• hw3. 51057 - Number of students
• hw4. 51058 - Third grade students
• hw5. 51059 - Football teams
• hw6. 51060 - Public Transportation

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

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

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
bfs.

Simple interest

Question: You deposit $PV in a bank account that pays simple interest rate of r%. 

Bank applies different interest rates according to the time.

  • If time is less than 1 year: interest rate =0.0%
  • If time is between 1 and 3 years(both included): interest rate =5.7%
  • If time is greater than 3 years: interest rate =12.6%

Simple interest is calculating using this formula:

FV=PV*(1+r*t)

Where:

  • FV is future value, total Accrued Amount (principal + interest)
  • PV is the present value (principal amount).
  • r is the interest rate.
  • t is the time involved.

How much will you have in your account after t years?

Input specification: You will be given two inputs. Principal amount 0.0<PV<=5000000.00, and the time 0.1<=t<=15.0

Output specification: Show your account's amount as floating point number with two digits precision.

Sample Input I
1000.00 0.5
Sample Input II
25789.50 2.5
Sample Output I
1000.00
Sample Output II
29464.50

Sample Input II Explanation: Because time (t) is between 1 and 3 the rate interest is calculated as 5.7%. Using simple interest formula we calculate FV:

FV=PV*(1+r*t) = 25789.50*(1+ (0.057*2.5) = 25789.50*1.1425=29464.50375

FV=29464.50

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

www.contester.ru