【例3.5】计程票(人教)
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
【题目描述】
某城市轨道交通实行分段计程票价,起步价为五站以内(含五站)票价2元;乘坐5站以上10站以下(含10站)票价3元;乘坐10站以上16站以下(含16站)票价4元;乘坐16站以上票价5元。
给定乘坐的站数,请问票价是多少?
【输入】
一个整数n表示乘坐的站数。
【输出】
如样例所示。
8
票价3元
《数据结构班12月第3周》
- Status
- Done
- Problem
- 4
- Open Since
- 2023-12-16 0:00
- Deadline
- 2023-12-24 23:59
- Extension
- 24 hour(s)