2018 ACM-ICPC 南京站 G Pyramid 找规律

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/fanbaobao829/article/details/83057572
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod=1e9+7;
const ll inv24=41666667;
int main()
{
    int t;
    ll n;
    scanf("%d",&t);
    while(t--&&scanf("%lld",&n)!=EOF)
        printf("%lld\n",n*(n+1)%mod*(n+2)%mod*(n+3)%mod*inv24%mod);
    return 0;
}

猜你喜欢

转载自blog.csdn.net/fanbaobao829/article/details/83057572