5 条题解
-
1
马煜祥 (myx2311308347) LV 7 @ 5 年前
#include <stdio.h>
#include <string.h>
int Count(char s[]);
int main()
{
char s1[10000],s2[10000];
gets(s1);
gets(s2);
printf("%d %d",Count(s1),Count(s2));
return 0;
}
int Count(char s[])
{
int i,n,j=0;
for(i=0,n=strlen(s);i<n;i++)
{
if((s[i]>='a')&&(s[i]<='z'))
j++;
}
return j;
} -
04 年前@
-
05 年前@
-
-14 年前@
#include<iostream>
using namespace std;
const int N = 100010;
char s1[N],s2[N];
int main()
{
fgets(s1,10000,stdin);
fgets(s2,10000,stdin);
int res=0,sum=0;
for(int i=0;s1[i];i++)
if(islower(s1[i]))
res++;for(int i=0;s2[i];i++)
if(islower(s2[i]))
sum++;cout<<res<<' '<<sum<<endl;
return 0;
} -
-14 年前@
#include <stdio.h>
#include <string.h>
int Count(char s[]);
int main()
{
char s1[10000],s2[10000];
gets(s1);
gets(s2);
printf("%d %d",Count(s1),Count(s2));
return 0;
}
int Count(char s[])
{
int i,n,j=0;
for(i=0,n=strlen(s);i<n;i++)
{
if((s[i]>='a')&&(s[i]<='z'))
j++;
}
return j;
}
- 1
信息
- 难度
- 4
- 分类
- (无)
- 标签
- 递交数
- 1114
- 已通过
- 447
- 通过率
- 40%
- 被复制
- 10
- 上传者