#include <cstdio>
#include <cstring>
#include <cmath>
#include <iostream>
#include <algorithm>
#include <stack>
#include <queue>
using namespace std;
#define LL long long
const int N = 1000009;
const LL MOD = 1000003;
int re[N];
void init()
{
LL k = 1;
for(int i=1;i<N;i++)
{
k = (k*i*2)%MOD;
re[i] =(int)k;
}
}
int main()
{
//freopen("in.txt","r",stdin);
init();
int cas;
scanf("%d",&cas);
while(cas--)
{
LL t;
cin>>t;
if(t>=MOD) cout<<0<<endl;
else
cout<<re[t]<<endl;
}
return 0;
}
HDU 4475 Downward paths
最新推荐文章于 2020-03-08 20:01:42 发布