#178227 - 2007-07-23 05:09 PM
Re: KiXgolf Freebie: Quicksum
[Re: Allen]
|
acmp
Getting the hang of it
Registered: 2004-07-02
Posts: 69
Loc: Bingham, Nottinghamshire, Engl...
|
Now I have good code I'm not too keen to post either.
I removed my () from the math's bit as they were unnecessary. Then the light bulb went on and I shaved another 3 chars.
_________________________
Every day is a school day
|
Top
|
|
|
|
#178229 - 2007-07-23 05:17 PM
Re: KiXgolf Freebie: Quicksum
[Re: Lonkero]
|
acmp
Getting the hang of it
Registered: 2004-07-02
Posts: 69
Loc: Bingham, Nottinghamshire, Engl...
|
Here we go...
Your solution passed all tests
KiXtart KiXtart Version = 4.53 KiXGolf Script = kixgolf_qs.kix
Computer OS = Windows XP Professional CPU = Intel(R) Pentium(R) 4 CPU 3.00GHz Speed = 2992 MHz Memory = 1022 MB
KiXGolf Scoring Engine Scoring Engine = 3.3
KiXtart Golf Score Tournament = Quicksum Processing Start = 2007/07/23 16:16:49.784 Processing End = 2007/07/23 16:16:49.799 Duration = 0000/00/00 00:00:00.014 KiXGolf Score = 81
_________________________
Every day is a school day
|
Top
|
|
|
|
#178231 - 2007-07-23 05:21 PM
Re: KiXgolf Freebie: Quicksum
[Re: Witto]
|
acmp
Getting the hang of it
Registered: 2004-07-02
Posts: 69
Loc: Bingham, Nottinghamshire, Engl...
|
yep, just checked and updated. I'm getting into this.
_________________________
Every day is a school day
|
Top
|
|
|
|
#178232 - 2007-07-23 05:21 PM
Re: KiXgolf Freebie: Quicksum
[Re: acmp]
|
Witto
MM club member
Registered: 2004-09-29
Posts: 1828
Loc: Belgium
|
also score 85
Function a($b)
Dim $, $c
For $ = 0 to Len($b)
$c = Asc(SubStr($b,$))-64
$a = $a + $c * $ * ($c>)
EndFunction
|
Top
|
|
|
|
#178235 - 2007-07-23 05:36 PM
Re: KiXgolf Freebie: Quicksum
[Re: Jochen]
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
$a = 1 ? "vartype = " + vartype(cint($a)) ? "vartype = " + vartypename(cint($a))
$a = int($a) ? "vartype = " + vartype($a) ? "vartype = " + vartypename($a)
Produces a Long (vartype=3). Is this a Kix4.52 bug?
|
Top
|
|
|
|
#178236 - 2007-07-23 05:58 PM
Re: KiXgolf Freebie: Quicksum
[Re: Howard Bullock]
|
Allen
KiX Supporter
Registered: 2003-04-19
Posts: 4549
Loc: USA
|
Sadly, I've got to do some real work
With the variable mod my score is 82. Catch you guys later tonight.
|
Top
|
|
|
|
#178238 - 2007-07-23 06:59 PM
Re: KiXgolf Freebie: Quicksum
[Re: Allen]
|
Benny69
Moderator
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
ok, i can't let you guys have all the fun (83):
Running Test 1...Done Running Test 2...Done Running Test 3...Done Running Test 4...Done Running Test 5...Done Running Test 6...Done Your solution passed all tests
KiXtart KiXtart Version = 4.51 KiXGolf Script = kixgolf_qs.kix
Computer OS = Windows XP Professional CPU = Intel(R) Pentium(R) D CPU 3.20GHz Speed = 3200 MHz Memory = 2048 MB
KiXGolf Scoring Engine Scoring Engine = 3.3
KiXtart Golf Score Tournament = Quicksum Processing Start = 2007/07/23 11:58:05.262 Processing End = 2007/07/23 11:58:05.277 Duration = 0000/00/00 00:00:00.014 KiXGolf Score = 83
Thank you for participating in KiXtart Golf! Press any key to continue...
|
Top
|
|
|
|
#178239 - 2007-07-23 07:07 PM
Re: KiXgolf Freebie: Quicksum
[Re: Benny69]
|
Benny69
Moderator
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
and yes a different, but not completely different approach
|
Top
|
|
|
|
#178241 - 2007-07-23 08:44 PM
Re: KiXgolf Freebie: Quicksum
[Re: Jochen]
|
Benny69
Moderator
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
|
Top
|
|
|
|
#178245 - 2007-07-23 09:14 PM
Re: KiXgolf Freebie: Quicksum
[Re: Howard Bullock]
|
Benny69
Moderator
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
ok here is my 83:
;!
Function a($)
dim $b
if $
$b=asc(right($,1))-64
$a=a(left($,~))+len($)*$b*($b>)
EndFunction
;!
;!
; end Quicksum
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 761 anonymous users online.
|
|
|