Discount Slab
Python
Easy
3 views
Problem Description
Bill amount amt is provided. If amt is less than 1000, no discount. If amt is 1000 or more, give 10 percent discount. Output final payable as integer (rounded down).
Input Format
One integer amt.
Output Format
One integer payable.
Official Solution
import sys
s=sys.stdin.read().strip()
if not s: sys.exit(0)
amt=int(s)
if amt>=1000:
amt=amt*90//100
sys.stdout.write(str(amt))
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!