QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#79674 | #3724. Strange Prime | Pure_Furies | Compile Error | / | / | C++14 | 321b | 2023-02-20 19:11:24 | 2023-02-20 19:11:28 |
Judging History
你现在查看的是最新测评结果
- [2023-08-10 23:21:45]
- System Update: QOJ starts to keep a history of the judgings of all the submissions.
- [2023-02-20 19:11:28]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-02-20 19:11:24]
- 提交
answer
#import<iostream>
using namespace std;
int p=1e9+7,w=p-51,n,m[100003],a[100003];
int main(){
m[0]=1;
while(cin>>n){
for(int i=1;i<=n;i++){
cin>>a[i];
m[i]=1ll*m[i-1]*(w+p-a[i])%p;
}
int ans=0,P=1;
for(int i=n;i;i--)
ans=(ans+P*m[i-1])%p,
P=(mod-1ll)*P*a[i]%p;
cout<<ans<<'\n';
}
}
詳細信息
answer.code:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<iostream> | ^~~~~~ answer.code: In function ‘int main()’: answer.code:14:28: error: ‘mod’ was not declared in this scope 14 | P=(mod-1ll)*P*a[i]%p; | ^~~