qwq第六个点wa了
查看原帖
qwq第六个点wa了
119537
mirayan楼主2021/1/13 13:08
#include <bits/stdc++.h>
using namespace std;

int main() {
	int s1, s2, s3;
	int ans = 0;
	int judge = 0;
	cin >> s1 >> s2 >> s3;
	int a[8001] = {0};
	for (int i = 1; i <= s1; i++)
		for (int j = 1; j <= s2; j++)
			for (int k = 1; k <= s3; k++)
				a[i + j + k]++;
	for (int i = 1; i <= s1 * 3; i++)
		if (a[i] > judge) {
			ans = i;
			judge = a[i];
		}

	cout << ans;

}
2021/1/13 13:08
加载中...