welcome to my store!


Submit solution

Points: 20 (partial)
Time limit: 5.0s
Memory limit: 256M

Authors:
Problem types

題目說明

有一間店面,其中包含四項商品:

bread           $30
french_fries    $45
coca_cola       $20
black_tea       $15
注意餐點名稱間有底線

點餐方式如同現在有些店面有的點餐機,要先輸入餐點名稱,之後輸入數量

若輸入的品項為菜單上沒有的,則輸出wrong!,並結束程式

我們這邊的點餐機點餐流程為:

1.輸入餐點名稱
2.輸入數量(可繼續點餐[1.步驟]直到輸入0)
3.假設點完餐,輸入0
4.輸出總消費金額

目前剛開幕,只要有點french_fries,最後消費金額可享85折優惠!

輸入限制: 餐點字串須符合題意(輸入0結束),數量: >0

輸入

餐點與數量,輸入0結算金額

所有變數統一型別int

輸出

金額

sample input1

bread
2
french_fries
1
black_tea
3
0

sample output1

127.5

sample input2

bread
2
french_fries
1
milk

sample output2

wrong!

sample input1

bread
2
black_tea
3
0

sample output1

105

Comments

There are no comments at the moment.