#include<stdio.h>#include<string.h>
int main()
{
int n,i,j,min,sum;
int count[20];
while(scanf("%d",&n),n)
{
char ch;
sum = 0;
memset(count,0,sizeof(count));
for(i=0; i<n; i++)
{
for(j=0; j<26; j++)
if((ch=getchar())==' ')
count[i]++;
sum += count[i];
if(i==0) min = count[i];
else if(count[i]<min) min = count[i];
}
printf("%d\n",sum-min*n);
}
return 0;
}
/*
4
XXXX XXXXX
XXX XXXXXXX
XXXXX XXXX
XX XXXXXX
2
XXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXX XX
0
*/
Uva 414 Machined Surfaces
原创mb61c2e9efaa57a ©著作权
©著作权归作者所有:来自51CTO博客作者mb61c2e9efaa57a的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
UVA - 414 Machined Surfaces
题目大意:计算空格填满后还剩多少个空格解题思路:用数组存粗
i++ #include 字符串 -
Parametric Curves and Surfaces
Abstract. This paper is concerned with parametric curves and surfaces definitions, such as singular point and regular point and their application in OpenCascade. The two most common methods of represe
OpenCascade Parametric Curves Parametric Surfaces Singular Point 正则 -
Render OpenCascade Geometry Surfaces in OpenSceneGraph
摘要Abstract:本文对OpenCascade中的几何曲面数据进行简要说明,并结合OpenSceneGraph将这些曲面显示。 关键字Key Words:OpenCascade、OpenSceneGraph、Geometry Surface、NURBS在OpenSceneGraph中绘制OpenCascade的曲面Render OpenCascade Geometry Surfaces
OpenCascade Geometry Surface OpenSceneGraph NURBS #include -
数组-Leetcode-414
0️⃣python数据结构与算法学习路线学习内容:基本算法:枚举、排序、
算法 数据结构 leetcode python 数组