#include <stdio.h>
long long bottom_up(int n) {
long long dp[101]={0,1,1,1,2,2};
for(int i=6; i<=n; i++) {
dp[i]=dp[i-1]+dp[i-5];
}
return dp[n];
}
int main() {
int t;
scanf("%d",&t);
while(t--) {
int n;
scanf("%d",&n);
printf("%lld\n",bottom_up(n));
}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: