QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#418655 | #6648. 总投票数 | LinkWish# | WA | 2ms | 3880kb | C++14 | 1.1kb | 2024-05-23 15:01:37 | 2024-05-23 15:01:41 |
Judging History
answer
//Linkwish's code
#include<bits/stdc++.h>
#define endl '\n'
#define si static inline
#define mp make_pair
#define fi first
#define se second
using namespace std;typedef long long ll;typedef __int128 li;typedef long double ld;
typedef pair<int,int> pii;typedef pair<ll,ll> pll;typedef const int ci;
typedef const ll cl;const int iinf=INT_MAX;const ll linf=LLONG_MAX;
template<typename T>si bool gmax(T &x,const T y){if(x<y)return x=y,1;return 0;}
template<typename T>si bool gmin(T &x,const T y){if(y<x)return x=y,1;return 0;}
namespace LinkWish{
ci N=105;
const ld eps=5e-6;
int n;
ld a[N];
void mian(){
cin>>n;
for(int i=1;i<=n;i++)cin>>a[i];
cerr<<fixed<<setprecision(10);
for(int i=1;i<=1000000;i++){
bool flag=1;
ld ne=eps*i;
for(int j=1;j<=n;j++){
ld v=a[j]*i;
if(i==73)cerr<<v<<endl;
if(abs(v-(int)(v+0.5))>ne){flag=0;break;}
}
if(flag){
cout<<i<<endl;
return ;
}
}
}
}
signed main(){
#ifndef ONLINE_JUDGE
freopen("in.in","r",stdin);
#endif
ios::sync_with_stdio(0);
cin.tie(0),cout.tie(0);
LinkWish::mian();
return 0;
}
详细
Test #1:
score: 0
Wrong Answer
time: 2ms
memory: 3880kb
input:
100 0.009862 0.010100 0.009996 0.010052 0.009983 0.009759 0.009846 0.010008 0.010085 0.009909 0.010107 0.010161 0.010011 0.009956 0.009948 0.009979 0.010020 0.009991 0.010060 0.010080 0.009949 0.009897 0.010135 0.010042 0.010003 0.009957 0.009934 0.009838 0.010195 0.010249 0.009908 0.009959 0.010060...
output:
95778
result:
wrong answer 1st numbers differ - expected: '942983', found: '95778'