- N连环
- 2009-03-07 22:52:40 @
program p1516;
var s1,s2,s:string;
ans:double;
i,l:longint;
Begin
readln(s1);
readln(s2);
l:=length(s1);
for i:=1 to l do s:=s+'0';
for i:=1 to l do
if s[i]s1[i] then
begin
ans:=ans+1 shl (l-i);
s:='1';
end;
s:='';
for i:=1 to l do s:=s+'0';
for i:=1 to l do
if s[i]s2[i] then
begin
ans:=ans-1 shl (l-i);
s:='1';
end;
writeln(abs(ans):0:0);
End.
这年头水题也折磨我
0 条评论
目前还没有评论...