QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#807980#9855. Glass Bead Gamerotcar07WA 0ms3972kbC++23240b2024-12-10 15:29:212024-12-10 15:29:30

Judging History

你现在查看的是最新测评结果

  • [2024-12-10 15:29:30]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3972kb
  • [2024-12-10 15:29:21]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
int n;double a[105];
int main(){
	cin>>n;for(int i=1;i<=n;i++) cin>>a[i];
	double ans=0;
	for(int i=1;i<=n;i++)
	for(int j=i+1;j<=n;j++) ans+=a[i]*a[j]*2/(a[i]+a[j]);
	cout<<ans<<'\n';
}

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3896kb

input:

2
0.500000 0.500000

output:

0.5

result:

ok found '0.5000000', expected '0.5000000', error '0.0000000'

Test #2:

score: 0
Accepted
time: 0ms
memory: 3836kb

input:

3
0.500000 0.250000 0.250000

output:

0.916667

result:

ok found '0.9166670', expected '0.9166667', error '0.0000003'

Test #3:

score: 0
Accepted
time: 0ms
memory: 3864kb

input:

1
1.000000

output:

0

result:

ok found '0.0000000', expected '0.0000000', error '-0.0000000'

Test #4:

score: 0
Accepted
time: 0ms
memory: 3904kb

input:

2
0.538027 0.461973

output:

0.497108

result:

ok found '0.4971080', expected '0.4971079', error '0.0000001'

Test #5:

score: 0
Accepted
time: 0ms
memory: 3972kb

input:

3
0.494273 0.190517 0.315210

output:

0.897453

result:

ok found '0.8974530', expected '0.8974534', error '0.0000004'

Test #6:

score: 0
Accepted
time: 0ms
memory: 3832kb

input:

4
0.197261 0.087416 0.104439 0.610884

output:

0.982439

result:

ok found '0.9824390', expected '0.9824393', error '0.0000003'

Test #7:

score: -100
Wrong Answer
time: 0ms
memory: 3892kb

input:

5
0.306241 0.077563 0.409216 0.059593 0.147387

output:

1.47794

result:

wrong answer 1st numbers differ - expected: '1.4779375', found: '1.4779400', error = '0.0000017'