#include <stdio.h>
#include <string.h>
int main(void)
{
int i, j;
int n;
char a[27];
int min, sum, t[14];
while (scanf("%d", &n) != EOF && n) {
getchar();
sum = 0;
min = 30;
memset(t, 0, sizeof(t));
for (i=0; i<n; ++i) {
fgets(a, 27, stdin);
for (j=0; j<25; ++j)
if (a[j] == ' ')
++t[i];
if (t[i] < min)
min = t[i];
sum += t[i];
}
printf("%d\n", sum-n*min);
}
return 0;
}
414 - Machined Surfaces
最新推荐文章于 2018-04-15 19:11:00 发布