with c
as(select level+1 n from dual connect by level<=13),
t(a,s,l)
as
(select cast(1+n as number(3)),cast('01'||','||lpad(n,2,0)||',' as varchar(30)),2 from dual,c
union all
select t.a+n,t.s||lpad(n,2,0)||',',l+1 from t,c
where instr(t.s,lpad(n,2,0||','))=0 and substr(t.s,-3,2)+substr(t.s,-6,2)+c.n between 21 and 24 and l<=9 and t.a<66
)
select s from t where l=10 and a=(select min(a) from t where l=10);
01,06,14,02,07,12,03,08,10,04,
01,06,14,02,07,12,04,05,13,03,
01,06,14,02,07,12,04,08,10,03,
01,06,14,03,05,13,04,07,12,02,
01,06,14,03,07,11,04,09,10,02,
01,06,14,04,05,13,03,07,12,02,
01,06,14,04,05,13,03,08,11,02,
01,07,13,02,08,11,04,06,12,03,
01,07,13,03,06,12,04,05,14,02,
01,07,13,03,06,12,04,08,11,02,
01,07,13,04,06,12,03,08,11,02,
01,07,13,04,06,12,03,09,10,02,
01,08,12,02,09,10,03,11,07,04,
01,08,12,02,09,10,04,07,11,03,
01,08,12,02,10,09,03,11,07,04,
01,08,12,02,10,09,04,11,07,03,
01,08,12,03,07,11,04,06,13,02,
01,08,12,03,07,11,04,09,10,02,
01,08,12,04,07,11,03,09,10,02,
01,08,12,04,07,11,03,10,09,02,
01,09,11,03,08,10,04,07,12,02,
01,09,11,03,10,08,04,12,07,02,
01,11,09,02,12,07,03,13,05,04,
01,11,09,02,12,07,04,10,08,03,
01,11,09,02,12,07,04,13,05,03,
01,11,09,03,10,08,04,12,07,02,
01,11,09,03,12,06,04,14,05,02,
01,11,09,04,10,08,03,12,07,02,
01,11,09,04,10,08,03,13,06,02,
01,12,08,02,13,06,04,11,07,03,
01,12,08,03,11,07,04,10,09,02,
01,12,08,03,11,07,04,13,06,02,
01,12,08,04,11,07,03,13,06,02,
01,12,08,04,11,07,03,14,05,02,
01,13,07,02,14,05,04,12,06,03,
01,13,07,03,12,06,04,11,08,02,
01,13,07,03,12,06,04,14,05,02,
01,13,07,04,12,06,03,14,05,02,
01,14,06,03,13,05,04,12,07,02,
已选择39行。 |