QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#102412 | #5253. Denormalization | fz_zsl# | WA | 2ms | 3600kb | C++14 | 580b | 2023-05-03 12:52:25 | 2023-05-03 12:52:30 |
Judging History
answer
#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
double a[10005];
int main() {
int n;
double mn=1.0,mx=0.0;
scanf("%d",&n);
for (int i=1;i<=n;++i) {
cin>>a[i];
mx=max(mx,a[i]);
mn=min(mn,a[i]);
}
for (int i=(int)(mx/mn);i<=10000;++i) {
bool flag=true;
for (int j=1;j<=n;++j) {
double x=a[j]*i/mx;
if ((int(x*10000))%10000!=0) {
flag=false;
break;
}
}
if (flag) {
for (int j=1;j<=n;++j) {
double x=a[j]*i/mx;
printf("%d\n",int(x));
}
return 0;
}
}
return 0;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 2ms
memory: 3600kb
input:
2 0.909840249060 0.414958698174
output:
result:
wrong output format Unexpected end of file - int32 expected