35. Festival Sale Discount

Acceptance — 0 accepted 0 submissions

Easy
ConditionalsMath
No companies listed
During the Diwali sale, a clothing shop gives:
• 20% off if the bill is 5000 rupees or more
• 10% off if the bill is 2000 rupees or more (but less than 5000)
• No discount below 2000

Given the bill amount, print the final amount to pay.

Input Format
A single integer B, the bill amount.

Output Format
Print the amount to pay, rounded to exactly 2 decimal places.

Constraints
• 1 ≤ B ≤ 1000000

Example 1

Input
6000
Output
4800.00

Explanation 20% off: 6000 × 0.80 = 4800.00

Example 2

Input
2500
Output
2250.00

Explanation 10% off: 2500 × 0.90 = 2250.00

Example 3

Input
1999
Output
1999.00

Explanation Below 2000, no discount.

Acceptance —
Accepted 0
Submissions 0
Auto-save
Saved Ln 1, Col 1
Submit a solution to see its status here.
Input
Expected Output
4800.00
No results yet
Run your code to test it against the sample cases.
Problem List