there
I hate it when the KixGolf score keeps increasining.
code:
Game24 v 1.1 KiXtart Golf running under KiXtart v4.11
In: 3388; Out: 8.0/(3.0-8.0/3.0) = 24 => Correct!!
In: 6143; Out: 6.0/(1.0-3.0/4.0) = 24 => Correct!!
In: 6451; Out: 6.0/(5.0/4.0-1.0) = 24 => Correct!!
In: 4429; Out: (9.0-2.0)*4.0-4.0 = 24 => Correct!!
In: 1234; Out: (1.0+2.0+3.0)*4.0 = 24 => Correct!!
In: 2268; Out: (2.0+6.0)+8.0*2.0 = 24 => Correct!!
In: 4466; Out: = => Correct!!
In: 1212; Out: = => Correct!!
In: 1899; Out: = => Correct!!
In: 7861; Out: = => Correct!!
In: 6480; Out: (6.0*4.0)+8.0/0.0 = 24 => Correct!!
In: 2472; Out: (2.0*7.0)*2.0-4.0 = 24 => Correct!!
In: 9952; Out: = => Correct!!
In: 8523; Out: (8.0*2.0)+3.0+5.0 = 24 => Correct!!
In: 3231; Out: (3.0*2.0)*(3.0+1.0) = 24 => Correct!!
In: 8093; Out: (8.0+0.0/9.0)*3.0 = 24 => Correct!!
In: 2676; Out: (7.0-2.0)*6.0-6.0 = 24 => Correct!!
In: 6412; Out: (6.0+2.0)*(4.0-1.0) = 24 => Correct!!
In: 3259; Out: (3.0+5.0*9.0)/2.0 = 24 => Correct!!
In: 2243; Out: (2.0+2.0+4.0)*3.0 = 24 => Correct!!
In: 5131; Out: (5.0+1.0)*(3.0+1.0) = 24 => Correct!!
In: 6271; Out: (6.0-2.0)*(7.0-1.0) = 24 => Correct!!
In: 5665; Out: 5.0*(6.0-6.0/5.0) = 24 => Correct!!
In: 6533; Out: (6.0+5.0-3.0)*3.0 = 24 => Correct!!
In: 9156; Out: (9.0-1.0*5.0)*6.0 = 24 => Correct!!
In: 1064; Out: (1.0+0.0)*6.0*4.0 = 24 => Correct!!
In: 0167; Out: = => Correct!!
In: 3477; Out: (3.0+4.0*7.0)-7.0 = 24 => Correct!!
In: 1289; Out: (8.0*9.0)/(2.0+1.0) = 24 => Correct!!
In: 3377; Out: (3.0+3.0/7.0)*7.0 = 24 => Correct!!
kix32 Kixgolf3.kix $f=junk.kix
KixGolf score = 472
code:
function game24($a,$b,$c,$d)
Dim $h, $j, $l, $p, $q, $r, $s, $t, $v, $, $x, $y, $z
$h = "+","-","/","*"
for $z=1 to 4
for $y=1 to 4
for $x=1 to 4
for each $p in $h
for each $q in $h
for each $r in $h
for each $j in split("0,8~0,8,10,18~0,12~4,16","~")
$ = ".0"
$s = ""+$a+$+$p+$b+$+$q+$c+$+$r+$d+$
for each $ in split($j,",")
$l = chr(40 + ($l="("))
$s = "" + left($s,$) + $l + substr($s,1+$)
next
$t = execute("$$v=$s")
if abs($v-24)< 1E-9
goto E
endif
next
next
next
next
$ = $b
$b = $c
$c = $d
$d = $
next
$ = $a
$a = $b
$b = $
next
$ = $c
$c = $d
$d = $
next
$s = ""
:E
$game24 = $s
exit
endfunction