174 条题解
-
0still LV 5 @ 2010-03-18 17:10:15
var
s:array[1..8,1..500]of char;
x,y,k,n,h:integer;
j:string;
begin
readln(k);
for x:=1 to 7 do
for y:=1 to k do s[x,y]:=' ';
h:=k+2;
read(j);
k:=length(j);
while k0 do
begin
inc(n);
if j[n]='1' then
begin
for x:=1 to 7 do
s[x,h]:=' ';
inc(h);
for x:=1 to 7 do
if (x=1)or(x=4)or(x=7) then s[x,h]:=' ' else s[x,h]:='|';
inc(h);
if k1 then
begin
for x:=1 to 7 do
s[x,h]:=' ';
inc(h);
end;
end;
if j[n]='2' then
begin
for x:=1 to 7 do
if (x=5)or(x=6) then s[x,h]:='|' else s[x,h]:=' ';
inc(h);
for x:=1 to 7 do
if (x=1)or(x=4)or(x=7) then s[x,h]:='-' else s[x,h]:=' ';
inc(h);
for x:=1 to 7 do
if (x=1)or(x=4)or(x=7) then s[x,h]:='-' else s[x,h]:=' ';
inc(h);
for x:=1 to 7 do
if (x=2)or(x=3) then s[x,h]:='|' else s[x,h]:=' ';
inc(h);
if k1 then
begin
for x:=1 to 7 do
s[x,h]:=' ';
inc(h);
end;
end;
if j[n]='3' then
begin
for x:=1 to 7 do
s[x,h]:=' ';
inc(h);
for x:=1 to 7 do
if (x=1)or(x=4)or(x=7) then s[x,h]:='-' else s[x,h]:=' ';
inc(h);
for x:=1 to 7 do
if (x=1)or(x=4)or(x=7) then s[x,h]:='-' else s[x,h]:=' ';
inc(h);
for x:=1 to 7 do
if (x=2)or(x=3)or(x=5)or(x=6) then s[x,h]:='|' else s[x,h]:=' ';
inc(h);
if k1 then
begin
for x:=1 to 7 do
s[x,h]:=' ';
inc(h);
end;
end;
if j[n]='4' then
begin
for x:=1 to 7 do
begin
if (x=2)or(x=3) then s[x,h]:='|'else s[x,h]:=' ';
inc(h);
end;
for x:=1 to 7 do
begin
if (x=4) then s[x,h]:='-'else s[x,h]:=' '; inc(h);
end;
for x:=1 to 7 do
begin
if (x=4) then s[x,h]:='-'else s[x,h]:=' '; inc(h);
end;
for x:=1 to 7 do
begin
if (x=2)or(x=3)or(x=5)or(x=6) then s[x,h]:='|'else s[x,h]:=' '; inc(h);
end;
inc(h);
if k1 then
begin
for x:=1 to 7 do
s[x,h]:=' ';
inc(h);
end;
end;
if j[n]='5' then
begin
for x:=1 to 7 do
if (x=2)or(x=3) then s[x,h]:='|' else s[x,h]:=' ';
inc(h);
for x:=1 to 7 do
if (x=1)or(x=4)or(x=7) then s[x,h]:='-' else s[x,h]:=' ';
inc(h);
for x:=1 to 7 do
if (x=1)or(x=4)or(x=7) then s[x,h]:='-' else s[x,h]:=' ';
inc(h);
for x:=1 to 7 do
if (x=5)or(x=6) then s[x,h]:='|' else s[x,h]:=' ';
inc(h);
if k1 then
begin
for x:=1 to 7 do
s[x,h]:=' ';
inc(h);
end;
end;
if j[n]='6' then
begin
for x:=1 to 7 do
if (x=5)or(x=6)or(x=2)or(x=3) then s[x,h]:='|' else s[x,h]:=' ';
inc(h);
for x:=1 to 7 do
if (x=1)or(x=4)or(x=7) then s[x,h]:='-' else s[x,h]:=' ';
inc(h);
for x:=1 to 7 do
if (x=1)or(x=4)or(x=7) then s[x,h]:='-' else s[x,h]:=' ';
inc(h);
for x:=1 to 7 do
if (x=2)or(x=3) then s[x,h]:='|' else s[x,h]:=' ';
inc(h);
if k1 then
begin
for x:=1 to 7 do
s[x,h]:=' ';
inc(h);
end;
end;if j[n]='7' then
begin
for x:=1 to 7 do
s[x,h]:=' ';
inc(h);
for x:=1 to 7 do
if (x=1) then s[x,h]:='-' else s[x,h]:=' ';
inc(h);
for x:=1 to 7 do
if (x=1) then s[x,h]:='-' else s[x,h]:=' ';
inc(h);
for x:=1 to 7 do
if (x=2)or(x=3)or(x=5)or(x=6) then s[x,h]:='|' else s[x,h]:=' ';
inc(h);
if k1 then
begin
for x:=1 to 7 do
s[x,h]:=' ';
inc(h);
end;
end;
if j[n]='8' then
begin
for x:=1 to 7 do
if (x=5)or(x=6)or(x=2)or(x=3) then s[x,h]:='|' else s[x,h]:=' ';
inc(h);
for x:=1 to 7 do
if (x=1)or(x=4)or(x=7) then s[x,h]:='-' else s[x,h]:=' ';
inc(h);
for x:=1 to 7 do
if (x=1)or(x=4)or(x=7) then s[x,h]:='-' else s[x,h]:=' ';
inc(h);
for x:=1 to 7 do
if (x=2)or(x=3)or(x=5)or(x=6) then s[x,h]:='|' else s[x,h]:=' ';
inc(h);
if k1 then
begin
for x:=1 to 7 do
s[x,h]:=' ';
inc(h);
end;
end;
if j[n]='9' then
begin
for x:=1 to 7 do
if(x=2)or(x=3) then s[x,h]:='|' else s[x,h]:=' ';
inc(h);
for x:=1 to 7 do
if (x=1)or(x=4)or(x=7) then s[x,h]:='-' else s[x,h]:=' ';
inc(h);
for x:=1 to 7 do
if (x=1)or(x=4)or(x=7) then s[x,h]:='-' else s[x,h]:=' ';
inc(h);
for x:=1 to 7 do
if (x=2)or(x=3)or(x=5)or(x=6) then s[x,h]:='|' else s[x,h]:=' ';
inc(h);
if k1 then
begin
for x:=1 to 7 do
s[x,h]:=' ';
inc(h);
end;
end;
if j[n]='0'then
begin
for x:=1 to 7 do
if (x=5)or(x=6)or(x=2)or(x=3) then s[x,h]:='|' else s[x,h]:=' ';
inc(h);
for x:=1 to 7 do
if (x=1)or(x=7) then s[x,h]:='-' else s[x,h]:=' ';
inc(h);
for x:=1 to 7 do
if (x=1)or(x=7) then s[x,h]:='-' else s[x,h]:=' ';
inc(h);
for x:=1 to 7 do
if (x=2)or(x=3)or(x=5)or(x=6) then s[x,h]:='|' else s[x,h]:=' ';
inc(h);
if k1 then
begin
for x:=1 to 7 do
s[x,h]:=' ';
inc(h);
end;
end;
dec(k);
end;
for x:=1 to 7 do
begin
for y:=1 to h-1 do
write(s[x,h]);
writeln;
end;
end. -
02010-03-11 13:20:36@
好猥琐的题啊!!!交了4次!!
一定要注意行末的空格…不能有空格!!
-
02009-11-09 21:15:09@
Program ex;
var k,n,m:integer;
s,s2:string;
i,j,a,b,c,i1,i2,i3:integer;begin
readln(k);
readln(s);
n:=k*2+3;
a:=1;
b:=a+k+1;
c:=b+k+1;
for i:=1 to k+1 do
s2:=s2+' ';
for i:=1 to n do
begin
write(s2);
for j:=1 to length(s) do
beginif i=a then begin
if s[j]='1' then begin write(' ');end;
if s[j]='4' then begin write(' ');for i1:=1 to k do write(' ');write(' ');write(' ');end;
if (s[j]'1')and(s[j]'4') then begin write(' ');for i1:=1 to k do write('-');write(' ');write(' ');end;
end;
if i=b then beginif s[j]='1' then begin write(' ');end;
if (s[j]='7')or(s[j]='0') then begin write(' ');for i1:=1 to k do write(' ');write(' ');write(' ');end;
if (s[j]'1')and(s[j]'7')and(s[j]'0') then begin write(' ');for i1:=1 to k do write('-');write(' ');write(' ');end;
end;
if i=c then beginif s[j]='1' then begin write(' ');end;
if (s[j]='7')or(s[j]='4') then begin write(' ');for i1:=1 to k do write(' ');write(' ');write(' ');end;
if (s[j]'1')and(s[j]'7')and(s[j]'4') then begin write(' ');for i1:=1 to k do write('-');write(' ');write(' ');end;
end;
if (i>a)and(ib)and(i -
02009-11-09 14:15:22@
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
├ 测试数据 07:答案正确... 0ms
├ 测试数据 08:答案正确... 0ms
├ 测试数据 09:答案正确... 0ms
├ 测试数据 10:答案正确... 0ms
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Accepted 有效得分:100 有效耗时:0msprogram ex;
const num:array[0..9,1..5] of string=((' - ',
'| |',
' ',
'| |',
' - '),
(' ',
' |',
' ',
' |',
' '),
(' - ',
' |',
' - ',
'| ',
' - '),
(' - ',
' |',
' - ',
' |',
' - '),
(' ',
'| |',
' - ',
' |',
' '),
(' - ',
'| ',
' - ',
' |',
' - '),
(' - ',
'| ',
' - ',
'| |',
' - '),
(' - ',
' |',
' ',
' |',
' '),
(' - ',
'| |',
' - ',
'| |',
' - '),
(' - ',
'| |',
' - ',
' |',
' - '));
var i,g,j,k,n:longint;
s:string;
begin
readln(n);
readln(s);
for i:=1 to length(s) do
begin
g:=ord(s[i])-48;
write(num[g,1,1]);
for j:=1 to n do write(num[g,1,2]);
write(num[g,1,3]);
if i=length(s) then writeln else write(' ');
end;
writeln;
for j:=1 to n do
for i:=1 to length(s) do
begin
g:=ord(s[i])-48;
write(num[g,2,1]);
for k:=1 to n do write(num[g,2,2]);
write(num[g,2,3]);
if i=length(s) then writeln else write(' ');
end;
writeln;
for i:=1 to length(s) do
begin
g:=ord(s[i])-48;
write(num[g,3,1]);
for j:=1 to n do write(num[g,3,2]);
write(num[g,3,3]);
if i=length(s) then writeln else write(' ');
end;
writeln;
for j:=1 to n do
for i:=1 to length(s) do
begin
g:=ord(s[i])-48;
write(num[g,4,1]);
for k:=1 to n do write(num[g,4,2]);
write(num[g,4,3]);
if i=length(s) then writeln else write(' ');
end;
writeln;
for i:=1 to length(s) do
begin
g:=ord(s[i])-48;
write(num[g,5,1]);
for j:=1 to n do write(num[g,5,2]);
write(num[g,5,3]);
if i=length(s) then writeln else write(' ');
end;
end. -
02009-11-02 22:04:13@
自认为const写的比较直观,这样定义处理起来比较简单
ps:Vijos的缩进真难看。。。。。。挺好的图形没了。。。
program vijos_1064;
const
num:array[0..9,1..5] of string[3]=
((' - ',
'| |',
' ',
'| |',
' - '),(' ',
' |',
' ',
' |',
' '),(' - ',
' |',
' - ',
'| ',
' - '),(' - ',
' |',
' - ',
' |',
' - '),(' ',
'| |',
' - ',
' |',
' '),(' - ',
'| ',
' - ',
' |',
' - '),(' - ',
'| ',
' - ',
'| |',
' - '),(' - ',
' |',
' ',
' |',
' '),(' - ',
'| |',
' - ',
'| |',
' - '),(' - ',
'| |',
' - ',
' |',
' - '));var
n:longint;
s:string;procedure init;
begin
readln(n);
readln(s);
end;procedure printLine(i:longint);
var
j,k,l:longint;
begin
for j:=1 to length(s) do begin
k:=ord(s[j])-48;
write(num[k,i,1]);
for l:=1 to n do write(num[k,i,2]);
write(num[k,i,3]);
if j=length(s) then writeln else write(' ');
end;
end;procedure main;
var
i:longint;
begin
printline(1);
for i:=1 to n do printLine(2);
printLine(3);
for i:=1 to n do printLine(4);
printLine(5);
end;begin
init;
main;
end. -
02009-11-02 14:30:11@
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
├ 测试数据 07:答案正确... 0ms
├ 测试数据 08:答案正确... 0ms
├ 测试数据 09:答案正确... 0ms
├ 测试数据 10:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:0msconst filename='p1064';
map:array[0..9,1..5]of string=
((' - ','| |',' ','| |',' - '),
(' ',' |',' ',' |',' '),
(' - ',' |',' - ','| ',' - '),
(' - ',' |',' - ',' |',' - '),
(' ','| |',' - ',' |',' '),
(' - ','| ',' - ',' |',' - '),
(' - ','| ',' - ','| |',' - '),
(' - ',' |',' ',' |',' '),
(' - ','| |',' - ','| |',' - '),
(' - ','| |',' - ',' |',' - '));
var i,j,k,p,q,n,x:longint;s:string;
begin
readln(n);
readln(s);
for p:=1 to 5 do
if not odd(p) then
for k:=1 to n do
begin
for j:=1 to length(s)do
begin
if j1then write(' ');
x:=ord(s[j])-ord('0');
for q:=1 to 3 do
if map[x,p,q]='|'then write('|')
else if (q=1)or(q=3) then write(' ')
else for i:=1 to n do write(map[x,p,q])
end;
writeln;
end
else if odd(p)then
begin
for j:=1 to length(s)do
begin
if j1 then write(' ');
x:=ord(s[j])-ord('0');
for q:=1 to 3 do
if map[x,p,q]='-'then
for i:=1 to n do write(map[x,p,q])
else if (q=1)or(q=3)then write(' ')
else for i:=1 to n do write(' ')
end;
writeln;
end;
end.
知道打表懒得打,于是从题解里抄了个表,应该很快做出来
结果,找规律找了好久……我智力退化了还是怎么的?奇异的图案打出了几十个
还有,第一个数之前没有空格 -
02009-10-21 13:36:15@
纪念本人123题AC!
而且还是这么恶心的题目。
-
02009-10-17 17:06:43@
hbmhalley的程序精辟。!
求解释! -
02009-10-10 21:38:41@
小号很快ac了,一激动,原封不动的让大号一交,-_-,后果很不爽.小号主义害死人啊...
-
02009-10-08 14:39:46@
Program Vijos_P1064;
Const
p: Array ['0'..'9'] Of String[5]=
('-d d-', ' r r ', '-r-l-', '-r-r-', ' d-r ', '-l-r-', '-l-d-', '-r r ', '-d-d-', '-d-r-');
Var
i, j, k: Byte; s: String;
a: Array [1..5] Of AnsiString;
Procedure Add(o:String);
Begin
For j:=1 To 5 Do
Case o[j] Of
'-': a[j]:=a[j]+' '+StringOfChar('-', k)+' ';
'l': a[j]:=a[j]+'|'+StringOfChar(' ', k+2);
'r': a[j]:=a[j]+StringOfChar(' ', k+1)+'| ';
'd': a[j]:=a[j]+'|'+StringOfChar(' ', k)+'| ';
' ': a[j]:=a[j]+StringOfChar(' ', k+3)
End
End;
Begin
ReadLn(k); ReadLn(s);
For i:=1 To Length(s) Do Add(p[s[i]]);
For i:=1 To 5 Do Delete(a[i], Length(a[i]), 1);
WriteLn(a[1]);
For i:=1 To k Do WriteLn(a[2]);
WriteLn(a[3]);
For i:=1 To k Do WriteLn(a[4]);
Write(a[5])
End. -
02009-10-08 12:55:45@
请用单组测试数据读入……不然20分
-
02009-10-02 09:51:39@
水!
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
├ 测试数据 07:答案正确... 0ms
├ 测试数据 08:答案正确... 0ms
├ 测试数据 09:答案正确... 0ms
├ 测试数据 10:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:0ms -
02009-09-21 17:04:52@
LSS的代码输出应该是一行一个数字
而这题的输出是只有一行!! -
02009-09-18 21:41:20@
这题真WS。
样例输出里面的最后的空格竟然是提行符……
我把样例复制到NOTEPAD上才发现这个……害我提交了四次 -
02009-09-15 13:08:10@
program p1064;
var
k :1..30;
st :string;
i,j,l :integer;
begin
assign(input,'p1064.in');reset(input);
assign(output,'p1064.out');rewrite(output);
readln(k);
readln(st);
{1}
for i:=1 to length(st) do
case st[i] of
'1':begin write(' ');
for j:=1 to k do write(' ');
write(' ');
end;
'2':begin write(' ');
for j:=1 to k do write('-');
write(' ');
end;'3':begin write(' ');
for j:=1 to k do write('-');
write(' ');
end;
'4':begin write(' ');
for j:=1 to k do write(' ');
write(' ');
end;
'5':begin write(' ');
for j:=1 to k do write('-');
write(' ');
end;
'6':begin write(' ');
for j:=1 to k do write('-');
write(' ');
end;
'7':begin write(' ');
for j:=1 to k do write('-');
write(' ');
end;
'8':begin write(' ');
for j:=1 to k do write('-');
write(' ');
end;
'9':begin write(' ');
for j:=1 to k do write('-');
write(' ');
end;
'0':begin write(' ');
for j:=1 to k do write('-');
write(' ');
end;
end;
writeln;
{2-2+k}
for i:=1 to k do
begin
for j:=1 to length(st) do
begin
case st[j] of
'1':begin write(' ');
for l:=1 to k do write(' ');
write('| ');
end;
'2':begin write(' ');
for l:=1 to k do write(' ');
write('| ');
end;'3':begin write(' ');
for l:=1 to k do write(' ');
write('| ');
end;
'4':begin write('|');
for l:=1 to k do write(' ');
write('| ');
end;
'5':begin write('|');
for l:=1 to k do write(' ');
write(' ');
end;
'6':begin write('|');
for l:=1 to k do write(' ');
write(' ');
end;
'7':begin write(' ');
for l:=1 to k do write(' ');
write('| ');
end;
'8':begin write('|');
for l:=1 to k do write(' ');
write('| ');
end;
'9':begin write('|');
for l:=1 to k do write(' ');
write('| ');
end;
'0':begin write('|');
for l:=1 to k do write(' ');
write('| ');
end;
end;
end;
writeln;
end;
for i:=1 to length(st) do
case st[i] of
'1':begin write(' ');
for j:=1 to k do write(' ');
write(' ');
end;
'2':begin write(' ');
for j:=1 to k do write('-');
write(' ');
end;'3':begin write(' ');
for j:=1 to k do write('-');
write(' ');
end;
'4':begin write(' ');
for j:=1 to k do write('-');
write(' ');
end;
'5':begin write(' ');
for j:=1 to k do write('-');
write(' ');
end;
'6':begin write(' ');
for j:=1 to k do write('-');
write(' ');
end;
'7':begin write(' ');
for j:=1 to k do write(' ');
write(' ');
end;
'8':begin write(' ');
for j:=1 to k do write('-');
write(' ');
end;
'9':begin write(' ');
for j:=1 to k do write('-');
write(' ');
end;
'0':begin write(' ');
for j:=1 to k do write(' ');
write(' ');
end;
end;
writeln;
for i:=1 to k do
begin
for j:=1 to length(st) do
begin
case st[j] of
'1':begin write(' ');
for l:=1 to k do write(' ');
write('| ');
end;
'2':begin write('|');
for l:=1 to k do write(' ');
write(' ');
end;'3':begin write(' ');
for l:=1 to k do write(' ');
write('| ');
end;
'4':begin write(' ');
for l:=1 to k do write(' ');
write('| ');
end;
'5':begin write(' ');
for l:=1 to k do write(' ');
write('| ');
end;
'6':begin write('|');
for l:=1 to k do write(' ');
write('| ');
end;
'7':begin write(' ');
for l:=1 to k do write(' ');
write('| ');
end;
'8':begin write('|');
for l:=1 to k do write(' ');
write('| ');
end;
'9':begin write(' ');
for l:=1 to k do write(' ');
write('| ');
end;
'0':begin write('|');
for l:=1 to k do write(' ');
write('| ');
end;
end;
end;
writeln;
end;
for i:=1 to length(st) do
case st[i] of
'1':begin write(' ');
for j:=1 to k do write(' ');
write(' ');
end;
'2':begin write(' ');
for j:=1 to k do write('-');
write(' ');
end;'3':begin write(' ');
for j:=1 to k do write('-');
write(' ');
end;
'4':begin write(' ');
for j:=1 to k do write('-');
write(' ');
end;
'5':begin write(' ');
for j:=1 to k do write('-');
write(' ');
end;
'6':begin write(' ');
for j:=1 to k do write('-');
write(' ');
end;
'7':begin write(' ');
for j:=1 to k do write(' ');
write(' ');
end;
'8':begin write(' ');
for j:=1 to k do write('-');
write(' ');
end;
'9':begin write(' ');
for j:=1 to k do write('-');
write(' ');
end;
'0':begin write(' ');
for j:=1 to k do write('-');
write(' ');
end;
end;
close(input);close(output);
end.为什么不对?
-
02009-09-12 11:38:28@
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
├ 测试数据 07:答案正确... 0ms
├ 测试数据 08:答案正确... 0ms
├ 测试数据 09:答案正确... 0ms
├ 测试数据 10:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:0ms好水……注意每个数之间有一列空格,挂个const表是明智之举!
-
02009-09-05 11:06:44@
就因为每行最后输个个空格。。郁闷。。。鄙视。。。藐视。。。
-
02009-08-28 22:36:24@
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
├ 测试数据 07:答案正确... 0ms
├ 测试数据 08:答案正确... 0ms
├ 测试数据 09:答案正确... 0ms
├ 测试数据 10:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:0ms
好多水!!!!!!!!!!! -
02009-08-27 11:11:57@
正确答案~
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
├ 测试数据 07:答案正确... 0ms
├ 测试数据 08:答案正确... 0ms
├ 测试数据 09:答案正确... 0ms
├ 测试数据 10:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:0msprogram temp;
var
a:array[1..100,1..10000] of char;
i,j,k,l,m,n,f,q,w:integer;
z,x:char;
str1:string;
begin
readln(k);
readln(str1);
l:=length(str1);
m:=1;
n:=1;
for i:=1 to 100 do
for j:=1 to 10000 do
a:=' ';
for f:=1 to l do begin
{1} if str1[f]='1' then begin
for i:=1 to k do
a[m+i,n+k+1]:='|';m:=m+k+1;
for i:=1 to k do
a[m+i,n+k+1]:='|';m:=1; n:=n+k+3;
end;
{2} if str1[f]='2' then begin
for i:=1 to k do begin
a[m,n+i]:='-';
a[m+i,n+k+1]:='|';
end;
m:=m+k+1;
for i:=1 to k do begin
a[m,n+i]:='-';
a[m+i,n]:='|';
a[m+k+1,n+i]:='-';
end;
m:=1; n:=n+k+3;
end;
{3} if str1[f]='3' then begin
for i:=1 to k do begin
a[m,n+i]:='-';
a[m+i,n+k+1]:='|';
end;
m:=m+k+1;
for i:=1 to k do begin
a[m,n+i]:='-';
a[m+i,n+k+1]:='|';
a[m+k+1,n+i]:='-';
end;
m:=1; n:=n+k+3;
end;
{4} if str1[f]='4' then begin
for i:=1 to k do begin
a[m+i,n]:='|';
a[m+i,n+k+1]:='|';
end;
m:=m+k+1;
for i:=1 to k do begin
a[m,n+i]:='-';
a[m+i,n+k+1]:='|';
end;
m:=1; n:=n+k+3;
end;
{5} if str1[f]='5' then begin
for i:=1 to k do begin
a[m,n+i]:='-';
a[m+i,n]:='|';
end;
m:=m+k+1;
for i:=1 to k do begin
a[m,n+i]:='-';
a[m+i,n+k+1]:='|';
a[m+k+1,n+i]:='-';
end;
m:=1; n:=n+k+3;
end;
{6} if str1[f]='6' then begin
for i:=1 to k do begin
a[m,n+i]:='-';
a[m+i,n]:='|';
end;
m:=m+k+1;
for i:=1 to k do begin
a[m,n+i]:='-';
a[m+i,n]:='|';
a[m+i,n+k+1]:='|';
a[m+k+1,n+i]:='-';
end;
m:=1; n:=n+k+3;
end;
{7} if str1[f]='7' then begin
for i:=1 to k do begin
a[m,n+i]:='-';
a[m+i,n+k+1]:='|';
end;
m:=m+k+1;
for i:=1 to k do
a[m+i,n+k+1]:='|';
m:=1; n:=n+k+3;
end;
{8} if str1[f]='8' then begin
for i:=1 to k do begin
a[m,n+i]:='-';
a[m+i,n]:='|';
a[m+i,n+k+1]:='|';
end;
m:=m+k+1;
for i:=1 to k do begin
a[m,n+i]:='-';
a[m+i,n]:='|';
a[m+i,n+k+1]:='|';
a[m+k+1,n+i]:='-';
end;
m:=1; n:=n+k+3;
end;
{9} if str1[f]='9' then begin
for i:=1 to k do begin
a[m,n+i]:='-';
a[m+i,n+k+1]:='|';
a[m+i,n]:='|';
end;
m:=m+k+1;
for i:=1 to k do begin
a[m,n+i]:='-';
a[m+i,n+k+1]:='|';
a[m+k+1,n+i]:='-';
end;
m:=1; n:=n+k+3;
end;
{0} if str1[f]='0' then begin
for i:=1 to k do begin
a[m,n+i]:='-';
a[m+i,n]:='|';
a[m+i,n+k+1]:='|';
end;
m:=m+k+1;
for i:=1 to k do begin
a[m+i,n]:='|';
a[m+i,n+k+1]:='|';
a[m+k+1,n+i]:='-';
end;
m:=1; n:=n+k+3;
end;end;
q:=(k+2+1)*l-1;
w:=k*2+3;
for i:=1 to w do begin
for j:=1 to q do
write(a);
writeln;
end;end.
-
02009-08-23 22:51:15@
这种题怎么造出来的?又水又花代码,无语死……