HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Beginners > problem:


51038 - Simple interest

Guest
• Review clarifications (3)

Volume problems

• 50889 - Convert to Minutes and Sec...
• 50900 - Put the Numbers in Descend...
• 50884 - Area and Perimeter Of The ...
• 51113 - The Menu
• 51111 - Even Numbers
• Cineplexx
• Cirku Belluci
• 51040 - Annual profit
• 51038 - Simple interest
• 51041 - Plane Segmentation
• 51039 - Automated billing system
• 50310 - Kinetic Energy
• 50314 - Falling Distance
• El Clasico
• 50481 - Car Parking
• 50480 - What quadrant is it?
• 50482 - Bank Charges

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.
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