#include #define rep(i,n) for(int i = 0; i < (n); ++i) #define srep(i,s,t) for (int i = s; i < t; ++i) #define drep(i,n) for(int i = (n)-1; i >= 0; --i) using namespace std; typedef long long int ll; typedef pair P; #define yn {puts("Yes");}else{puts("No");} #define MAX_N 200005 double f[600000] = {}; int main() { int n; cin >> n; double a[n]; rep(i,n) cin >> a[i]; int q; cin >> q; int b[q]; rep(i,q) cin >> b[i]; pair p; priority_queue> que; rep(i,n){ p.first.first = a[i]; p.first.second = 1; p.second = i; que.push(p); } srep(i,1,600000){ p = que.top(); que.pop(); f[i] = p.first.first; p.first.second++; p.first.first = a[p.second] / p.first.second; que.push(p); } rep(i,q){ cout << fixed << setprecision(10) << f[b[i]] << endl; } return 0; }