记录编号 | 66677 | 评测结果 | AAAAAAAAAA | ||
---|---|---|---|---|---|
题目名称 | [暑假培训2012] 单词缩写 | 最终得分 | 100 | ||
用户昵称 | 是否通过 | 通过 | |||
代码语言 | Pascal | 运行时间 | 0.002 s | ||
提交时间 | 2013-07-30 17:09:41 | 内存使用 | 0.17 MiB | ||
var s,q:string; a,b,i,j,n:longint; begin assign(input,'abbreviation.in'); reset(input); assign(output,'abbreviation.out'); rewrite(output); readln(n); for a:=1 to n do begin readln(s); s:=s+' '; q:=''; for b:=1 to length(s) do if (s[b]>='a') and (s[b]<='z') then s[b]:=chr(ord(s[b])-32); for b:=1 to length(s) do if s[b]<>' ' then q:=q+s[b] else begin if (q<>'AND') and (q<>'FOR') and (q<>'THE') and (length(q)>=3) then write(q[1]); q:=''; end; writeln; end; close(input); close(output); end.