P3811
编译失败,显示Nothing is compiled: OUTPUT exceeds.
#include<bits/stdc++.h>
#define int long long
using namespace std;
const int N=3e6+5;
int inv[N]={0,1};
int n,p;
signed main(){
cin>>n>>p;
cout<<1<<endl;
for(int i=2;i<=n;i++){
inv[i]=(int)(p-(p/i)*inv[p%i]%p);
cout<<inv[i]<<endl;
}
return 0;
}