首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
mlx
2026年1月30日 22:16
字符分类 题解:
P1016
回复 0
|
赞 0
|
浏览 39
#include<iostream> #include<vector> using namespace std; string str; string res1,res2,res3; int main() { cin>>str; for(int i=0;i<str.size();i++) { if(str[i]>='a'&&str[i]<='z'||str[i]>='A'&&str[i]<='Z') res1.push_back(str[i]...
yauqq
2026年1月28日 15:28
字符分类 题解:
P1016
回复 0
|
赞 0
|
浏览 62
#include<bits/stdc++.h> using namespace std; int main(){ string str; cin >> str; string str1[100]; string str2[100]; string str3[100]; int i=0,j=0,k=0; for(char c:str){ if((c >= 'a' && c <= 'z')||(c >= 'A' && c <= 'Z')) { str1[i++] ...
曾不会
2026年1月24日 18:47
字符分类 题解:
P1016
回复 0
|
赞 0
|
浏览 101
3个循环 #include<stdio.h> #include<string.h> int main() { char s[110]; fgets(s,110,stdin); int l=strlen(s); for(int i=0;i<l;i++) { if(s[i]&g...
Jun_
2026年1月22日 17:26
字符分类 题解:C++
P1016
回复 0
|
赞 0
|
浏览 104
#include<stdio.h> #include <iostream> #include<math.h> #include <stdlib.h> #include <string> #include<algorithm> using namespace std; int main () { string s,str1,str2,str3; getline(cin,s); for(in...
奶龙大王
2026年1月16日 20:20
字符分类 题解:
P1016
回复 0
|
赞 0
|
浏览 118
else的易错点范围由前面一个if确定 #include <stdio.h> #include <string.h> #include<iostream> using namespace std; int main() { char zm[100]; char sz[100]; char ...
jerryking
2026年1月5日 21:31
字符分类 题解:c三次遍历字符串依次输出
P1016
回复 0
|
赞 2
|
浏览 223
#include<stdio.h> #include<string.h> #include<ctype.h> int main(){ char str[100]; fgets(str,sizeof(str),stdin); str[strcspn(str,"\n")] = '\0'; int len = strlen(str);  ...
波耶菠萝蜜
2025年7月24日 14:43
字符分类 题解:
P1016
回复 0
|
赞 1
|
浏览 754
本质还是ASCII码的使用,就是不知道为什么分好类后直接输出数组不行,可能判定\0不符合标准把, fgets是个好东西啊 #include <stdio.h> #include <string.h> int main(){ char a[100]; char word[100];//字母类别 int j=0; int o=0; int p=0; c...
Kuze606
2025年3月22日 17:50
字符分类 题解(C):
P1016
回复 0
|
赞 4
|
浏览 1.4k
#include<stdio.h> #include<stdlib.h> #include<string.h> #define MAXSIZE 100 int main(){ char str[MAXSIZE],ch[MAXSIZE],num[MAXSIZE],other[MAXSIZE]; gets(str); int len=strlen(str); int i,c=0,n=0,o=0; for(i=0; i<len; i++){ if((str[i]<='Z'&&str[i]&...
yb5942
2025年3月21日 17:10
字符分类 题解:
P1016
回复 0
|
赞 5
|
浏览 840
#include <bits/stdc++.h> using namespace std; //暴力 int main() { char arr[150]={0}; cin>> arr; char c[150],f[150],s[150]; int i=0,j=0,k=0,h=0; while (arr[i]!=0){ if(arr[i]>='0'&& arr[i]<='9'){ f[k++]=ar...
blackbook537
2025年3月15日 21:28
字符分类 题解:
P1016
回复 0
|
赞 6
|
浏览 1.2k
#include<stdio.h> #include<string.h> int main(){ char s[1000]; scanf("%s",&s); int len = strlen(s); char a[1000],b[1000],c[1000]; int j,k,u; &nbs...
1
2
3
4
题目
字符分类
题解数量
33
发布题解
在线答疑
热门题解
1
字符分类 题解:C
2
字符分类 题解:
3
字符分类 题解:
4
字符分类 题解:
5
字符分类 题解(C):
6
字符分类 题解:
7
字符分类 题解:
8
字符分类 题解:c三次遍历字符串依次输出
9
字符分类 题解:空间换时间
10
将字符强转成int再根据ASCII码做判断