1 条题解
-
0
C :
#include<stdio.h> int x[50000]; int main() { int n,sum,time; scanf("%d",&n); while(n--) { int a,b; sum=0; scanf("%d%d",&a,&b); int i,j; for(i=0; i<a; i++) { scanf("%d",&x[i]); sum+=x[i]; } int max=0; for(i=0;i<a;i++) if(max<x[i]) max=x[i]; if(b>=a) printf("%d\n",max); else { if(sum%b==0) time=sum/b; else time=sum/b+1; if(time<max) time=max; printf("%d\n",time); } } return 0; }
- 1
信息
- ID
- 2066
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- (无)
- 标签
- 递交数
- 0
- 已通过
- 0
- 上传者