題目要求如下:
- 先輸入一個金額(整數)。
- 每17元可以購買1瓶可樂。
- 每喝完1瓶可樂,可獲得1罐空瓶及1個瓶蓋。
- 每3罐空瓶或5個瓶蓋,可換取1瓶可樂。
- 如果換到最後,不足3罐空瓶或5個瓶蓋,可以用3個瓶蓋換1罐空瓶,前提是換了之後可以再換1瓶可樂,如果無法就不需兌換空瓶。
- 請回答總共喝了多少瓶可樂,剩下的空瓶數、瓶蓋數及剩下多少錢。
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing