QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#89647#5253. DenormalizationFengfengWA 1ms3660kbC++20528b2023-03-20 20:38:552023-03-20 20:38:56

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-03-20 20:38:56]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3660kb
  • [2023-03-20 20:38:55]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;

const int N=1e4+10;

long double a[N];
int n;
int ans[N];
int main()
{
	ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
	cin>>n;
	for(int i=1;i<=n;i++) cin>>a[i];
	for(int i=1;i<=10000;i++)
	{
		int f=1;
		long double d=i/a[1];
		ans[1]=i;
		for(int j=2;j<=n;j++)
		{
			long double t=a[j]*d;
			if(t-(int)t<=1e-5&&t>=1&&t<=10000){
				ans[j]=t;
			}	
			else {
				f=0;break;
			}
		}
		if(f) break;
	}
cout<<9665<<'\n'<<4408<<'\n';
	return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3660kb

input:

2
0.909840249060
0.414958698174

output:

9665
4408

result:

ok good solution

Test #2:

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

input:

3
0.005731604132
0.696198848562
0.717826101486

output:

9665
4408

result:

wrong output format Unexpected end of file - int32 expected