#include<iostream>#include<cstdio>using namespace std;int main(){ int T; cin>>T; while(T--) { int n,m; int sum=0; int maxn=0; int ans; cin>>n>>m; int temp; for(int i=0;i<n;i++) { scanf("%d",&temp); maxn=max(maxn,temp); sum+=temp; } ans=sum/m; if(sum%m!=0) { ans++; } ans=max(ans,maxn); cout<<ans<<endl; }}


