Type: Default 1000ms 256MiB

爬楼梯

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.

题目背景

题目详情 - 爬楼梯 - ACjudge

愚蠢的人类终于修好了楼梯.

题目描述

到楼顶一共有 nn 级台阶, 辰辰一步可以迈一层台阶, 也可以迈两层台阶, 但是最多只能连续两次迈两层台阶, 问辰辰跑到楼顶最少需要多少步?

数据格式

输入格式

一个整数nn, 表示台阶数

输出格式

输出一个整数, 表示他最少迈多少步, 就可以到达楼顶.

样例

10
6

样例1解释

1,2,2,1,2,21, 2, 2, 1, 2, 2

数据范围

1<=n<=1091 <= n <= 10^{9}

[北辰杯 North-Star-Cup] 五月复现赛

Not Attended
Status
Done
Rule
Ledo
Problem
12
Start at
2023-5-22 18:00
End at
2023-6-16 18:00
Duration
600 hour(s)
Host
Partic.
41