Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

1AC PASCAL

Posted by aiouniya at 2012-08-24 10:02:29 on Problem 2608
const 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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator