QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#89644 | #5253. Denormalization | Fengfeng | WA | 2ms | 3464kb | C++20 | 510b | 2023-03-20 20:29:13 | 2023-03-20 20:29:16 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
const int N=1e4+10;
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;
double d=i/a[1];
ans[1]=i;
for(int j=2;j<=n;j++)
{
double t=a[j]*d;
if(t-(int)t<1e-10){
ans[j]=t;
}
else {
f=0;break;
}
}
if(f) break;
}
for(int i=1;i<=n;i++) cout<<ans[i]<<'\n';
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 2ms
memory: 3464kb
input:
2 0.909840249060 0.414958698174
output:
10000 0
result:
wrong answer Integer parameter [name=r_i] equals to 0, violates the range [1, 10000]