首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
ZeroQi_404
2026年3月12日 16:40
统计单词 题解:
P1394
回复 4
|
赞 33
|
浏览 495
#include <iostream> #include <string> using namespace std; int main(){ string s; getline(cin, s); int count = 0; for(int i = 0; i < s.size(); i++){ if(s[i] == '.'){ if(count > 0) cout << count; ...
太一
2026年3月14日 23:41
统计单词 题解:
P1394
回复 0
|
赞 3
|
浏览 183
#include<iostream> #include<cmath> #include<algorithm> #include<string> using namespace std; int main() { string s; int sum = 0; while (getline(cin, s)) { sum = 0; &nb...
HKX9XAS
2026年3月14日 22:13
统计单词 题解:C语言
P1394
回复 0
|
赞 3
|
浏览 222
#include<stdio.h> int main(){ char s[1000]; while( gets(s)){ int flagkong=1; //表示本次是否第一次输出次数,以控制少输出一个空格 int flagc=0; //表示是否开始有效计数 &nbs...
王艺道
2026年3月14日 17:12
统计单词 题解:
P1394
回复 0
|
赞 0
|
浏览 160
#include<bits/stdc++.h> using namespace std; string s1, s2; int main(){ while(getline(cin, s1)){ int f = 1; s2.clear(); int n = 0; &n...
kkkkkkllll
2026年3月10日 14:18
统计单词 题解:
P1394
回复 0
|
赞 2
|
浏览 220
#include<iostream> #include<string> #include<vector> using namespace std; int main(){ string str1; vector<string>vec1; while(cin>>str1){ if(str1[str1.size()-1]!='.'){ ...
Jinx_K
2026年3月9日 23:05
统计单词 题解:注意边界条件,利用flag标记是否单词!
P1394
回复 0
|
赞 5
|
浏览 258
#include <bits/stdc++.h> using namespace std; int main() { string s; while (getline(cin, s)) { int count = 0, flag = 0; for (int i = 0; i < s.length(); ++i) { if (s[i] >= 'a' && s[i] <= 'z' || s[i] >= 'A' && s[i] <= 'Z') {...
uly
2026年3月4日 15:04
统计单词 题解:
P1394
回复 0
|
赞 16
|
浏览 323
#include <bits/stdc++.h> using namespace std; int main() { string s; while (getline(cin,s)) { int counts = 0; for (int i=0; i<s.length(); i++) { if (s[i]>='a' && s[i]<='z') { counts++; continue; ...
曾不会
2026年2月14日 13:26
统计单词 题解:
P1394
回复 0
|
赞 0
|
浏览 235
while(1): try: iin=input() ll=len(iin) nn=iin[:ll-1] s = list(map(str, nn.split())) l = len(s) for i in range(l): out=0 for j in s[i]: out+=1 print(out,end=' ') pr...
bro
2026年2月8日 14:36
统计单词 题解:c++
P1394
回复 0
|
赞 20
|
浏览 581
#include <bits/stdc++.h> using namespace std; int main() { string s ; while(getline(cin,s)){ int temp = 0; for(int i = 0 ; i < s.size() ; i++){ &nb...
ryuki
2026年2月5日 21:03
统计单词 题解:句号前有空格
P1394
回复 0
|
赞 11
|
浏览 461
#include <iostream> #include <string> #include <cctype> using namespace std; int main() { string str; int cnt; while(cin >> str) { if(str.size() == 1 && str[0] == '.') continue; //不加这句只过80% cnt = 0; for(int i = 0; ...
1
2
3
...
6
题目
统计单词
题解数量
60
发布题解
在线答疑
热门题解
1
统计单词 题解:写出这么简单的代码也是神人了
2
纯纯逆天测试例(‘.'前有可能是空格)
3
统计单词 题解:
4
统计单词 题解:
5
统计单词 题解:c++
6
统计单词 题解:
7
统计单词 题解:可过,判断条件很简单
8
统计单词(C++) 题解:
9
统计单词 题解:
10
统计单词 题解: