Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
70题留念附pascal 1AC代码var a:string; len,i,ly,lf:integer; yuan,bbb:boolean; function yes:boolean; begin yes:=false; for i:=1 to len do begin if (a[i]='a')or(a[i]='e')or(a[i]='i')or(a[i]='o')or(a[i]='u') then begin yuan:=true;inc(ly);lf:=0;end else begin inc(lf);ly:=0;end; if (a[i]=a[i+1])and(a[i]<>'e')and(a[i]<>'o') then exit; if (ly>2)or(lf>2) then exit; end; if yuan then yes:=true; end; begin readln(a); while a<>'end' do begin yuan:=false; len:=length(a); ly:=0; lf:=0; a[len+1]:='@'; bbb:=yes; if bbb then writeln('<',a,'> is acceptable.') else writeln('<',a,'> is not acceptable.'); readln(a); end; end. Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator