- 明明的随机数
- 2009-07-22 15:07:55 @
var a:array[1..100] of integer;
n,b,x,i:integer;
begin
readln(n);
for i := 1 to 1000 do
a[i]:= 0;
for i := 1 to n do
begin
read(b);
a:=a+1;
end;
x:=0;
for i := 1 to 1000 do
if a[i]>= 1 then x:=x+1;
writeln(x);
for i := 1 to 1000 do
if a[i]>= 1 then write(i,' ');
end.
4 条评论
-
DEIDARA LV 7 @ 2009-07-23 15:24:21
...?
那其他问题呢? 应该还有错吧
-
2009-07-23 14:56:26@
...
只有这个问题吗
-
2009-07-22 15:30:40@
注意数组范围
数组1.。1000
-
2009-07-22 15:19:26@
数组开小了
var a:array[1..1000] of integer;
- 1