A sentence is a string consisting of words separated by a single space. A word represents a price if it starts with the dollar sign '$' followed strictly by one or more digits.
You are given a string sentence and an integer discount. For every word representing a price, apply a discount of discount percent and format the discounted price to exactly '$'.
Return the modified sentence.
Constraints:
sentence.length
sentence consists of lowercase English letters, digits, ' ', and '$'.
sentence does not have leading or trailing spaces.
All words in sentence are separated by a single space.
All prices will be positive numbers without leading zeros.
All prices will have at most
discount
A sentence is a string consisting of words separated by a single space. A word represents a price if it starts with the dollar sign '$' followed strictly by one or more digits.
You are given a string sentence and an integer discount. For every word representing a price, apply a discount of discount percent and format the discounted price to exactly '$'.
Return the modified sentence.
Constraints:
sentence.length
sentence consists of lowercase English letters, digits, ' ', and '$'.
sentence does not have leading or trailing spaces.
All words in sentence are separated by a single space.
All prices will be positive numbers without leading zeros.
All prices will have at most
discount