超级楼梯
#include <cstdio> int memo[45]; int f(int n) { memo[2] = 1; memo[3] = 2; for(int i = 4; i <= n; ++ i) { memo[i] = memo[i - 1] + memo[i - 2]; } return memo[n]; } int main() { int n, m; scanf("%d", &n); while(n --) { scanf("%d", &m); printf("%d\n", f(m)); } return 0; }