QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#90115 | #5253. Denormalization | chiranko# | WA | 2ms | 3592kb | C++14 | 516b | 2023-03-22 13:26:07 | 2023-03-22 13:26:18 |
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 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]*1e12));
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: 3592kb
input:
2 0.909840249060 0.414958698174
output:
909840 414959
result:
wrong answer Integer parameter [name=r_i] equals to 909840, violates the range [1, 10000]