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 |
1AC PASCALconst a:array[1..26]of integer=(0,1,2,3,0,1,2,0,0,2,2,4,5,5,0,1,2,6,2,3,0,1,0,2,0,2); var last,i:integer; str:string; begin while not eof do begin readln(str); last:=0; for i:=1 to length(str) do begin if a[ord(str[i])-64]>0 then if a[ord(str[i])-64]<>last then write(a[ord(str[i])-64]); last:=a[ord(str[i])-64]; end; writeln; end; end. 顶起PASCAL!!! Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator