我把购买X后数的数学混为一谈。 如果是《合同法》,就很容易计算你想要的物品数量和你必须支付的金额。 例如,当你想要4人时,你只得购买2美元和支付2美元,但购买3台的费用是免费的,或购买30台是免费的。 我认为非常容易地计算一下,在我的领导下,但在我试图找到一种反映这种情况的公式时,我会说(因为我的数学基础薄弱)。
Problem description
Calculate Total Cost after Subtracting Quantity of Free Promotional Products Each laundry detergent product sold by the store to consumers costs X VND. The store has a promotion: for every 10 products purchased (excluding the additional free ones), you get 1 product for free. The customer wants to buy n products. Calculate the total amount the customer has to pay for those n products. The input is the price of a product and the number of products the customer buys The output will be the amount the customer must pay (take up to 2 decimal places)
INPUT
50000 12
OUTPUT
550000.00
INPUT
50000 10
OUTPUT
500000.00
是否有办法代表钱?