比赛 板子大赛 评测结果 AAAAWWWWWW
题目名称 独木舟 最终得分 40
用户昵称 Asher 运行时间 0.089 s
代码语言 C++ 内存使用 3.27 MiB
提交时间 2025-01-22 11:29:07
显示代码纯文本
#include <bits/stdc++.h>
using namespace std;
int n, m, w;
int main()
{
	freopen("kaj.in","r",stdin);
	freopen("kaj.out","w",stdout);
	cin >> n >> m;
	for(int i = 1;i <= m; i++)
	{
		int a;
		cin >> a;
		w += a;
	}
	if(w % n == 0)
		cout << w / n;
	else
		cout << w /n + 1;
	return 0;
}