QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#790686#9627. 算术AaWA 0ms3952kbC++17784b2024-11-28 14:41:352024-11-28 14:41:36

Judging History

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

  • [2024-11-28 14:41:36]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3952kb
  • [2024-11-28 14:41:35]
  • 提交

answer

#include <iostream>
#include <algorithm>
#define int long long
using namespace std;
signed main(){
	int T;
	char mod='%';
	scanf("%lld",&T);
	while(T--){
		int ppmax;
		int a,b,c,d,e,f;
		scanf("%lld",&ppmax);
		scanf("%lld %lld %lld %lld %lld %lld",&a,&b,&c,&d,&e,&f);
		double Acc=(double)(300*a+300*b+200*c+100*d+50*e)/(300*(a+b+c+d+e+f))*10000;
		int res=Acc/1;
		if(Acc-res>=0.5 || 0.5-(Acc-res)<1e-4) res++;
		printf("%lld.%02lld%c ",res/100,res%100,mod);
		Acc=max((double)0,(double)(320*a+300*b+200*c+100*d+50*e)/(320*(a+b+c+d+e+f))-0.8)*(double)5*ppmax;
		res=Acc/1;
		if(Acc-res>=0.5 || 0.5-(Acc-res)<1e-4) res++;
//		printf("%.10lf\n",Acc);
		printf("%lld\n",res);
	}
	return 0;
}
//2
//630
//3029 2336 377 41 10 61
//3000
//20000 10000 0 0 0 0

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3952kb

input:

7
5 3 0 0 0 0 0 0 0
4 1 1 1 0 0 0 0 0
1 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 1
1 0 0 0 0 0 0 0 2
99 88 77 66 55 44 33 22 11
100 90 80 70 60 50 40 30 20

output:

100.00% 5
73.81% 0
33.33% 0
0.00% 0
-92233720368547758.-8% 0
100.00% 1
33.18% 0

result:

wrong answer 1st lines differ - expected: '54', found: '100.00% 5'