按照题目意思模拟即可。

 Program XJOI2265;
const a:array[..] of char=('a','e','i','o','u','A','E','I','O','U');
var s:ansistring;
len,i,j,sum,x,y:longint;
flag:boolean;
function check(ch:char):boolean;
begin
if (ch>='A') and (ch<='Z') or (ch>='a') and (ch<='z') then exit(true); exit(false);
end;
function vowel(ch:char):boolean;
var i:longint;
begin
for i:= to do if ch=a[i] then exit(true); exit(false);
end;
begin
readln(s);
len:=length(s); sum:=;
for i:= to len do
if check(s[i]) then
begin
write('.');
inc(sum);
end
else write(s[i]);
writeln;
//---------------------- the first --------------------------
x:=round(sum / );
for i:= to len do
if check(s[i]) then
if x> then
begin
write(s[i]);
dec(x);
if x= then y:=i;
end
else write('.')
else write(s[i]);
writeln;
//----------------------- the second -------------------------
flag:=false;
for i:=y+ to len do
if vowel(s[i]) then
begin
flag:=true;
break;
end;
for i:= to y do write(s[i]);
if flag then
for i:=y+ to len do
if check(s[i]) then
if vowel(s[i]) then write(s[i]) else write('.')
else write(s[i])
else
begin
x:=round( sum*/)-round(sum/);
for i:=y+ to len do
if check(s[i]) then
if x> then
begin
write(s[i]);
dec(x);
end
else write('.')
else write(s[i]);
end;
writeln;
//----------------------- the end ------------------------- end.

最新文章

  1. pyqt5-为QListWidget添加右键菜单
  2. poj 3621 二分+spfa判负环
  3. Java面向对象:接口
  4. 关于 android 开发中 debug不能顺利进行的各种问题的总结
  5. 【android-tips】如何在view中取得activity对象
  6. Python开发【第八章】:Socket
  7. 传递给后台的Json数据解析
  8. Java集合类源码分析
  9. Python命令行解析库argparse
  10. AJAX全套
  11. CQRS学习——最小单元的Cqrs(CommandEvent)[其一]
  12. Struts2的工作流程
  13. OC5_构造方法与self指针
  14. linux下显卡信息的查看
  15. .NET知识点总结一(笔记整合)
  16. C#连接六类数据库的代码集
  17. [转]MySQL修改时区的方法小结
  18. 【Ansible 文档】配置
  19. MATLAB遍历文件夹下所有文件
  20. R语言数据整理

热门文章

  1. Java 多线程 —— synchronized关键字
  2. MATLAB实现矩阵分块相乘
  3. 《Play for Java》学习笔记(六)文件上传file upload
  4. 修改WAMPServer中MySql中文乱码的方法
  5. vsto publish后无法弹出winform窗口
  6. JDE修改Grid列样式
  7. 在ASP.NET MVC中使用CKEditor和CkFinder
  8. nbtstat -a &lt;IP&gt; 会显示主机名、所在工作组等信息
  9. Js中 关于top、clientTop、scrollTop、offsetTop的用法
  10. Unity安卓连接profile调试