N
Nizvoo
Unregistered / Unconfirmed
GUEST, unregistred user!
列出所有的数据组合~
共有15120种
只是取数时的算法不好确定。
至少要取15120啊~~~
如果取
[blue]不要如下所写[/blue]
共有15120种
只是取数时的算法不好确定。
至少要取15120啊~~~
如果取
[blue]不要如下所写[/blue]
代码:
var
I, J, K, M, N: Integer;
BeTime: Real;
begin
BeTime := GetTickCount;
for I := 1 to 9 do
for J := 1 to 9 do
for K := 1 to 9 do
for M := 1 to 9 do
for N := 1 to 9 do
if (I <> J) and (I <> K) and (I <> M) and (I <> N) and
(J <> K) and (J <> M) and (J <> N) and
(K <> M) and (K <> N) and
(M <> N) then
frmChoose.mmoResult.Lines.Add(Format('%d %d %d %d %d',
[I, J, K, M, N]));
BeTime := GetTickCount - BeTime;
BeTime := (Round((BeTime / 1000) * 100)) / 100;
frmChoose.lblCount.Caption := Format('总数目:%d 条 用时: %s秒',
[frmChoose.mmoResult.Lines.Count, CurrToStr(BeTime)]);