Cod sursa(job #942681)
Utilizator | Data | 23 aprilie 2013 11:39:33 | |
---|---|---|---|
Problema | Grigo | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.3 kb |
#include<cstdio>
using namespace std;
int p,n,k,val,mod;
int main()
{
freopen("grigo.in","r",stdin);
freopen("grigo.out","w",stdout);
mod= 1000003;
scanf("%d",&n);
scanf("%d",&k);
p=1;
while(k)
{
k--;
scanf("%d",&val);
p=(1LL*p*(n-val))%mod;
}
printf("%d\n",p);
return 0;
}