QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#90130 | #5253. Denormalization | chiranko# | WA | 2ms | 3484kb | C++14 | 587b | 2023-03-22 13:36:33 | 2023-03-22 13:36:36 |
Judging History
answer
#include<bits/stdc++.h>
#define rep(l,r) for(int i=l;i<=r;i++)
using namespace std;
typedef long double LD;
typedef long long ll;
const int N=1e4+10;
int n;
LD a[N];
ll b[N];
int tround(ll x)
{
return x/10000;
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
cin>>n;
rep(1,n)cin>>a[i];
rep(1,n)b[i]=round(sqrt(a[i]*a[i]*1e16));
rep(1,n)b[i]=tround(b[i]);
ll d=b[1];
rep(2,n)d=__gcd(d,b[i]);
rep(1,n)b[i]/=d;
rep(1,n)cout<<b[i]<<"\n";
// LD q=0;
// rep(1,n)q+=(LD)b[i]*b[i];
// q=sqrt(q);
// rep(1,n)cout<<b[i]/q<<"\n";
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 2ms
memory: 3484kb
input:
2 0.909840249060 0.414958698174
output:
9098 4149
result:
wrong answer incorrect solution