字符串分类统计C++
摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstring>using namespace std;int main(){char a[200];cin.get……
编写题解 1010: [编程入门]利润计算
摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a,b,c,d,f; char s[200]; a=……
【编程入门】字符串分类统计
摘要:参考代码:#include <stdio.h>intmain(void){ int letter = 0, number = 0, space = 0, other = 0; char c……
for循环统计(c语言)
摘要:解题思路:注意事项:如果不是if{}else if{}的形式,内存会过大。参考代码:#include
#include
int main(void)
{
char str[200];
……
编写题解 1012: [编程入门]字符串分类统计
摘要:解题思路:数字在ascll中是48到57字母大写是65到90 小写是97到122注意事项:参考代码:import java.util.*;public class Main { public ……
【编程入门】字符串分类统计
摘要:解题思路:注意事项:参考代码:#include <stdio.h>
#include <string.h>
int main()
{
char ch[200]; //字符串的定义
……
python用for解决
摘要:解题思路:注意事项:参考代码:str=input()a,b,c,d=0,0,0,0for i in str: if (i>='A' and i<='Z') or ……
字符串分类统计(python正则表达式解)
摘要:解题思路:python正则表达式中re.findall方法全局匹配字符,匹配成功我们得到一个列表,通过len()方法统计列表长度来表示该类字符出现了多少次。注意事项:导入正则表达式re模块通过end=……
字符串分类统计的Python解法
摘要:解题思路:注意事项:参考代码:s=input()a,b,c,d=0,0,0,0for i in s: if i.isdigit(): a+=1 elif i.isalpha(……