#include<bits/stdc++.h>
using namespace std;
#define int long long
int a[100000]={0};
signed main(){
ios::sync_with_stdio(0),cin.tie(0);
int n,m,l=0;cin>>n>>m;
m*=2;
for(int i=0;i<n;i++)cin>>a[i],l=max(l,a[i]);
int im=l/m;
for(int i=im+1;i<l;i++){
int s=0;
for(int j=n-1;j>=0;j--)s+=a[j]/i;
if(s>=m)im=i;
else break;
}
cout<<im<<"\n";
}
不太懂owo
可以讓我參考你的code嗎?謝謝
私信囉
不太懂owo
可以讓我參考你的code嗎?謝謝
私信囉
那位大佬是寫python的,別強人所難XD(我看過他的c++教學影片,很抖)