QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#198974#6423. FireworksrsjWA 1ms3684kbC++14355b2023-10-03 19:51:382023-10-03 19:51:38

Judging History

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

  • [2023-10-03 19:51:38]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3684kb
  • [2023-10-03 19:51:38]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
using ld = long double;
void get() {
	long double n,m,p,i,ans=1e18,dt;
	cin>>n>>m>>p;
	dt=1;
	for(i=1;i<=1000000;i++) {
		dt*=1-p/10000;
		if((n*i+m)/(1-dt)<=ans) break;
		ans=min(ans,(n*i+m)/(1-dt));
	}
	printf("%.10Lf\n",ans);
}
int main() {
	int T; cin>>T;
	while(T--) get();
	return 0;
} 

詳細信息

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3684kb

input:

3
1 1 5000
1 1 1
1 2 10000

output:

1000000000000000000.0000000000
1000000000000000000.0000000000
1000000000000000000.0000000000

result:

wrong answer 1st numbers differ - expected: '4.00000', found: '1000000000000000000.00000', error = '250000000000000000.00000'