repo.or.cz
/
srcbox.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
glass.pas added
[srcbox.git]
/
tyvj
/
tyvj1020.pas
blob
44c84b462d7aaad5b2e5f9c024436a349cc2dfd9
1
var
2
n
,
i
,
a
,
j
,
max
,
ans
:
longint
;
3
check
:
array
[
1
.
.20000
]
of
boolean
;
4
5
begin
6
readln
(
n
);
7
max
:=
0
;
8
fillchar
(
check
,
sizeof
(
check
),
false
);
9
for
i
:=
2
to
20000
do
10
for
j
:=
2
to
20000
div
i
do
11
check
[
i
*
j
]:=
true
;
12
for
i
:=
1
to
n
do
13
begin
14
readln
(
a
);
15
for
j
:=
a
downto
1
do
16
if
(
not
check
[
j
])
and
(
a
mod
j
=
0
)
then
17
begin
18
if
j
>
max
then begin
max
:=
j
;
ans
:=
a
;
end
;
19
break
;
20
end
;
21
end
;
22
writeln
(
ans
);
23
end
.