//二分答案的方式,将答案二分然后验证。 #include <bits/stdc++.h> typedef long long ll; using namespace std; const int maxn = 2e5+10; ll N, K; int a[maxn]; bool yanz(int x) { ll cnt = 0; for (int i=0;i<N;i++) { cnt += a[i]/x; } return cnt>=K; } int main() { cin>>N>>K; for (int i=0;i<N;i++) { cin>>a[i]; } int l = 0, r = 1000000000; while (l<r) { int mid = (l+r+1)/2; if (yanz(mid)) l = mid; else r = mid-1; } // cout<<yanz(20); cout<<l; return 0; }