#include<algorithm> #include<vector> #include<iostream> #include<cstring> #include<cstdio> typedef long long LL; using namespace std; long long a[1000]; const LL mod = 1000000007; int main() {     int n;     memset(a, 0, sizeof(a));     for (int i = 1; i <= 4; i++) {         cin >> a[i];     }     cin >> n;     for (int i = 5; i <= n+5; i++) {         a[i] = a[i-1] + a[i-2] + a[i-3] + a[i-4];         cout <<"第"<<i<<"项: "<< a[i] << endl;     }     LL tm = a[n]%mod;     cout <<tm<< endl;     system("pause");     return 0; }
点赞 8

相关推荐

05-29 20:08
西南大学 golang
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务