Page 3 of 5 <12345>
Topic Options
#202189 - 2011-05-11 08:57 AM Re: Kixgolf - Four Is Magic - Public Round [Re: Jochen]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
ok, got it,

if $=$a .. so obvious, it hurts!
_________________________



Top
#202190 - 2011-05-11 11:16 AM Re: Kixgolf - Four Is Magic - Public Round [Re: Jochen]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
266

 Code:
function a($)
    $a=($=)*4,3,3,three,four,five,six,seven,eight,nine,ten,eleven,twelve,8,8,7,7,9,8,8,0,0,6,6,5,5,5,7,6,6
    if b>$
        $a=($a[right($,1+($<20))]^)+$a[20+$/10]
    else
        $a=$a[($^)-((instr($,y)^$)>9)]
    endif
    if $=$a
        $a=""+$+" is magic."
    else
        $a=""+$+" is "+$a+". "+a($a)
endfunction


@Shane: as this is Jooels Baby, it's up to him explaining whats going on..

Only so much:
this part here is very clever, and I don't know if it was used as such before:

($a[right($,1+($<20))]^)

If the array element is of type String, it returns its length or, if it is of type integer, it returns the value of the element..
_________________________



Top
#202191 - 2011-05-11 01:41 PM Re: Kixgolf - Four Is Magic - Public Round [Re: Jochen]
BradV Offline
Seasoned Scripter
****

Registered: 2006-08-16
Posts: 686
Loc: Maryland, USA
It's so unobvious. \:\(
What does $a=($=) do?

Top
#202192 - 2011-05-11 01:47 PM Re: Kixgolf - Four Is Magic - Public Round [Re: BradV]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
$a=($=)*4,3,3...

if $=0 $a looks like this:

$a = 4,3,3...

other wise it looks like this:

$a = 0,3,3...
_________________________



Top
#202193 - 2011-05-11 03:37 PM Re: Kixgolf - Four Is Magic - Public Round [Re: Jochen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
THANKS JOCHEN!
I so wanted to get rid of that MOD for sooo long. thanks!
_________________________
!

download KiXnet

Top
#202194 - 2011-05-11 04:27 PM Re: Kixgolf - Four Is Magic - Public Round [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
264
 Code:
function a($)
    $a=4*($=),3,3,three,four,five,six,seven,eight,nine,ten,eleven,twelve,8,8,7,7,9,8,8
    if b>$
        $a=($a[right($,1+($<20))]^)+substr(t66555766,left($,~),1)
    else
        $a=$a[($^)-((instr($,y)^$)>9)]
    endif
    if $=$a
        $a=""+$+" is magic."
    else
        $a=""+$+" is "+$a+". "+a($a)
endfunction
_________________________
!

download KiXnet

Top
#202195 - 2011-05-11 04:33 PM Re: Kixgolf - Four Is Magic - Public Round [Re: Lonkero]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
cool.
_________________________



Top
#202196 - 2011-05-11 04:36 PM Re: Kixgolf - Four Is Magic - Public Round [Re: Jochen]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
but why left($,~) ?

259:

 Code:
function a($)
    $a=4*($=),3,3,three,four,five,six,seven,eight,nine,ten,eleven,twelve,8,8,7,7,9,8,8
    if b>$
        $a=($a[right($,1+($<20))]^)+substr(t66555766,$/10,1)
    else
        $a=$a[($^)-((instr($,y)^$)>9)]
    endif
    if $=$a
        $a=""+$+" is magic."
    else
        $a=""+$+" is "+$a+". "+a($a)
endfunction
_________________________



Top
#202197 - 2011-05-11 04:37 PM Re: Kixgolf - Four Is Magic - Public Round [Re: Jochen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
FFS!!!!!!!!!!!!!!!!
_________________________
!

download KiXnet

Top
#202210 - 2011-05-12 07:53 PM Re: Kixgolf - Four Is Magic - Public Round [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
258.
 Code:
function a($)
    $a=4*($=),3,3,three,four,five,six,seven,eight,nine,ten,eleven,twelve,8,8,7,7,9,8,8
	if b>$
        $a=($a[$-($>19)*$/10*10]^)+substr(t66555766,$/10,1)
    else
        $a=$a[($^)-((instr($,y)^$)>9)]
    endif
    if $=$a
        $a=""+$+" is magic."
    else
        $a=""+$+" is "+$a+". "+a($a)
endfunction
_________________________
!

download KiXnet

Top
#202211 - 2011-05-12 07:55 PM Re: Kixgolf - Four Is Magic - Public Round [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
257
 Code:
function a($)
    $a=4*($=),3,3,three,four,five,six,seven,eight,nine,ten,eleven,twelve,8,8,7,7,9,8,8
	if b>$
        $a=($a[$-($>19)*$/10*10]^)+substr(t66555766,$/10,1)
    else
        $a=$a[($^)-(instr($,y)^$)/10]
    endif
    if $=$a
        $a=""+$+" is magic."
    else
        $a=""+$+" is "+$a+". "+a($a)
endfunction
_________________________
!

download KiXnet

Top
#202213 - 2011-05-12 08:37 PM Re: Kixgolf - Four Is Magic - Public Round [Re: Lonkero]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
clever!
_________________________



Top
#202214 - 2011-05-12 08:38 PM Re: Kixgolf - Four Is Magic - Public Round [Re: Jochen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
had to find something, right?
already said I will give up and my baby said NO, before closing her eyes for a nap \:\)
_________________________
!

download KiXnet

Top
#202218 - 2011-05-13 02:20 PM Re: Kixgolf - Four Is Magic - Public Round [Re: Lonkero]
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Sorry, just couldn't resist:
 Code:
function a($)
	$a=4*($=),3,3,three,four,five,six,seven,eight,nine,ten,eleven,twelve,8,8,7,7,9,8,8
	if b>$
		$a=($a[$-($>19)*$/10*10]^)+substr(t66555766,$/10,1)
	else
		$a=$a[($^)-(instr($,y)^$)/10]
	endif
	if $=$a
		$a=@+$+" is magic."
	else
		$a=@+$+" is "+$a+". "+a($a)
endfunction


255

Top
#202219 - 2011-05-13 03:30 PM Re: Kixgolf - Four Is Magic - Public Round [Re: Richard H.]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
damn. f. and welcome to the board of scores Richard \:\)
_________________________
!

download KiXnet

Top
#202220 - 2011-05-13 03:42 PM Re: Kixgolf - Four Is Magic - Public Round [Re: Lonkero]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
@

really the only thing that can replace a "" .. So noted for the next round!
_________________________



Top
#202221 - 2011-05-13 04:06 PM Re: Kixgolf - Four Is Magic - Public Round [Re: Jochen]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4549
Loc: USA
"@"... And there it is... I kept smiling every time you guys found more and more strokes... but those quotes kept staying.
Top
#202222 - 2011-05-13 04:28 PM Re: Kixgolf - Four Is Magic - Public Round [Re: Allen]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
hmm,
work is quite overwhelming this week, so I blame this not finding more \:\/
_________________________



Top
#202223 - 2011-05-13 06:49 PM Re: Kixgolf - Four Is Magic - Public Round [Re: Jochen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
yhyy
_________________________
!

download KiXnet

Top
#202228 - 2011-05-14 06:52 PM Re: Kixgolf - Four Is Magic - Public Round [Re: Lonkero]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4549
Loc: USA
As a addendum to this challenge... is there any number where 4 is not magic?
Top
Page 3 of 5 <12345>


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1083 anonymous users online.
Newest Members
Timothy, Jojo67, MaikSimon, kvn317, kixtarts2025
17874 Registered Users

Generated in 0.182 seconds in which 0.11 seconds were spent on a total of 14 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org