---
# System prepended metadata

title: 12396 - Walking Up Stairs
tags: [NTHUOJ]

---

# 12396 - Walking Up Stairs
## 題解:
題目已經將轉移公式給出了, 直接計算即可
Note : 答案有點大, 要用到unsigned long long
## Code:
```c=1
#include <stdio.h>
#define N 116

int main(){
    int n;
    unsigned long long f[N + 1];
    f[0] = f[1] = f[2] = 1;
    for (int i = 3; i <= N; i++)
        f[i] = f[i - 1] + f[i - 3];

    while(scanf("%d", &n) != EOF)
        printf("%llu\n", f[n]);
    return 0;
}
```
###### tags: `NTHUOJ`