#include #include using namespace atcoder; using namespace std; using ll=long long; using ld=long double; ld pie=3.141592653589793; ll mod=998244353; ll inf=1009999999999999990; int main(){ ll n,m; cin >> n >> m; vectorw(n); ld sum=0; ld syo=inf; for (ll i = 0; i < n; i++) { cin >> w[i]; sum+=w[i]; } vectorx(n); for (ll i = 0; i < n; i++) { ll left=0,right=m+1; while (right-left>1) { ll mid=(right+left)/2; if (sum>(w[i]*m)/mid) { right=mid; }else{ left=mid; } } x[i]=left; } for (ll i = 0; i < n; i++) { cout << x[i] << ' '; } cout << endl; }