#PCBSAU0000044. Hóa đơn có giảm giá và VAT (Discount and VAT Invoice)
Hóa đơn có giảm giá và VAT (Discount and VAT Invoice)
Discount and VAT Invoice
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
Given quantity , unit price , discount percent and VAT percent, compute subtotal , discount , VAT , total . Format four monetary results to two decimals only at output.
Input
One line has four whitespace-separated fields .
Output
Four lines containing , each with exactly two decimal digits and no labels.
Subtask
- Subtask 1 — 100 points: integer 0–100; an integer multiple of 100 within 0–10000 (may be written as
100.00); integer 0–100; integer 0–25.
Example
Input
2 100.00 10 5
Output
200.00
20.00
9.00
189.00
Explanation
Subtotal 200, discount 20, remaining 180, VAT 9, grand total 189.