QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#79676#3724. Strange PrimeDerekFengWA 100ms3764kbC++294b2023-02-20 19:11:332023-02-20 19:11:34

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:34]
  • 评测
  • 测评结果:WA
  • 用时:100ms
  • 内存:3764kb
  • [2023-02-20 19:11:33]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int M=1e9+7,P=999999956,I=215686276;
int main(){
	int n;while(~scanf("%d",&n)){
		int f=1,g=1;while(n--){
			int x;scanf("%d",&x);
			g=(ll)g*(M-x)%M,f=(ll)f*(P+M-x)%M;
		}
		printf("%d\n",(ll)(f+g)*I%M);
	}
}

详细

Test #1:

score: 0
Wrong Answer
time: 100ms
memory: 3764kb

input:

10
2357 42596 7212 30898 43465 68984 60783 59520 53767 77560
10
39115 88080 83553 61736 90821 39690 13194 81396 38051 55993
10
95070 81321 71632 21071 10807 46105 66844 63678 47577 75132
10
43898 93215 26791 11849 61857 1423 76971 83489 52044 61325
10
22610 16613 90 53598 80110 42651 64942 67114 242...

output:

446708194
257946991
952382868
642849497
760203822
33805049
854203884
122780598
407706010
698568081
611328155
899275177
459084585
996702073
559906792
819581438
414160914
161400672
627462905
321996311
254841532
154152614
421988955
89216912
917350548
517172588
860935867
410207144
334759605
19494324
805...

result:

wrong answer 1st numbers differ - expected: '8747181', found: '446708194'