delete pics to save space
This commit is contained in:
25
history_source/信息学奥赛一本通/1.5.3.14.cpp
Normal file
25
history_source/信息学奥赛一本通/1.5.3.14.cpp
Normal file
@ -0,0 +1,25 @@
|
||||
#include<iostream>
|
||||
#include<string>
|
||||
using namespace std;
|
||||
int main()
|
||||
{
|
||||
string a;
|
||||
getline(cin,a);
|
||||
bool flag=0;
|
||||
int add=0;
|
||||
for(int i=0;i<a.size();i++)
|
||||
{
|
||||
if(a[i]!=' ') add++;
|
||||
else if(add>0)
|
||||
{
|
||||
if(flag) cout<<",";
|
||||
cout<<add;
|
||||
flag=1;
|
||||
add=0;
|
||||
}
|
||||
}
|
||||
if(flag) cout<<",";
|
||||
cout<<add;
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user