首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
HKX9XAS
2026年3月20日 18:59
字符分类 题解:
P1016
回复 0
|
赞 0
|
浏览 41
#include<stdio.h> #include<string.h> #include<iostream> #include<string> #include<algorithm> using namespace std; int main(){ string s; while(cin>>s){ string alpha; ...
ZeroQi_404
2026年3月11日 22:25
字符分类 题解:
P1016
回复 0
|
赞 4
|
浏览 101
#include <iostream> #include <string> using namespace std; int main(){ string s; cin >> s; for(char c : s){ if((c>='A' && c<='Z') || (c>='a' && c<='z')) cout << c; } cout << endl; ...
xsw
2026年2月6日 11:39
字符分类 题解:
P1016
回复 0
|
赞 9
|
浏览 237
#include<iostream> using namespace std; int main() { string s; getline(cin, s); string num, alp, other; for (auto c : s) { if (isdigit(c)) num += c; else if (isalpha(c)) alp += c; else other += c; } cout << alp << endl << num <&l...
mlx
2026年1月30日 22:16
字符分类 题解:
P1016
回复 0
|
赞 3
|
浏览 190
#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
|
赞 1
|
浏览 214
#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
|
赞 4
|
浏览 285
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
|
浏览 164
#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
|
浏览 214
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
|
浏览 348
#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
|
赞 2
|
浏览 897
本质还是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...
1
2
3
4
题目
字符分类
题解数量
36
发布题解
在线答疑
热门题解
1
字符分类 题解:C
2
字符分类 题解:
3
字符分类 题解:
4
字符分类 题解:
5
字符分类 题解:
6
字符分类 题解(C):
7
字符分类 题解:
8
字符分类 题解:
9
字符分类 题解:
10
字符分类 题解: