Pagini recente » Cod sursa (job #1491178) | Cod sursa (job #1964497) | Cod sursa (job #3033452) | Cod sursa (job #2091527) | Cod sursa (job #41459)
Cod sursa(job #41459)
var f,g:text;v:array[1..100] of longint;n,i:byte;max,s:longint;
begin
assign(f,'loto.in');reset(f);assign(g,'loto.out');rewrite(g);
readln(f,n,s);max:=0;
for i:=1 to n do begin
read(f,v[i]);
if v[i]>max then max:=v[i];
end;
if (s div max>=6) and (s mod max<>0) then writeln(g,-1)
else if (s div max=6) and (s mod max=0) then
for i:=1 to 6 do write(g,max,' ');
close(g);
end.