- 字符串还原
- 2012-08-08 18:10:06 @
program fdsg;
var
i,j,n,m,k,l,k1:longint;
s1,s2,s3,ans:ansistring;
s4,s:array[0..1000] of ansistring;
a:array[1..26] of 'a'..'z';
b:array['a'..'z'] of 1..26;
ch:char;
begin
assign(input,'string.in');reset(input);
assign(output,'string.out');rewrite(output);
readln(n);
s1:='';
s2:='';
s3:='';
for i:=1 to 3 do
readln(s[i]);
k:=1;
for ch:='a' to 'z' do
begin
a[k]:=ch;
b[ch]:=k;
inc(k);
end;
for i:=1 to 3 do
begin
s1:='';
for j:=n downto 1 do
begin
ch:=s;
s1:=s1+ch;
end;
for k:=0 to 6 do
begin
s2:=''; s3:='';
for l:=1 to n do
begin
if b[s1[l]]+k>26 then s2:=s2+a[b[s1[l]]+k-26] else s2:=s2+a[b[s1[l]]+k];
if b[s1[l]]-k
1 条评论
-
woshishui--- LV 10 @ 2012-08-11 10:28:40
表示我被锁过一天……
我对我曾经的行为深表歉意。
- 1