传统题 1000ms 256MiB

走楼梯

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

Background

Special for beginners, ^_^

Description

楼梯有N级台阶,上楼可以一步上一阶,也可以一步上二阶。编一递归程序,计算共有多少种不同走法?

Format

Input

Two integers x and y, satisfying 0x,y327670\leq x,y\leq 32767 .

Output

One integer, the sum of x and y.

Samples

3
3

Limitation

1s, 1024KiB for each test case.

A 递推算法

未认领
状态
已结束
题目
9
开始时间
2025-7-3 0:00
截止时间
2025-8-1 23:59
可延期
24 小时