easyUnit 1 · Basics, Input/Output & Operators
P1. Simple Interest
Basics, Input/Output & Operators
Read the principal amount, the yearly rate of interest and the time in years. Calculate the simple interest using SI = P × R × T / 100, and the total amount (P + SI).
Input Format
- Line 1:
principal(decimal) - Line 2:
rate(decimal) - Line 3:
time(decimal)
Output Format
- Line 1:
Simple Interest: <si> - Line 2:
Total Amount: <total> - Both values rounded to 2 decimal places
Constraints
- 0 ≤
principal≤ 1000000 - 0 ≤
rate≤ 50 - 0 ≤
time≤ 50
Sample Test Cases
Sample 1
Input
10000 5 2
Output
Simple Interest: 1000.00 Total Amount: 11000.00
Sample 2
Input
2500.50 7.5 3
Output
Simple Interest: 562.61 Total Amount: 3063.11
Submitting checks 2 sample cases and 4 hidden test cases.