记录编号 | 280405 | 评测结果 | AAAAAAAAAA | ||
---|---|---|---|---|---|
题目名称 | 932.[暑假培训2012] 单词缩写 | 最终得分 | 100 | ||
用户昵称 | 是否通过 | 通过 | |||
代码语言 | C++ | 运行时间 | 0.009 s | ||
提交时间 | 2016-07-10 12:00:34 | 内存使用 | 0.31 MiB | ||
#include<iostream> #include<cstdio> #include<cstring> #include<cstdlib> #include<algorithm>//\n using namespace std; char test; int t; string s; int main() { freopen("abbreviation.in","r",stdin); freopen("abbreviation.out","w",stdout); scanf("%d\n",&t); while(cin>>s) { test=getchar(); transform(s.begin(), s.end(),s.begin(),::toupper); if(s.length()<3||s=="THE"||s=="FOR"||s=="AND") {if(test=='\n') cout<<endl; continue;} cout<<s[0]; if(test=='\n') cout<<endl; } return 0; }