delete pics to save space

This commit is contained in:
2023-08-03 09:22:52 +08:00
commit de60cd6ed4
1334 changed files with 66221 additions and 0 deletions

26
1.3811.cpp Normal file
View File

@ -0,0 +1,26 @@
#include<cstdio>
typedef long long ll;
const int maxp=20000530;
int n,p;
int res[maxp];
inline void write(int x)
{
static char buf[25];
int cnt=0;
while(x>0) buf[cnt++]=x%10,x/=10;
while(cnt>0) putchar(buf[--cnt]+'0');
putchar('\n');
}
int main()
{
scanf("%d%d",&n,&p);
res[1]=1;
write(1);
for(int i=2;i<=n;i++)
{
//inv[i]=(ll)(p-p/i)*inv[p%i]%p;
res[i]=(ll)(p-p/i)*res[p%i]%p;
write(res[i]);
}
return 0;
}