|
发表于 2014-11-9 05:44:40
|
显示全部楼层
本帖最后由 netegg 于 2014-11-9 06:16 编辑
[au3]#include<math.au3>
Local $a[8] = [1, 8, 15, 30, 55, 60, 78, 96], $ret = '', $result
For $i = 240 To 15 Step -1
$binary = _inttobin($i)
If StringInStr(_IntToBin($i), 1, 2, 1, 1) Then
Local $text = StringReplace($binary, '1', '1')
Local $iReplacements = @extended
If $iReplacements = 4 Then
$ret = StringRight(StringFormat("%08s", $binary), 8)
$aRet = StringSplit($ret, '', 2)
For $j = 0 To 7
If number($aRet[$j]) Then $result &= $a[$j] & ', '
Next
ConsoleWrite(StringTrimRight($result, 2) & @CRLF)
$result = ''
EndIf
EndIf
Next[/au3]
稍微修改了下 |
|