输入包括一个字符串s,字符串长度length(1 ≤ length ≤ 50),字符串中只包括小写字母('a'~'z')和空格。
输出一个字符串,即缩写的结果。
looks good to me
lgtm
参考代码:
#include<bits/stdc++.h> using namespace std; typedef long long ll; const int maxn=100; char s[maxn]; int main() { gets(s); printf("%c",s[0]); for(int i=1;s[i];++i) { if(s[i-1]==' ') printf("%c",s[i]); } puts(""); return 0; }