又上锁妖塔
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.
题目描述
小 A 在玩《剑仙》,他遇到了一个锁妖塔,想从外面爬上去。
锁妖塔共有 层,第 层的高度为 。小 A 会用仙术,每用一次可以让他向上跳一层或两层,但是每次跳跃后小 A 都将用完力气,必须爬过至少一层才能再次跳跃(你可以认为小 A 需要跳两次一层才休息)。
现在小 A 想让你帮他算出爬上塔顶的最短时间。
输入格式
第一行一个整数 。
第二行 个整数 ,表示从下往上第 层的高度。
输出格式
一个数 ,表示最短时间。
5
3 5 1 8 4
1
B班基础题单竞速3
- Status
- Done
- Rule
- Ledo
- Problem
- 6
- Start at
- 2024-8-9 8:25
- End at
- 2024-8-9 10:25
- Duration
- 2 hour(s)
- Host
- Partic.
- 12