type
light = (top, lefttop, righttop, middle, leftbottom, rightbottom, bottom);
digital = set of light;
const
nums : array[0..9] of digital
= ([top, lefttop, righttop, leftbottom, rightbottom, bottom],
[righttop, rightbottom],
[top, righttop, middle, leftbottom, bottom],
[top, righttop, middle, rightbottom, bottom],
[lefttop, righttop, middle, rightbottom],
[top, lefttop, middle, rightbottom, bottom],
[top, lefttop, middle, leftbottom, rightbottom, bottom],
[top, righttop, rightbottom],
[top, lefttop, righttop, middle, leftbottom, rightbottom, bottom],
[top, lefttop, righttop, middle, rightbottom, bottom]
);
var
i, j : longint;
begin
for i:=0 to 9 do begin
for j:=0 to 9 do
if (nums[i] + nums[j] = nums[i]) or (nums[i] + nums[j] = nums[j]) then
write('1 ')
else
write('0 ');
writeln;
end;
end.
这段代码虽然不是答案,但应该可以帮助找到答案。下面是输出:
1 1 0 0 0 0 0 1 1 0
1 1 0 1 1 0 0 1 1 1
0 0 1 0 0 0 0 0 1 0
0 1 0 1 0 0 0 1 1 1
0 1 0 0 1 0 0 0 1 1
0 0 0 0 0 1 1 0 1 1
0 0 0 0 0 1 1 0 1 0
1 1 0 1 0 0 0 1 1 1
1 1 1 1 1 1 1 1 1 1
0 1 0 1 1 1 0 1 1 1