[GESP样题 六级] 下楼梯

Luogu
IDLGP10250
Time1000ms
Memory512MB
DifficultyP2
动态规划 DP递推GESP
顽皮的小明发现,下楼梯时每步可以走 $1$ 个台阶、$2$ 个台阶或 $3$ 个台阶。现在一共有 $N$ 个台阶,你能帮小明算算有多少种方案吗? ## Input 输入一行,包含一个整数 $N$。 ## Output 输出一行一个整数表示答案。 [samples] ## Background 对应的选择、判断题:<https://ti.luogu.com.cn/problemset/1106> ## Note 对全部的测试点,保证 $1 \leq N \leq 60$。
Samples
Input #1
4
Output #1
7
Input #2
10
Output #2
274
API Response (JSON)
{
  "problem": {
    "name": "[GESP样题 六级] 下楼梯",
    "description": {
      "content": "顽皮的小明发现,下楼梯时每步可以走 $1$ 个台阶、$2$ 个台阶或 $3$ 个台阶。现在一共有 $N$ 个台阶,你能帮小明算算有多少种方案吗?",
      "description_type": "Markdown"
    },
    "platform": "Luogu",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 524288
    },
    "difficulty": {
      "LuoguStyle": "P2"
    },
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "LGP10250"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "顽皮的小明发现,下楼梯时每步可以走 $1$ 个台阶、$2$ 个台阶或 $3$ 个台阶。现在一共有 $N$ 个台阶,你能帮小明算算有多少种方案吗?\n\n## Input\n\n输入一行,包含一个整数 $N$。\n\n## Output\n\n输出一行一个整数表示答案。\n\n[samples]\n\n## Background\n\n对应的选择、判断题:<https://ti.luogu.com.cn/problemset/...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments