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的PASCAL代码var s:string; cc:char; aa:array ['a'..'z'] of char; ab:array ['A'..'Z'] of char; a,i,j,k:integer; begin for i:=1 to 26 do begin read(cc); aa[chr(97+i-1)]:=cc; ab[chr(65+i-1)]:=chr(ord(cc)-32); end; readln;readln(s); for i:=1 to length(s) do if (s[i]<='Z') and (s[i]>='A') then s[i]:=ab[s[i]] else if (s[i]<='z') and (s[i]>='a') then s[i]:=aa[s[i]]; writeln(s); end. Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator